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.

Like this Article?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

I'm James Richardson, your friendly Community Support technician, and I wrote the article you're looking at now. I like to think it's perfect, but I'm sure you have some suggestions. Please, let me know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

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!