Sometimes I need to troubleshoot (or just test) mailflow. In these occasions my best tool is the command line, the Telnet client (if you're using Windows 2008 don't forget to add it from the Features list) and the SMTP verbs: EHLO, MAIL FROM, RCPT TO, DATA.
- The first step is to create a Telnet session to the server (usually the Edge or the Hub Transport server):
C:\> Telnet 25
- The server will respond with:
220 SERVER.domain.com Microsoft ESMTP MAIL Service ready at Wed, 26 Aug 2009
- Then we can start issuing the SMTP verbs:
250 server.company.com Hello [10.100.100.190]
MAIL FROM:<[email protected]>
250 2.1.0 [email protected]….Sender OK
RCPT TO:<[email protected]>
250 2.1.5 [email protected]
354 Start mail input; end with .
SUBJECT: SMTP Test
Just a test message, please ignore.
250 2.6.0 Queued mail for delivery
221 2.0.0 server.company.com Service closing transmission channel
Mind the anti-spam agents, as the message can end up by being rejected!