SMTP test: what it checks and how to fix common mail server errors
An SMTP test shows whether a mail server accepts connections, introduces itself properly and offers encryption. It sends no email. Here is what the test checks, how to read the results and what to do about common errors.
What the test checks
A mail server accepts mail on port 25. The SMTP test connects to this port, reads the server's greeting and its answer to the EHLO command, and checks whether STARTTLS is offered. It then checks the certificate. No email is sent.
The test therefore shows how the server presents itself to the outside world. Whether a message finally lands in the inbox also depends on SPF, DKIM, DMARC and the reputation of the sending IP address.
The sequence in four steps
- Connection: The server must be reachable on port 25. If it is not, no mail arrives, however good your DNS records are.
- Greeting: The server introduces itself with a name. This name should match the reverse DNS of the IP address.
- EHLO: The server answers the EHLO command and lists its capabilities, for example STARTTLS.
- Encryption: If the server offers STARTTLS, the certificate is checked: validity, expiry date and matching name.
Common errors and how to fix them
Port 25 is not reachable
Many hosters block outgoing connections on port 25 to stop spam leaving their network. An outside test then shows a timeout. Ask your provider whether the block can be lifted for your server, and check that your firewall allows incoming connections on port 25.
STARTTLS is not offered
Without STARTTLS the connection is not encrypted. Many mailboxes still accept such mail but rate it worse. Enable STARTTLS in your mail server configuration and install a valid certificate.
The certificate has expired or does not match
The name in the certificate must match the host name the server gives itself. If the certificate has expired, many senders abort the encrypted connection. Renew the certificate and check that the server actually uses the new file.
The greeting does not match the reverse DNS
The name the server gives itself and the PTR record of the IP address should match. The reverse DNS check verifies this. If they differ, set the PTR record at the provider of the IP address to the host name of your server.
Run the test yourself
Enter the host name or IP address of your mail server on the SMTP test page. The test only connects to public addresses and sends no email. It then shows you step by step where the problem is. For the mail itself, the header analyzer helps, and for blocklists the blacklist check.