What tools can you use for SMTP debugging?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
When email delivery fails and you need to know exactly what's happening at the protocol level, these are the tools that actually show you.
telnet (command line, basic): The most fundamental SMTP debugging tool. You connect directly to a mail server and type SMTP commands by hand, watching the server's responses. Good for verifying a server is reachable and seeing exactly what responses it gives.
Example: telnet mail.recipient.com 25, then type EHLO yourdomain.com to see what capabilities the server advertises. If you get a connection refused error, you know the problem is at the network level, not authentication or content.
openssl s_client (for TLS connections): Like telnet, but for encrypted connections. Essential when you need to debug SMTP over TLS (port 465 or STARTTLS on port 587).
openssl s_client -starttls smtp -connect mail.recipient.com:587
And You'll see the TLS certificate exchange before the SMTP conversation, which lets you check certificate validity and TLS version.
mail-tester.com (web-based, no setup required): Send a test email to the address they give you and get a scored report on authentication, content, and spam signals. Quick way to check whether your SPF, DKIM, and DMARC are passing without manually parsing headers.
MXToolbox (web-based): Full DNS and SMTP diagnostic tools. MX record lookup, SPF record validator, blacklist check, SMTP test with handshake details. Good for checking the DNS layer before getting into SMTP protocol debugging.
Your mail server logs (often overlooked): Before reaching for external tools, check /var/log/mail.log or /var/log/maillog on your server. Postfix and Exim log every delivery attempt with the full SMTP response from the receiving server. The answer is often right there.
For most debugging sessions: start with logs, then use mail-tester.com for authentication checks, then telnet or openssl if you need to see the raw protocol exchange.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.