Had issues recently with another tech setting up a SMTP relay to Google Apps that didn’t work correctly and during the process of correcting their setup there came a need to test SMTP connectivity. Time to use a telnet connection to the SMTP server over port 25 method to test via my favorite telnet/ssh/console program PuTTY:
1. Open PuTTY and type in the Host Name of the SMTP server.
2. Choose Connection type of Telnet and change the Port to 25 then click the Open button.
3. Type EHLO [hostname] and then press ENTER.
4. Type MAIL FROM:[firstname.lastname@example.org] and then press ENTER.
5. Type RCPT TO:[email@example.com] and then press ENTER.
6. Type DATA and then press ENTER. You will receive a response that resembles the following:
354 Start mail input; end with .
7. Type Subject: [Test Subject] and then press ENTER.
8. Press ENTER. RFC 2822 requires a blank line between the Subject: header field and the message body.
9. Type [Test Message Body] and then press ENTER.
10. Press ENTER, type a single period character and then press ENTER. You will receive a response that resembles the following:
250 2.6.0 Queued mail for delivery
11. To disconnect from the destination SMTP server, type QUIT and then press ENTER. You will receive a response that resembles the following:
221 2.0.0 Service closing transmission channel
12. Check the [firstname.lastname@example.org] mailbox to see if the message arrived successfully.
This allows testing of the connection without end user intervention or the creation of a test account to send from. If there is SMTP authentication or encryption then there are other commands that will need to be entered.
If your company is in need of help troubleshooting or needs to test SMTP connectivity on your email servers, then contact us for assistance.