Microsoft Exchange and Blackberry Server Specialists

SMTP Telnet Test

A Telnet test is used for doing diagnosis of your SMTP server. It can confirm whether the Exchange server is processing email correctly and is really the manual way of entering the commands that SMTP servers do when communicating.

It involves establishing a Telnet session from a computer that is not located on the local network to the external (public) IP address of the Exchange server. You need to carry out the test from a machine at home, or from another office. Doing the test from a machine on your own network will produce useless results.

Note: This is NOT a test for open relay. For open relay testing, please see our Open Relay Test page.

  1. Start a command prompt.
    Either click start, run and type CMD
    or Choose Command Prompt from Start, Programs, Accessories, Command Prompt
     
  2. Type "telnet" (minus quotes) and press enter.
     
  3. At the Telnet prompt, type

    set localecho

    (minus quotes) and press enter. This lets you see what is going on.
     
  4. Still in the telnet prompt, enter the following command and then press enter

    open 111.222.333.444 25

    where 111.222.333.444 is your Exchange server's external IP address
     
  5. You should get a response back similar to the following:

    220 mail.server.domain Microsoft ESMTP MAIL Service, Version: 6.0.2790.0 Ready at
     
  6. Type the following command in to the telnet windows:

    ehlo example.com

    and press enter (note "example.com" can be anything that isn't a domain that the Exchange server is responsible for.
     
  7. After pressing OK you should get a response back

    250 OK
     
  8. Type the following command in to the telnet window:

    mail from:address@testdomain.com

    and press enter (again where address@yourdomain is an email address that is not on the Exchange server. Note the lack of space between from and the first part of the address).
     
  9. After pressing OK you should get a response back:

    250 2.1.0 address@example.com....Sender OK

    If you get "Access Denied" or another error message at this point then the remote server has an issue with your server connecting to them.

  10. Type the following command in to the telnet window:

    rcpt to:address@yourdomain.com

    and then press enter (where address@yourdomain.com is an address that is on your Exchange server Once again note the lack of space between to and the first part of the e-mail address). 

    If you get accessed denied or another message at this point then the mailbox has a problem - full, non-existent etc.
     
  11. After pressing ok you should get the response back:

    250 OK - address@yourdomain.com
     
  12. Now type

    DATA

    and press enter.
     
  13. You should get a response back similar to:

    354 Send data. End with CRLF.CRLF
     
  14. Now you can type your message.
    Enter the following in to the Window:

    Subject: test message

    Press enter TWICE.
     
  15. Next type in some body message, something like:

    This is a test message sent via telnet

    And press enter.
     
  16. Enter a full stop (or period) and press enter.

    You should get back the response:

    250 OK
     
  17. Finally close the session by typing

    Quit

    and press enter.
     
  18. You should get which will return the response:

    221 closing connection
     
  19. You should now have an email with the subject and the body as entered.

Authentication

If the server that you are trying to test with requires authentication, then you will need a base 64 converter to change your plain text username and password in to base64. http://www.minasi.com/64.htm


Related Articles

Exchange 2003 Spam Cleanup

Testing for Open Relay