Windows – Testing SMTP via Telnet, “help” returns “500 unrecognized command”

puttysmtpwindows

When using PuTTY in Windows (I specify a mail server, Telnet protocol, and port 25), the "help" command returns "500 unrecognized command". This is strange since I expected to get some actual help.

Also, what commands can I use in PuTTY in this manner to test if an outgoing SMTP server is functioning correctly?

Best Answer

Your mail server is telling you it has no help command. Thats what its designed to do

I've based my answer off the absolutely brilliant CC licensed guide off flurdy.com. His version is clearer - so check that out (he has a whole section for troubleshooting), and the whole guide is worth reading and understanding - he covers EVERYTHING you will need. I've made a few changes, such as assuming you're already telnetted in, and I've commented out where he's mentioned the expected output for more clarity, since I don't have the benefit of coloured text. The rest of this answer is primarily for search-ability and redundancy. Use the non commented lines one line at a time, don't copy and paste them since this is basically telling the mail server what it wants to hear, as if you were a mail client.

# Open the hand shake with ehlo and the server name you are connecting from... 
# This time it has to be the name of your server 
EHLO mail.example.org 
# The mail server will then dump out some details about its capabilities, e.g. 
#>250-mail.flurdy.net 
#>250-PIPELINING 
#>.... 
#>.... #
 then say who is the sender of this email, which is a local user 
MAIL FROM: <xandros@example.org> 
> 250 Ok 
# then say who the mail is for which is an external address e.g. gmail etc. 
RCPT TO: <you@example.com> 
> 250 Ok 
# then enter the keyword data 
data 
 > 354 End data with <CR><LF>.<CR><LF></LF></CR></LF></CR> 
# enter message body and end with a line with only a full stop. 
 blah blah blah 
 more blah 
 . 
 #> 250 Ok; queued as QWKJDKASAS 
 # end the connection with 
 quit 
 > 221 BYE

once thats done, check if you've received the message. If not, check your logs for error messages - this should be /var/log/mail.log.

Related Question