Simple Testing of SMTP with Telnet
SMTP is a pretty straightforward protocol, and thats why it is so simple for spammers to mess with, but it also makes it easy for us to test if its working.
Many times you want to verify your server before bringing it live in your MX record or even just test to make sure everything is good on your sendmail side.
Simple way of doing this is using telnet from the command line:
$ telnet your.mail.server.name.com 25
Trying your.mail.server.name.com…
Connected to your.mail.server.name.com.
Escape character is ‘^]’
220 your.mail.server.name.com ESMTP Sendmail 10.0.1/10.0.1; Mon, 13 Aug 2007 18:36:27 -0400 (EDT)
HELO your.doman.com
250 your.mail.server.name.com, nice to meet you!
MAIL FROM:you@your.domain.com
250 2.1.0 you@your.domain.com… Sender ok
RCPT TO:me@your.domain.com
250 me@your.domain.com… Recipient ok
DATA
354 Enter mail, end with “.” on a line by itself
Put your message here, and finish with a line that
only contains a period, so hit enter, then hit period, then hit enter, like below
.
250 2.0.0 l7DMerMV044784 Message accepted for delivery
QUIT
That should give you a good idea of what areas are having issues, so if you receive something like:
550 5.7.1 someone@someother.com… Relaying denied
you know that the mail server isn’t setup to receive messages for that user, or that the server is mis-configured for relaying.