STARTTLS Test

Test whether your mail servers support STARTTLS and encrypt email in transit. Enter a domain to check every MX server: STARTTLS support, TLS version, certificate validity and the full SMTP conversation, plus your MTA-STS, TLS-RPT and DANE setup.
Port
  • 25 – Incoming mail (MX)
  • 587 – Mail submission
  • 143 – IMAP
  • 110 – POP3
Enter a domain to test all of its MX servers, or a host name to test one server. The test takes up to 20 seconds. For implicit TLS on ports 465, 993 and 995, use the SSL Certificate Checker.

How the STARTTLS Test Works

The test talks to your mail servers the way Gmail, Outlook and other senders do when they deliver mail to you, and the way mail apps do when they send or read mail.

1

Find your mail servers

For a domain on port 25, we look up its MX records and test every server at once, in order of preference. A host name is tested on its own, on port 25, 587, 143 or 110.

2

Run the handshake

We connect, wait for the greeting, send EHLO, check that STARTTLS is offered, then upgrade the connection to TLS and ask again what the server offers. No message is sent and nothing logs in.

3

Check the encryption

We record the TLS version and cipher, try TLS 1.0 and 1.1, validate the certificate, confirm each server's reverse DNS, and check your MTA-STS policy, TLS-RPT record and DANE records against what each server presented.

What the STARTTLS Test Checks

Encryption between mail servers depends on more than one setting. These are the checks that decide whether mail to your domain is encrypted, and whether senders can insist on it.

STARTTLS offer and answer

Whether the server lists STARTTLS after EHLO and answers the command with 220, with the whole conversation as a transcript. A firewall that hides the offer (XXXXXXXA) is named.

TLS version and cipher

The protocol and cipher the server picks, and whether it still accepts the deprecated TLS 1.0 and 1.1, each tried with a handshake of its own.

Certificate

Dates, host name, chain to a trusted root, key and signature. On port 25 a bad certificate is a warning, unless MTA-STS enforce makes senders check it. On 587, 143 and 110 mail apps check it, so it fails.

MTA-STS and TLS-RPT

Your _mta-sts record, the policy file fetched the way senders fetch it, whether every MX server is covered and passes, and where your _smtp._tls record sends TLS reports.

DANE

The TLSA records at _25._tcp of each MX server, validated with DNSSEC and matched against the certificate it presented, with the records to publish for that certificate.

Login before encryption

Whether a submission, IMAP or POP3 server lets a mail app log in before STARTTLS, which would send the password in plain text, and what it offers once encrypted.

What Is STARTTLS?

STARTTLS is a command that upgrades a plain-text email connection to an encrypted TLS connection. Defined for SMTP in RFC 3207, it lets mail servers on port 25 and email clients on port 587 start unencrypted and switch to encryption before any message content is sent. IMAP and POP3 use the same upgrade on ports 143 and 110.

Encryption in transit

Once upgraded, the message, its headers and attachments travel encrypted between the two servers, so they can't be read on the network.

Opportunistic by default

Server-to-server STARTTLS is optional. If it's missing or fails, most senders deliver the message in plain text instead of refusing it.

Open to downgrade attacks

An attacker on the network can strip the STARTTLS offer so mail is sent unencrypted. MTA-STS and DANE close this gap.

Check MTA-STS →

STARTTLS vs SSL/TLS: Which Port Uses What

STARTTLS upgrades a connection that starts in plain text. Implicit TLS, often labeled SSL/TLS in email clients, encrypts from the first byte. Both use the same TLS protocol once encryption starts. This test covers the STARTTLS ports; the SSL Certificate Checker covers the implicit TLS ones.

Email ports and their encryption
PortProtocolEncryptionUsed for
25SMTPSTARTTLS (optional)Server-to-server delivery to your MX servers
587SMTP submissionSTARTTLS (required)Email clients and apps sending mail
465SMTPSImplicit TLSEmail clients sending mail (RFC 8314 recommends it)
143 / 993IMAP / IMAPSSTARTTLS / implicit TLSReading mail
110 / 995POP3 / POP3SSTARTTLS / implicit TLSDownloading mail

How to Test STARTTLS with OpenSSL

You can run the same check from a terminal. Many internet providers block outgoing port 25 on home connections, so run it from a server if it times out.

# Find your MX servers dig +short MX example.com # Test STARTTLS on port 25 and show the certificate openssl s_client -starttls smtp -connect mx1.example.com:25 \ -servername mx1.example.com -crlf # The submission port, IMAP and POP3 openssl s_client -starttls smtp -connect smtp.example.com:587 -crlf openssl s_client -starttls imap -connect imap.example.com:143 openssl s_client -starttls pop3 -connect pop.example.com:110 # See whether STARTTLS is offered (look for 250-STARTTLS) nc mx1.example.com 25 EHLO test.example.org
What a working server looks like 250-STARTTLS → 220 Ready After EHLO, the server lists its extensions. 250-STARTTLS means it supports encryption. When the client sends STARTTLS, a 220 reply means the TLS handshake can begin. A 454 reply or a missing STARTTLS line means senders deliver to that server unencrypted.

Common STARTTLS Problems and How to Fix Them

These are the issues the test finds most often on mail servers, and what to do about each one.

STARTTLS not offered

The server doesn't advertise STARTTLS

Every message to this server is delivered in plain text. This often happens after a certificate expires and an admin disables TLS, or on old appliances.

Install a certificate and enable TLS in your mail server (for Postfix, smtpd_tls_security_level = may).

Handshake fails

STARTTLS is offered, but TLS fails

The server accepts the command, but the handshake breaks: a missing certificate file, a key that doesn't match, or no TLS version or cipher in common.

