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 service | TLS mode to test | Example authorized target |
|---|---|---|
| SMTP relay on port 25 | SMTP greeting and EHLO, then STARTTLS when offered | mx.example.com:25 |
| Submission on port 587 | STARTTLS on a listener configured for it | submission.example.com:587 |
| Submission on port 465 | Implicit TLS from the start of the connection | submission.example.com:465 |
Observe the certificate served after STARTTLS
- 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.
- 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.
- 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.
Diagnose at the stage that failed
| Observed result | Next check |
|---|---|
| No greeting or connection times out | Check the route, firewall and listener. Some networks restrict outbound port 25. |
| STARTTLS is absent from EHLO or receives 454 | Check 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 unexpected | Check 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 fails | Check 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.