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.

Ask an AI · tailored to your setup

Learn SMTP debugging to diagnose delivery problems.

I'm getting email delivery failures and I want to debug what's happening at the SMTP level. My situation: [describe the error messages or symptoms you're seeing, your server type, and whether you have access to server logs]. Walk me through using the appropriate tools to figure out whether this is a network, authentication, or content problem, starting with what I can check right now.

Edit the yellow boxes, then send to the AI of your choice.