Using Telnet to test Exchange SMTP

SMTP for printers

Quite often printers are setup to use SMTP to email scanned documents to end users. During an Exchange upgrade, re-configuring the printers to utilize the new Exchange information is not an insignificant task because it often requires physically visiting each printer and inputting the new server’s IP address. Additionally, to avoid SMTP anonymous relays, SMTP is often locked down to allow emails to originate only from certain IP addresses or IP ranges. This blog post is about testing that you have SMTP working correctly (by using telnet) before you attempt to reset all the printer settings.

You should run this test while logged into the actual Exchange server. These are the steps to take:

  1. Run telnet:
    • Open a DOS command prompt by using the Start menu | Run | CMD
    • Use IP or hostname of the Exchange server: telnet IP 25
  2. Craft test email:
    • Enter a valid email address in the from field
    • Enter a valid email address in the recipient field
    • Enter a subject for your email
    • Enter some text for the body, e.g. “This is a test…”
    • Enter a period to complete the body of the email
    • Type quit to close the telnet session
  3. Validate your email was received:
    • Enter an email client or open a web browser to the OWA (Outlook Web Access) website
    • Login as the recipient
    • See if the email you crafted has appeared

If this test does not work there, it means the SMTP service is probably not enabled. Next, you should run this test from another workstation or server on your network. If this test fails there, it often means that the Windows firewall running on the Exchange server is blocking port 25. If the firewall is not blocking the port, the other thing to validate is that you correctly configured the receive connector to allow SMTP relays from the IP address you are testing. Finally, if you are unable to run telnet from a DOS prompt, notice that its not installed by default in Windows 7 or Server 2008. See this blog post for how to install it: https://www.orionscache.com/2013/04/installing-the-telnet-client-in-2008r2/