Check the mail server's TLS logs, confirm the certificate and key paths, and enable TLS 1.2 and 1.3.

Hidden by a firewall

EHLO shows XXXXXXXA instead of STARTTLS

A firewall with SMTP inspection blanks the offer, so senders never see it and deliver in plain text, even when the server behind it supports TLS.

Turn off ESMTP inspection (Cisco ASA: no inspect esmtp) or allow STARTTLS through.

Untrusted certificate

Self-signed, expired or mismatched certificate

Opportunistic senders still deliver, but MTA-STS and DANE need a valid certificate. With MTA-STS in enforce mode, delivery fails.

Use a certificate from a public CA whose SANs include the MX host name, and automate renewal.

Old TLS versions

TLS 1.0 or 1.1 still accepted

Both are deprecated (RFC 8996). Current senders negotiate TLS 1.2 or 1.3, but leaving old versions on weakens the server.

Disable TLSv1 and TLSv1.1 in the server's TLS protocol settings.

Login before encryption

A mail app can log in before STARTTLS

On ports 587, 143 and 110, a server that offers login before encryption lets a misconfigured app send the password in plain text.

Allow login only after STARTTLS (Postfix: smtpd_tls_auth_only = yes; Dovecot: disable_plaintext_auth = yes).

No MTA-STS

Senders can't require encryption

Without an MTA-STS policy, a sending server has no way to know your domain expects TLS, so a downgrade attack goes unnoticed.

Publish an MTA-STS policy, start in testing mode, then switch to enforce. Hosted MTA-STS serves the policy file for you.

No TLS-RPT

You don't hear about TLS failures

When senders can't establish TLS with your servers, they have nowhere to report it, so problems stay invisible.

Publish a TLS-RPT record (_smtp._tls.example.com) to receive daily reports. Learn about TLS-RPT.

Frequently Asked Questions

What is STARTTLS?
STARTTLS is a command that upgrades a plain-text connection to an encrypted TLS connection. A mail server lists it in its answer to EHLO, the client sends STARTTLS, and both sides run a TLS handshake before any message data is sent. It is defined for SMTP in RFC 3207 and for IMAP and POP3 in RFC 2595.
Is STARTTLS secure?
Once the TLS handshake completes, the connection is as secure as any TLS connection. The weak point is the upgrade itself: server-to-server STARTTLS is optional, so an attacker who can tamper with the connection can remove the STARTTLS offer and force plain-text delivery. MTA-STS and DANE prevent this downgrade.
What is the difference between STARTTLS and SSL/TLS?
Both use the same TLS encryption. STARTTLS starts unencrypted and upgrades the connection on ports 25, 587, 143 and 110. Implicit TLS, often labeled SSL/TLS in email clients, encrypts from the first byte on ports 465, 993 and 995. To check those ports, use the SSL Certificate Checker.
Which port does STARTTLS use?
For email, STARTTLS is used on port 25 for server-to-server delivery and on port 587 for email clients submitting mail. IMAP (port 143) and POP3 (port 110) can also use STARTTLS. Ports 465, 993 and 995 use implicit TLS instead.
What does "Must issue a STARTTLS command first" mean?
It is an SMTP error, usually 530 5.7.0, from a server that requires encryption before it accepts a login or a message. Your email client or app is connecting without TLS. Turn on STARTTLS (or TLS) in the client's outgoing server settings and use port 587, or switch to SSL/TLS on port 465.
Does STARTTLS encrypt email end to end?
No. STARTTLS encrypts each hop between servers, so the message is protected in transit but stored unencrypted on the servers it passes through. For end-to-end encryption, use S/MIME or PGP.
Why does a STARTTLS test time out on port 25?
Either the mail server is not reachable on port 25 (a firewall, a wrong MX record, a server that is down), or the network you test from blocks outgoing port 25. Many home internet providers and cloud platforms block it to stop spam. This test runs from a server where port 25 is open, and it tells "no answer" apart from "connection refused".
Why does my mail server pass with a self-signed certificate?
On port 25, sending servers encrypt without checking the certificate, unless your domain publishes an MTA-STS policy in enforce mode or DANE records. So the test shows certificate problems on an MX server as warnings, and as failures when MTA-STS enforce covers that server. On ports 587, 143 and 110, mail apps check the certificate, so the same problems fail there.
What does XXXXXXXA mean in an EHLO response?
A firewall with SMTP inspection, typically a Cisco ASA or PIX, replaced the STARTTLS keyword with X's. Sending servers no longer see the offer, so they deliver in plain text. Turn off ESMTP inspection on the firewall (no inspect esmtp) or allow STARTTLS through it.
How do I test STARTTLS with OpenSSL?
Run openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com -crlf. OpenSSL sends EHLO and STARTTLS for you, then prints the certificate chain, the protocol and the cipher. Use -starttls imap on port 143 and -starttls pop3 on port 110.
What is MTA-STS?
MTA-STS (RFC 8461) lets your domain tell sending servers that mail must be delivered over TLS to the listed MX servers, with a valid certificate. Senders that support it refuse to deliver when STARTTLS is missing or the certificate is invalid, which blocks downgrade and interception attacks.
What is TLS-RPT?
TLS-RPT (RFC 8460) is a DNS record that asks sending servers to send you daily reports, by email or HTTPS, about failed TLS connections to your domain. It shows you when STARTTLS, certificate or MTA-STS problems are stopping encrypted delivery.

More Free Email Security Tools

Make encryption mandatory, not optional

STARTTLS on its own can be stripped by an attacker. PowerDMARC's hosted MTA-STS and TLS-RPT enforce encrypted delivery to your domain and alert you when TLS fails, without hosting a policy file yourself.