Friday, March 05, 2010

Testing SMTP

At work there is an issue with the SMTP server that messages are getting hung or delayed. It's alway handy to have these commands on hand to manually test SMTP and just make sure everything is up and running. The problem I'm facing is that I'm able to send the messages but they are getting lost somewhere.

Testing SMTP Server from Microsoft

Another link

Here's the commands all run from a Windows command prompt, but these can be used from a UNIX or Linux as well.

1) open command prompt

2) type "telnet"

3) type "set LocalEcho"

4) type "open 25"

5) You should see the following "servername.domainname.com ready"

6) Type "helo me"

7) You should see the following "250 OK"

8) Type "mail from:test@testdomain.com" where you can enter any address here

9) You should see the following "250 OK mail from test@testdomain.com"

10) Type "rcpt to:email@domain.com" this is who you want to send the message to

11) You should see the following "250 OK recipient email@domain.com"

12) Type "Data"

13) You should see the following "354 Send data"

14) Type "Subject:Your subject" press enter twice

15) Type "Testing" and press enter

16) Press enter, then type a (.) period, then press enter

17) Type "quit"

18) You should see the following "Mail queued for delivery"

The message will appear in the recipient's mailbox, but in my case it works the first few times then does not show up.