Definition

On a STARTTLS-enabled SMTP listener you operate, run OpenSSL s_client with -starttls smtp, the intended host and port, and the correct server name. Read the leaf and presented chain. Check certificate identity and trust with the policy and trust store your client uses.

Choose the mail listener and TLS mode

Use the endpoint configured for the flow under review. An MX host used for inbound delivery can differ from the hostname clients use for message submission. Confirm the actual listener configuration before testing.

Typical serviceTLS mode to testExample authorized target
SMTP relay on port 25SMTP greeting and EHLO, then STARTTLS when offeredmx.example.com:25
Submission on port 587STARTTLS on a listener configured for itsubmission.example.com:587
Submission on port 465Implicit TLS from the start of the connectionsubmission.example.com:465
Official sourcesRFC 3207, SMTP Service Extension for Secure SMTP over TLS ↗RFC 8314, TLS for Email Submission and Access ↗

Observe the certificate served after STARTTLS

  1. Request the SMTP upgrade

    For a port 25 listener you operate, run openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com -showcerts </dev/null. Replace the example with the intended hostname and port. For an implicit TLS listener, use its port and omit -starttls smtp.

  2. Identify the served leaf

    Inspect the first certificate in the list and compare its SHA-256 fingerprint with the intended public certificate. Record the port, mode, timestamp, and the address if known. This check requires no mail submission or account credentials.

  3. Check trust and hostname

    For a hostname-based PKIX check, add -verify_hostname mx.example.com -verify_return_error and use the relevant root store, for example with -CAfile when a specific CA bundle is needed. Interpret the result under the intended client's mail transport policy.

Official sourcesOpenSSL s_client documentation ↗RFC 8446, TLS Certificate message ↗

Diagnose at the stage that failed

Observed resultNext check
No greeting or connection times outCheck the route, firewall and listener. Some networks restrict outbound port 25.
STARTTLS is absent from EHLO or receives 454Check the intended SMTP listener's TLS configuration and mail logs. There is no usable certificate observation from that attempt.
Handshake succeeds and the leaf fingerprint is unexpectedCheck the certificate configured on the SMTP listener and whether its workers loaded the change. Include separate MX hosts or addresses when in scope.
Expected fingerprint matches, but verification failsCheck the identity expected by your client, the certificate validity and the presented intermediates against the relevant trust store.

Record the scope of the mail TLS test

Keep the SMTP reply, handshake and certificate validation outcomes distinct. A successful connection records the capabilities and evidence of that listener at that time. Enforcement across actual deliveries depends on the sending and receiving infrastructure and its policy.

Cipher Discovery supports scoped public SMTP STARTTLS discovery. Select the supported service profile for an authorized target to record observed TLS and certificate properties. Monitor other listeners and delivery policies with checks designed for those scopes.

Frequently asked questions

Why does a direct TLS connection fail on SMTP port 25?

A STARTTLS listener begins with SMTP. Use -starttls smtp to perform this negotiation before the TLS handshake.

Is SMTP on port 465 the same as STARTTLS on 587?

Port 465 conventionally uses implicit TLS. Port 587 can use an SMTP conversation followed by STARTTLS. Confirm the configured listener and match the client mode to it.

Does a successful SMTP STARTTLS check prove all mail is encrypted?

It establishes evidence about that connection. Review transport policy and delivery telemetry to evaluate how encryption is enforced for actual mail flows.