InMotion Hosting Support Center

You can diagnose email errors though the Linux command line using the TELNET command. You can communicate back and forth with the receiving server with TELNET to see why the email is being rejected to verify email bounce errors or to check if the server email ports are working. Below are the steps use TELNET to communicate with the server.

Important! In the code below, the Red commands are what you type and the Blue is what the server should respond back with. Also, this article is geared towards VPS and Dedicated server accounts; however, anyone can use the Linux command line on their local Linux computer. For information on shell access click here.

You can use TELNET with Windows command line; however, you will need to enable telnet on the Windows computer.

TELNET to an email server

You can communicate with a server using TELNET to find the exact error on the server in question. In this case, We will see if we can replicate the error when emails sent from name@your-domain.com are bouncing sending to notyourdomain.com. The basic syntax is as follows. (You can check any server port using telnet, not just port 25)

Command       Domain or IP      Port #
telnet       your-domain.com     25

TELNET to the server that is refusing the email. In this case, the notyourdomain.com server is rejecting the email.

[root@vps#### ~]$ telnet notyourdomain.com 25
Trying 25.22.80.62...
Connected to notyourdomain.com.
Escape character is '^]'.
220-fox.somenameserver.com ESMTP Exim 4.80 #2 Thu, 07 Mar 2013 08:06:11 -0600
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.

Type HELO localhost to receive a response from the receiving server. This will display the server name and IP.

HELO localhost
250 fox.somenameserver.com Hello localhost [205.134.240.204]

You can also type EHLO localhost to receive more information for the receiving server. This shows the extended server response with server name IP and some supported settings.

EHLO localhost
250-fox.somenameserver.com Hello localhost [205.134.240.204]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

Now that you verified that the server is communicating back and forth, next, ask the server to check the sending email address. Type MAIL FROM: <name@your-domain.com> FROM: SIZE=100 ( Supplement the name@your-domain.com with the email address you are getting bounces with) and hit enter.

MAIL FROM: <name@your-domain.com> SIZE=100
550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
Connection closed by foreign host.

The entire TELNET conversation should look like the following.

[root@vps#### ~]$ telnet notyourdomain.com 25
Trying 25.22.80.62...
Connected to notyourdomain.com.
Escape character is '^]'.
220-fox.somenameserver.com ESMTP Exim 4.80 #2 Thu, 07 Mar 2013 08:06:11 -0600
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
HELO localhost
250 fox.somenameserver.com Hello localhost [205.134.240.204]
EHLO localhost
250-fox.somenameserver.com Hello localhost [205.134.240.204]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
MAIL FROM: <name@your-domain.com> SIZE=100
550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
Connection closed by foreign host.

The example before shows that the receiving server notyourdomain.com is rejecting email from name@your-domain.com with a "550 No Such User Here" error.

Support Center Login

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2015-01-09 8:23 am

Hi, I am Trying to connect the server using windows cmd promt. just blank output I got. and nothing generated in logs aslo. I mean Request is not hitted to server. What could be the reoason ?

Staff
26,137 Points
2015-01-09 11:26 am
Hello Pradeep,

Thanks for the question. Just because you get a blank screen doesn't mean it's an error. You most likely have connected. When you telnet in, you must give a command afterward to continue working in the telnet connection. This a pretty commonly discussed issue. Check out this forum post. They explain exactly what you may be seeing.

Regards,
Arnel C.
n/a Points
2015-07-21 8:25 am

I'm using Mac OS and the Terminal (application). What are the commands I would use to check the SMTP server port 465 with SSL?

 

Staff
5,084 Points
2015-07-21 9:57 am
Hello Henry,

It would be the same command just "telnet server.com 465".

Best Regards,
TJ Edens
n/a Points
2015-07-22 6:10 am

The problem I'm having is that while I CAN OPEN the port in Telnet, I CANNOT send via my client using SSL. I get the advice that the certificate doesn't exist or that the certificate is expired or that the encryption is wrong (not 64 bit) depending on which client or method is being used (e.g., Mail, or direct access via another app that sends via secure server). What can be done to troubleshoot this? I tried to chat with your support (Matthew) nothing was resolved.

Staff
26,137 Points
2015-07-22 10:28 am
Henry,

I'm not really sure how you're trying to send (I'm assuming this is an outgoing email). If you have the SSL settings for outgoing email correctly configured with your email client, then it will send the email using the secure connection. Our Email over SSL article should give you the necessary information for the correct setup.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2015-07-22 9:37 pm

I think I got  it going. Mail is quite strange in setting it up. The trick is that it wants to set the SMTP to 587 when the port setting is supposed to be 465 (at least that's what it says in your information).

587 is the only port that works with your recommended SMTP settings now, though port 465 used to work just fine in the past (Sever: secure161servconfig.com, Authenciation:Password,username:<email address>, password:<your password>). If settings get screwed up enough, Mail gives it up. Thereafter, the only way out is to start over. 

Get a totally different response with port 587 than that of 465 and I think you will too. 

Staff
17,726 Points
2015-07-23 9:59 am
Hello Henry,

Thank you for contacting us. Since your available server ports for email have not changed, most likely the network you are connecting from, or your ISP is blocking the port. This is common with many ISP's, or public networks.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2015-07-24 8:59 am

Staff
26,137 Points
2015-07-24 9:25 am
Hello Henry,

It looks like you were trying to put an image in the post. If so, the link is not correct or not working. If you have any further questions or comments, please let us know.

Regards,
Arnel C.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

10 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!