What Is STARTTLS? How Email Encryption Works, Ports, Security, and Secure Setup for SMTP, IMAP, and POP3
Read summarized version with

Key takeaways
- STARTTLS (STLS in POP3) upgrades an existing SMTP, IMAP, or POP3 connection to TLS, and it protects only the connection on which it is negotiated.
- Implicit TLS on ports 465, 993, and 995 encrypts the session from the first byte, while STARTTLS on ports 587, 25, 143, and 110 begins in plaintext.
- Opportunistic STARTTLS can be stripped or downgraded, so MTA-STS, DANE, and enforced TLS policies are needed wherever confidentiality matters.
- Certificate and hostname validation, current TLS versions, and continuous monitoring determine whether a STARTTLS deployment actually protects mail.
- Encrypted transport does not make a message trustworthy, so phishing, business email compromise, and deepfake-driven requests still require trained, verifying employees.
STARTTLS is an email protocol command that upgrades a plaintext connection to TLS encryption. It protects messages as they travel between mail systems and reduces exposure during transport. SMTP and IMAP use it, and POP3 uses the equivalent STLS command. Because it works as a command inside those protocols, it is neither a standalone encryption protocol nor a guarantee of end-to-end confidentiality.
This guide explains the SMTP handshake and how certificate and hostname validation establish trust, including why a successful handshake still does not guarantee delivery. Later sections compare explicit STARTTLS with implicit TLS on port 465 and explain how ports 25, 587, and 2525 serve different mail flows.
The guide also shows how enforced policies, MTA-STS, and DANE prevent plaintext fallback and downgrade attacks. Configuration guidance covers Postfix, Exim, Sendmail, and Microsoft Exchange. Testing and monitoring practices help administrators identify certificate failures, unsupported TLS versions, queue problems, and remote policy rejection.
Encrypted transport still leaves a gap at the inbox, where employees decide what to trust. Security teams can see how Adaptive Security’s Phish Triage helps them review and resolve the suspicious messages employees report.

What Is STARTTLS? Definition and Purpose
STARTTLS is an email protocol command that upgrades an existing plaintext connection to TLS encryption. It adds TLS protection to protocols such as SMTP, IMAP, and POP3 after a connection begins. Its purpose is to protect email data while it travels between two communicating mail systems. End-to-end encryption from sender to recipient requires a different control.
What Does the STARTTLS Command Do?
STARTTLS enables a client tell a mail server to begin a TLS handshake on an existing TCP connection. Before that command succeeds, the connection uses plaintext, so application data travels unencrypted and is visible to network observers. After the handshake succeeds, the parties exchange the remaining protocol traffic inside an encrypted TLS session.
The mechanism is most visible in SMTP, the protocol that transfers email between mail servers and accepts outgoing messages from mail clients. A client connects to an SMTP server and sends EHLO. If the server advertises STARTTLS, the client can send the STARTTLS command. The server confirms that it is ready, and both sides begin TLS negotiation before continuing the SMTP conversation.
The IETF’s RFC 3207 specification defines STARTTLS as an SMTP service extension that allows an SMTP client and server to use TLS for private, authenticated communication. After the handshake, the SMTP session resets. The client sends EHLO again and learns which capabilities are available inside the protected session.
The same upgrade appears in IMAP and POP3, the protocols commonly used to access stored mail. POP3 names its version of the command STLS. IMAP keeps messages on the server and synchronizes folders, read status, and other changes with a mail application. POP3 generally downloads messages from the server to the client.
The IETF’s RFC 2595 specification defines TLS use for both protocols. In each case, the command upgrades an established connection before the client sends credentials or retrieves mail.
SMTP, IMAP, and POP3 define how email systems communicate. TLS defines how that communication is encrypted and authenticated. STARTTLS is the instruction that switches an active session from an unencrypted protocol exchange to a TLS-protected one.
Organizations use STARTTLS in two primary email contexts. SMTP submission is the service employees and applications use to send outgoing mail to a designated submission server, commonly through port 587. Server-to-server relay transfers mail between mail transfer agents as a message moves toward its recipient. STARTTLS can protect either connection when both sides support it and policy requires successful negotiation.
Which Terms Are Commonly Confused With STARTTLS?
Several transport terms overlap with STARTTLS, and a broader email security glossary covers many more. The distinctions below matter most for configuration decisions.
TLS, or Transport Layer Security, is the cryptographic protocol that encrypts data in transit and helps each side verify the identity of the server. It replaced the older SSL protocol, although administrators and vendors still say 'SSL' when they mean modern TLS. TLS does not describe email routing or message formatting. It protects the communication channel carrying those operations.
Explicit TLS means the client begins with a normal TCP connection and requests encryption with a command such as STARTTLS. The connection starts in plaintext and upgrades after the server agrees and the TLS handshake completes. With implicit TLS, the client connects to a port reserved for TLS and begins the handshake immediately. A later section compares the two models in detail.
Plaintext does not necessarily mean the message is saved as readable text on disk. It means the network protocol exchange is unencrypted at that point. A cyberattacker with access to the path between systems can potentially observe or modify commands, credentials, or message data. The risk is highest before TLS begins, during a failed negotiation, or when a client keeps sending after STARTTLS proves unavailable.
Transport encryption protects data while it moves across a particular connection, and it stops short of end-to-end encryption. Once data reaches a mail server, that server can process, scan, index, and store it according to its own controls. An overview of how email encryption works shows where transport and message-level protection each begin and end.
STARTTLS is also different from authentication. A successful TLS handshake can authenticate the server through certificate validation and protect a user’s password while it crosses the connection. It does not prove that the person or system that authored the message is trustworthy. Email authentication technologies such as SPF, DKIM, and DMARC address separate questions about sending authorization and message-domain alignment.
What Does STARTTLS Protect, and What Can It Not Protect?
STARTTLS protects the contents exchanged during the encrypted mail hop. Depending on the protocol and connection, that includes message bodies, attachments, login credentials, authentication exchanges, and commands used to submit, retrieve, or relay mail. It also prevents passive network observers from reading most application data carried inside that TLS session.
The protection applies only after the TLS handshake succeeds. A client may see no STARTTLS capability, receive a temporary failure, or encounter a certificate problem. When confidentiality is required, the client should then retry securely or stop the transfer. Silently downgrading to plaintext defeats the purpose of the upgrade.
RFC 3207 also warns that a cyberattacker can remove the server’s STARTTLS advertisement or interfere with negotiation. “Use TLS when available” is therefore weaker than “require TLS.” The difference between those two policies is one reason the question of whether email is encrypted by default has no simple yes or no answer.
STARTTLS does not automatically protect an entire email journey. A message can pass through several SMTP servers, creating several separate hops. TLS between the sender’s mail client and its submission server does not guarantee TLS between that submission server and the recipient’s mail server. Each hop needs its own successful TLS negotiation and appropriate enforcement.
STARTTLS also leaves some metadata visible to the systems that route mail, and a later section explains which details remain exposed. Transport encryption cannot protect a compromised endpoint either. If a cyberattacker controls the sender’s device, the recipient’s device, or a mail server, encryption between healthy systems cannot stop that cyberattacker from reading decrypted messages. Likewise, a malicious sender can transmit a dangerous attachment or deceptive request through an encrypted channel.
In precise terms, STARTTLS protects email in transit between two systems when TLS is successfully negotiated and enforced. It strengthens SMTP, IMAP, and POP3 without turning them into end-to-end encrypted messaging systems.
Organizations should require validated TLS for submission and mail access and enforce secure relay policies where supported. Additional controls should cover message authenticity, endpoint security, and human-layer phishing risk. For teams building broader defenses around email-based social engineering, phishing simulations that include realistic email scenarios test whether employees recognize a malicious request even when transport encryption is working correctly.
How Does STARTTLS Work? The SMTP EHLO-to-TLS Handshake
STARTTLS upgrades an existing SMTP connection from plaintext to TLS encryption. The client connects, identifies itself with EHLO, and checks whether the server advertises STARTTLS. It then issues the STARTTLS command and validates the server’s certificate during the TLS handshake.
Finally, it starts a new SMTP capability exchange before authenticating or sending a message. This encryption protects the SMTP session in transit, but it does not guarantee message acceptance, final delivery, or encryption on every later hop.
1. Open the SMTP Connection and Read the EHLO Response
The client establishes a TCP connection to the SMTP service and waits for the server’s greeting. The server normally responds with a 220 status code that identifies the service and confirms that it is ready to receive SMTP commands.
The client sends EHLO, followed by its domain or hostname. EHLO is the extended form of the original HELO command. It asks the server to disclose the SMTP extensions and capabilities available on that connection.
A typical exchange looks like this:
S: 220 mail.example.net ESMTP ready
C: EHLO client.example.org
S: 250-mail.example.net
S: 250-PIPELINING
S: 250-SIZE 52428800
S: 250-STARTTLS
S: 250 8BITMIME
The 250-STARTTLS line tells the client that the server supports the STARTTLS SMTP service extension defined in RFC 3207. Without that advertisement, the client must not send the STARTTLS command.
The client should then follow its configured policy. Options include refusing the connection, using a separately configured TLS service, or continuing only when encryption is explicitly optional.
The client should treat the server’s capabilities as connection-specific state. A server can advertise different extensions based on the listener, port, client identity, security policy, or whether TLS is already active. A capability visible before encryption is not automatically valid after encryption.
The server in the example above reflects that behavior. It advertises STARTTLS but withholds AUTH until the client has encrypted the session. This prevents credentials from crossing the network in plaintext and gives the server a clear security checkpoint before accepting authenticated mail.
STARTTLS upgrades the protocol on the connection that already exists. The client begins on the existing SMTP socket, negotiates TLS on that socket, and continues using the same connection after encryption succeeds.
2. Send STARTTLS and Complete the TLS Handshake
After confirming that STARTTLS is available, the client sends the command by itself:
C: STARTTLS
S: 220 2.0.0 Ready to start TLS
The 220 response grants permission to begin the TLS negotiation. SMTP command exchange pauses at that point. The next bytes on the connection are TLS handshake messages, and readable SMTP commands resume only after the handshake completes.
The client begins by sending a TLS ClientHello. This message lists the TLS versions and cryptographic parameters the client supports. The ClientHello carries values such as a random number and, commonly, the intended server name through the Server Name Indication extension. The server responds with a ServerHello, selects the protocol version and cipher suite, and sends its certificate chain and other handshake data.
Certificate validation is the client’s central identity check. The client verifies that the certificate is currently valid, chains to a trusted certificate authority, has not been rejected by local policy, and suits the SMTP service. Hostname verification is equally important. The hostname the client intended to reach must match a permitted name in the certificate, usually in its Subject Alternative Name field.
Encryption alone is insufficient without hostname verification. A certificate signed by a trusted authority can still belong to the wrong host. That happens when the client connects to a cyberattacker-controlled endpoint or accepts a certificate for an unrelated domain. Proper SMTP clients validate both trust and identity. A valid certificate by itself does not prove that the connection reached the intended mail server.
The TLS handshake establishes shared session keys. In modern TLS, the client and server use an ephemeral key exchange to derive secrets that never cross the network directly. They authenticate the handshake and switch the connection into encrypted mode. After that transition, SMTP commands and responses are protected from ordinary network observation and tampering between those two endpoints.
That protection covers only the connection between the client and the SMTP server, or between two SMTP servers that independently negotiate TLS. A receiving server can accept a message over TLS and later relay it over an unencrypted connection if its policy permits.
The IETF email applicability draft notes that opportunistic STARTTLS is vulnerable to man-in-the-middle attacks when encryption is not enforced.
A client that requires confidentiality should verify the certificate, reject failed identity checks, and prevent silent fallback to plaintext. A client configured merely to “try TLS” can still send mail without encryption. That happens if the server does not advertise STARTTLS or if negotiation fails.
3. Send EHLO Again, Authenticate, and Transfer the Message
After TLS negotiation succeeds, the client must discard the pre-TLS SMTP capability state and should send EHLO again:
C: EHLO client.example.org
S: 250-mail.example.net
S: 250-AUTH PLAIN LOGIN
S: 250-SIZE 52428800
S: 250 8BITMIME
RFC 3207 requires both sides to discard any knowledge gained before TLS, so the client must not rely on extensions the server advertised before encryption. The specification directs the client to send EHLO again as its first command after the handshake.
The server can publish a different capability set because the security context has changed. AUTH often appears only after TLS, while STARTTLS normally disappears because the connection is already encrypted.
Repeating EHLO prevents stale assumptions. A client that remembers pre-TLS capabilities could attempt authentication with a mechanism the server no longer permits. It could also use an extension that depends on the previous state or misread the server’s security policy.
The second exchange creates a clean protocol boundary. Plaintext negotiation ends, TLS becomes active, and SMTP capability discovery starts again inside the protected channel.
The client authenticates if the server requires it. A simplified exchange might look like this:
C: AUTH PLAIN [authentication exchange omitted]
S: 235 2.7.0 Authentication successful
C: MAIL FROM:<sender@example.org>
S: 250 2.1.0 Sender accepted
C: RCPT TO:<recipient@example.net>
S: 250 2.1.5 Recipient accepted
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: Subject: Example message
C:
C: Message body
C: .
S: 250 2.0.0 Message accepted for delivery
The example omits credentials. In a real session, the client should use an authentication mechanism the server permits and should never expose a password in plaintext. TLS protects the authentication exchange across that connection. It does not make weak credentials safe, eliminate account takeover risk, or verify that the message content is legitimate.
Message transfer begins after authentication succeeds. It can also begin after the second EHLO when the server accepts unauthenticated mail, such as inbound delivery for its own domains. The client submits the envelope sender with MAIL FROM and identifies one or more envelope recipients with RCPT TO. It transmits the message content after receiving the 354 response to DATA.
A final 250 response means that the server accepted responsibility for the message at that stage. It does not mean that the recipient has read the message or that final delivery is complete.
After later policy checks, the server can still bounce the message with a non-delivery report or quarantine it. It can also defer delivery after a temporary failure or relay the message to another server with a different TLS policy.
Successful TLS negotiation answers one question: whether the SMTP connection established an authenticated encrypted channel under the client’s validation policy. It does not prove that the sender is authorized to use the account or that the message passed spam and malware controls. Nor does it confirm that the recipient address exists or that every relay in the delivery path used TLS.
Reliable delivery requires evaluating the remaining SMTP responses, server logs, authentication controls, domain policy, and message-level protections together. Separating these checks keeps transport encryption in its proper place. It protects a connection, while delivery assurance depends on the controls applied before, during, and after that connection.
Which Email Protocols and Ports Does STARTTLS Use?
Understanding which protocols and ports use STARTTLS starts with separating the email protocol from the TCP port that carries it. SMTP submission, server-to-server SMTP relay, IMAP, and POP3 use different connection models and security expectations. SMTP submission commonly negotiates STARTTLS on port 587 before authenticating a user and sending outbound mail.
IMAP and POP3 can also upgrade an initially cleartext connection, although their implicit TLS ports are often preferred for mailbox access. Port numbers provide useful defaults. The server’s advertised capabilities and enforced encryption policy determine whether a connection is actually protected.

Which Email Protocols Support STARTTLS?
STARTTLS is a command or extension that upgrades an existing plaintext protocol connection into a TLS-protected session. The client connects, receives the server’s greeting, and asks which capabilities are available. If the server advertises STARTTLS, the client issues the command and the systems complete a TLS handshake. The application protocol then resumes inside the encrypted channel.
This behavior is defined for SMTP in RFC 3207, for IMAP in RFC 9051, and for POP3 in RFC 2595.
SMTP supports STARTTLS for both authenticated submission and server-to-server relay, and each use carries different security requirements. An employee’s mail client should connect to a submission service, negotiate TLS, authenticate, and transmit the message.
A mail transfer agent delivering mail to another domain typically connects to the recipient domain’s MX host over port 25. It negotiates TLS if the receiving server advertises it. That relay session can be encrypted in transit without proving that the destination server is an authorized endpoint for the recipient domain, as RFC 8461 explains.
IMAP uses the STARTTLS command to protect mailbox access on its standard service, while POP3 uses the related STLS command. The command names matter operationally. An IMAP client cannot simply send STLS, and a POP3 client cannot assume that an IMAP capability exchange applies.
For both protocols, the client should send no credentials or message contents until TLS succeeds and the certificate passes validation under the client’s configured trust policy.
The IETF’s email TLS guidance in RFC 8314 distinguishes STARTTLS from implicit TLS, where encryption begins immediately when the TCP connection opens. That distinction prevents a common configuration error. Administrators sometimes select “SSL/TLS” for a STARTTLS port. Others select “STARTTLS” for a port that expects a TLS handshake before any SMTP, IMAP, or POP3 text appears.
| Email Service | Typical Port | Encryption Model | Primary Purpose |
|---|---|---|---|
| SMTP submission | 587 | Explicit STARTTLS | Authenticated client-to-server delivery |
| SMTP submission | 465 | Implicit TLS | Authenticated client-to-server delivery with TLS first |
| SMTP relay | 25 | STARTTLS when offered, enforced only by policy | Server-to-server mail transfer |
| Alternate submission | 2525 | Usually explicit STARTTLS, provider-dependent | Submission where 587 is blocked or unavailable |
| IMAP access | 143 | STARTTLS when supported | Reading and managing stored mail |
| IMAP over TLS | 993 | Implicit TLS | Reading and managing stored mail with TLS first |
| POP3 access | 110 | STLS when supported | Downloading stored mail |
| POP3 over TLS | 995 | Implicit TLS | Downloading stored mail with TLS first |
Each STARTTLS session covers only the connection segment on which it is negotiated. A single message can use TLS between a mail client and its submission server. It can then use a separate TLS session between sending and receiving mail servers, and another when the recipient’s mail client accesses the mailbox.
Which Port Should an Organization Choose for STARTTLS?
Port 587 is the standard default for authenticated SMTP submission and commonly uses explicit STARTTLS. The client opens an SMTP connection, issues EHLO, and confirms that the server advertises STARTTLS. It then upgrades the session, validates the certificate, and only then sends AUTH. The Message Submission standard, RFC 6409, separates this client-submission function from server-to-server relay.
Port 465 normally uses implicit TLS. The client begins a TLS handshake immediately after opening the connection, and SMTP commands follow only after the encrypted session is established. RFC 8314 documents port 465 for message submission over implicit TLS.
Administrators sometimes describe port 465 as “SMTP with STARTTLS.” That wording is technically inaccurate. It can also produce failed connections when a client sends plaintext SMTP commands to a TLS-only listener.
Port 2525 is an alternate submission port used by some hosting providers, transactional email services, and cloud platforms. It is not a registered standard submission port, so its behavior depends on the provider’s configuration. In practice, port 2525 often supports explicit STARTTLS and SMTP authentication.
Administrators must still verify the provider’s documentation and require certificate validation. They should also confirm that the server refuses credentials before encryption.
Port 25 is primarily for server-to-server SMTP relay. It can advertise STARTTLS, but encryption policy varies by sender, recipient, network path, and mail server configuration. Opportunistic STARTTLS protects a connection when both systems support it. Even so, a sender might continue delivery without TLS if policy permits.
Organizations that require stronger relay assurance should use domain-level controls such as authenticated TLS policies and monitor delivery failures. A STARTTLS advertisement on one hop says nothing about whether later hops are protected.
Port selection follows a few simple rules:
- Use port 587 with STARTTLS when an application or user must authenticate and submit outbound mail.
- Use port 465 when the provider explicitly documents implicit TLS.
- Use port 2525 only when the provider specifically directs its customers to it.
- Reserve port 25 for relay traffic and keep routine user submission off it.
When Should Credentials Use an Authenticated Submission Port?
Credentials belong on an authenticated submission port, normally 587 with STARTTLS or 465 with implicit TLS. Submission services identify the client as an authorized user and apply authentication and rate controls. They also separate user-originated mail from the server-to-server relay function.
Port 25, by contrast, is designed for relay traffic between mail systems and commonly applies different authentication, filtering, and downgrade behavior.
A mail client should follow this sequence:
- Connect to the configured submission host.
- Negotiate TLS.
- Validate the certificate.
- Authenticate with SMTP AUTH.
- Submit the message.
The password must never be transmitted before TLS succeeds. The client should stop if the server does not advertise STARTTLS on port 587 or if certificate validation fails. Silently continuing in plaintext exposes the credentials.
The session should use TLS 1.2 or TLS 1.3, defined in RFC 8446, and the authentication exchange must follow the submission service’s SMTP AUTH requirements.
This rule also applies to scripts, printers, applications, and cloud workloads that send email. A device that uses port 25 with a username and password creates unnecessary exposure. The relay port may permit a plaintext fallback, and intermediate infrastructure may inspect that traffic. Configure the workload for the provider’s authenticated submission endpoint and store credentials in a managed secret system.
STARTTLS protects the client-to-submission connection, but it has no bearing on the employee’s judgment about the message being sent. Organizations still need processes that teach staff and application owners to recognize suspicious destinations, unexpected authentication prompts, and requests to bypass encryption.
Technical configuration removes one interception path. Disciplined reporting and verification address the social engineering that can follow a legitimate encrypted connection.
How Does Client Submission Differ From Inbound Mail Reception?
Client submission and inbound reception solve opposite delivery problems. Client submission moves an authenticated user’s outbound message to that user’s mail provider. Inbound reception accepts mail from another domain’s mail server and places it into the recipient’s infrastructure.
The organization controls the first relationship and should require TLS before accepting credentials or message data. The second depends on a negotiation between independently administered mail systems.
For inbound mail, the receiving domain publishes MX records, and the sending mail server connects to the destination on port 25. The receiving server may advertise STARTTLS, require it for selected senders, or allow delivery without it. That choice depends on local policy and the sender’s capabilities.
When STARTTLS succeeds, TLS encrypts that SMTP hop while the message travels between the two servers. It does not guarantee that every earlier or later hop used TLS, and it does not encrypt the message once it sits in the recipient’s mailbox. RFC 7672 describes authenticated TLS policies for SMTP.
That difference explains why a sender can see “TLS” in a delivery record while the recipient’s client still needs IMAP or webmail encryption. SMTP relay encryption protects mail in transit between servers. IMAP STARTTLS on port 143 or implicit TLS on port 993 protects the recipient’s connection while reading the stored message. POP3 STLS on port 110 or implicit TLS on port 995 protects a client that downloads messages.
Administrators should document these paths separately. Enforce STARTTLS or implicit TLS for authenticated submission, monitor port 25 for relay-policy exceptions, and require TLS for IMAP or POP3 access.
Treat each negotiated session as one protected segment. Then verify that every segment carrying credentials or sensitive mail uses certificate-validated TLS.
STARTTLS vs. TLS: What Is the Difference Between STARTTLS, TLS, and Implicit TLS?
When comparing STARTTLS vs. TLS, the key point is that STARTTLS is an application-layer command that asks an existing plaintext connection to upgrade to TLS. TLS is the cryptographic protocol that authenticates endpoints, negotiates cipher suites, and protects data in transit. Implicit TLS begins the encrypted session before the client and server exchange application commands.
Explicit and implicit TLS both protect data when configured with current TLS versions, valid certificates, and strict failure handling. Understanding what STARTTLS is at the protocol layer helps administrators choose between them.
How Are STARTTLS and TLS Related?
STARTTLS and TLS operate at different layers. TLS defines certificate authentication, key exchange, encryption, and integrity checks. STARTTLS defines how an application asks the server to activate those protections after the connection opens.
The SMTP sequence described earlier shows the relationship in practice. EHLO reveals the capability, the STARTTLS command triggers the handshake, and a second EHLO follows because the server’s capabilities can change inside the encrypted session.
RFC 3207 establishes this SMTP upgrade process. It neither replaces TLS nor defines a separate encryption algorithm. The command marks the transition between the application’s plaintext phase and its protected phase. For that reason, a connection can support STARTTLS without actually enforcing encryption.
TLS negotiates the protected session. The TLS 1.3 specification in RFC 8446 defines the handshake and record protocols used to authenticate the server and encrypt subsequent traffic. STARTTLS only determines when the application asks TLS to take control of the connection.
What Is the Difference Between Explicit and Implicit TLS?
Explicit TLS begins as an ordinary application connection and upgrades after a command or protocol signal. STARTTLS is the most common explicit TLS pattern. Because the initial connection is unprotected, the client must verify that the server advertises the upgrade. The handshake must also succeed before the client sends credentials, messages, or other sensitive data.
Implicit TLS begins with the TLS handshake immediately. The client connects to a designated TLS-enabled port, and the first meaningful protocol exchange occurs inside the encrypted tunnel. This model has no plaintext negotiation phase and no separate STARTTLS command.
| Connection Characteristic | STARTTLS or Explicit TLS | Implicit TLS |
|---|---|---|
| Connection start state | Plaintext application connection | TLS handshake starts immediately |
| Negotiation method | Application command requests an upgrade | Port and service behavior require TLS from the start |
| Common ports | SMTP submission 587, SMTP relay 25, IMAP 143, POP3 110 | SMTPS 465, IMAPS 993, POP3S 995 |
| Certificate timing | Certificate appears after the STARTTLS command | Certificate appears at connection start |
| Failure behavior | Client must reject or avoid sensitive traffic if the upgrade fails | Connection fails if the TLS handshake fails |
| Typical use | SMTP relay, port 587 submission, and protocols that support an upgrade | Modern mail submission and encrypted mailbox access |
RFC 8314 documents TLS use for mail submission and access, including implicit TLS on dedicated ports. Port numbers identify common deployment patterns, while security depends on the configuration behind them. Port 587 does not guarantee that a client will enforce STARTTLS, and port 465 does not make a weak TLS configuration safe.
Administrators must configure certificate validation, minimum protocol versions, hostname checks, and authentication policies independently of the port. Explicit TLS also creates a downgrade risk. A cyberattacker positioned between the client and server can attempt to remove or alter the upgrade advertisement, a technique commonly called STARTTLS stripping.
Policy enforcement closes that gap. Require TLS for sensitive connections, treat a missing upgrade capability as a failure, and never transmit credentials after an unsuccessful handshake.
Implicit TLS removes the plaintext negotiation window, but certificate and protocol risks remain. A client can still accept an untrusted certificate, permit obsolete cipher suites, or use an insecure fallback if its configuration is weak. The security outcome depends on validation and failure behavior as much as on whether encryption starts immediately.
How Does STARTTLS Compare With SSL/TLS Terminology?
SSL and TLS describe successive generations of transport encryption protocols. SSL 2.0 and SSL 3.0 are obsolete and must remain disabled. TLS 1.0 and TLS 1.1 are deprecated, so current systems should disable them.
TLS 1.2 remains widely deployed and supports secure configurations when administrators select approved cipher suites and disable weak options. TLS 1.3 is the current generation. It simplifies the handshake and removes several legacy cryptographic choices. RFC 8446 defines that modern protocol version, but services still need correct certificate validation and version policies.
The phrase “SSL/TLS” persists because products, documentation, and configuration screens often use SSL as shorthand for encrypted transport. Technically, current services should use TLS exclusively. Calling a port “SSL” does not prove that it accepts SSL 3.0. Likewise, calling a service “TLS” does not prove that it rejects deprecated protocols.
A concise historical sequence clarifies the terminology:
- SSL 2.0: An early protocol with serious design weaknesses. It should remain disabled.
- SSL 3.0: An obsolete version vulnerable to known cyberattacks. It should remain disabled.
- TLS 1.0: The first TLS generation, now deprecated and unsuitable for modern deployments.
- TLS 1.1: An incremental revision that is also deprecated and should stay disabled.
- TLS 1.2: A widely deployed version that requires careful cipher-suite and certificate configuration.
- TLS 1.3: The current protocol generation and preferred choice when both endpoints support it.
STARTTLS can use TLS 1.2 or TLS 1.3. It does not force an application to use an old protocol, and it cannot push a server past the versions its configuration allows. Mail administrators should inspect the negotiated TLS version, since the STARTTLS keyword alone does not indicate which version is in use.
Which Encryption Model Should Organizations Use?
The right choice depends on protocol support, client compatibility, and whether the organization can enforce failure when encryption is unavailable. Implicit TLS provides a clearer security boundary because the connection is encrypted before application commands or credentials are exchanged. STARTTLS remains necessary for SMTP relay and other services designed around an in-band upgrade. Organizations should make it mandatory wherever sensitive data is involved.
For SMTP submission, clients should connect to the service designated for authenticated sending, validate the server certificate, and require TLS. They should also refuse to send credentials if the upgrade fails.
Server-to-server SMTP requires additional planning because delivery partners vary in their TLS support. A strict policy protects internal traffic. However, it can affect delivery to external domains that do not meet the required standard, so mail teams need monitoring and documented exception handling.
For IMAP and POP3, implicit TLS creates a clearer default because the client knows before connecting that encryption is required. STARTTLS can still protect these protocols when both sides enforce the upgrade and reject plaintext continuation.
In either model, administrators should disable SSL 2.0, SSL 3.0, TLS 1.0, and TLS 1.1. They should prefer TLS 1.3, retain TLS 1.2 only where necessary, and remove insecure fallback behavior.
Most employees cannot reliably determine from an email whether a mail connection used STARTTLS or implicit TLS, so technical controls must enforce the requirement. Security teams can reinforce that control with phishing simulations that train employees to recognize unsafe message behavior. Those scenarios include requests to bypass verification or move sensitive communication to an unapproved channel.
Why Is STARTTLS Important for Email Security, and What Are Its Limits?
STARTTLS protects email while it travels between mail servers, but it does not guarantee encryption on every connection or confidentiality from end to end. When a sending server negotiates TLS successfully, network observers cannot read the message content in transit.
When negotiation fails under an opportunistic policy, the server can fall back to plaintext and expose the same message. The IETF’s SMTP service extension for STARTTLS, MTA-STS, and DANE address different parts of this trust problem.
How Does STARTTLS Provide Hop-to-Hop Encryption?
STARTTLS creates hop-to-hop encryption between two SMTP systems. A sending mail transfer agent, or MTA, connects to the recipient’s MTA and asks whether the destination supports the STARTTLS command. If the destination advertises that capability, the sender requests TLS and completes a TLS handshake. It then validates the certificate according to its policy and transmits the SMTP session through the encrypted channel.
That protection matters because SMTP messages often cross several independent systems. A message might move from an employee’s mail client to the organization’s outbound MTA and through one or more relay services. It finally reaches the recipient’s inbound MTA.
STARTTLS can protect each individual connection, but the protection ends whenever one hop terminates TLS and begins another connection. The receiving server, relay provider, and sending server can still access the message in plaintext while processing it.
Encryption therefore protects data on the network connection, while the delivery chain as a whole needs other controls. A cyberattacker monitoring an untrusted network segment cannot simply read a successfully encrypted SMTP session. A compromised relay, a misconfigured MTA, or an authorized mail administrator can still inspect the message.
STARTTLS also does not hide all email metadata. The message body and most header content travel inside the encrypted SMTP session after TLS begins. Mail systems and network observers can still learn the sending and receiving IP addresses, connection timing and volume, domains involved in routing, and the path between MTAs.
Subject lines, sender information, and recipient information receive stronger protection during a properly encrypted SMTP hop. Even so, every system that routes, stores, or processes the message can still read them.
What Are the Downgrade and Man-in-the-Middle Risks?
The central weakness of opportunistic STARTTLS is that encryption is negotiated after the initial SMTP connection begins. A server first announces its capabilities, including whether it supports STARTTLS.
A cyberattacker positioned between two MTAs can interfere with that exchange by removing or altering the capability advertisement. The same cyberattacker can also disrupt the TLS negotiation. Either move can cause the connection to continue without encryption if the sender accepts plaintext fallback.
This is a downgrade attack. The cyberattacker does not need to break modern TLS cryptography. The goal is to prevent the two servers from using TLS in the first place. Suppose the sending MTA reaches a server that does not advertise STARTTLS, and its policy permits delivery without encryption. It can then transmit the message as plaintext while logging only a warning or giving no indication at all.
A man-in-the-middle attack creates a second risk even when both systems support STARTTLS. The cyberattacker attempts to impersonate one endpoint, intercepts the connection, and presents a certificate that the other endpoint accepts.
Proper certificate validation and hostname verification block this tactic. The certificate must chain to a trusted authority, match the intended mail host, and satisfy the MTA’s configured policy. Between MTAs, the intended host name usually comes from an unauthenticated MX lookup, so these checks become meaningful only when MTA-STS or DANE authenticates that name.
A certificate that is merely present does not prove that the connection is secure. The sending MTA must check the certificate’s validity period, trusted issuer, intended use, and identity. Hostname verification must compare the certificate’s subject or subject alternative name with the server name the sender intended to reach.
A self-signed certificate can encrypt traffic against casual observation. It establishes identity only if the organization has separately distributed and trusted that certificate or its private certificate authority. On enforced or policy-protected routes, administrators should keep certificate validation enabled even when it interrupts mail flow. Disabling it there preserves the appearance of encryption while allowing a cyberattacker with a forged or self-signed certificate to intercept the session.
A safer policy records certificate errors and rejects high-risk connections. It also provides a controlled exception process for partners that cannot meet the organization’s trust requirements.
Capability discovery also needs policy protection. The IETF’s email applicability draft describes STARTTLS as a confidentiality mechanism between mail servers while addressing downgrade risks and the limits of policy discovery. A server that supports STARTTLS differs from a server that is required to use authenticated TLS.
What Is the Difference Between Opportunistic and Enforced TLS?
Opportunistic TLS means the sender attempts to encrypt the SMTP connection but can deliver without TLS if negotiation fails. This approach improves security when both systems cooperate, yet it prioritizes message delivery over confidentiality. It remains common across the public email ecosystem because organizations cannot assume that every external domain supports enforced encryption.
Enforced TLS changes the decision. The sender refuses delivery when the destination cannot present an acceptable TLS connection or when certificate validation fails. The same applies when the negotiated connection does not meet the required policy. This prevents plaintext fallback but creates delivery failures when the recipient’s mail system is unavailable, misconfigured, or incompatible.
The correct policy depends on the message and recipient. General business email may use opportunistic TLS across the open internet. Regulated records, financial instructions, and sensitive legal material should use an approved encrypted-message workflow or a partner-specific enforced-TLS policy. Security teams should avoid resolving the availability tradeoff by silently accepting invalid certificates or plaintext for every recipient.
MTA-STS raises protection above default opportunistic behavior. It allows a receiving domain to publish a policy that tells sending MTAs which mail hosts are valid and whether TLS is required. A sender that has retrieved and trusted that policy can refuse delivery when it cannot establish an authenticated encrypted connection. MTA-STS is especially useful when an organization wants a deployable policy that does not depend on DNSSEC.
The IETF MTA-STS specification defines a testing mode and an enforce mode. Deployment should include SMTP TLS Reporting (RFC 8460), monitoring, and a controlled move from testing mode to enforce mode.
DANE (DNS-based Authentication of Named Entities) for SMTP uses DNSSEC-signed TLSA records to bind a mail server’s TLS identity to DNS. When the recipient domain publishes signed TLSA records and the sender validates DNSSEC, the sender can authenticate the destination through the DNSSEC-protected record. That removes sole reliance on the public certificate authority system.
The IETF DANE for SMTP specification defines how this authentication works and where deployment dependencies remain.
Each control carries its own dependencies. MTA-STS depends on policy discovery and cached policy state, while DANE depends on DNSSEC deployment and compatible mail infrastructure. Organizations should inventory external partners, publish accurate MX records, monitor TLS failures, and test enforcement before rejecting production mail.
Why Does STARTTLS Not Provide End-to-End Confidentiality?
STARTTLS secures a connection between two SMTP endpoints. The message itself, from the sender’s authoring device to the recipient’s reading device, needs separate protection. Once an MTA receives the message, it can decrypt, scan, queue, route, and store the content. The next MTA must establish its own TLS session, and the final mail server may store the message in readable form after delivery.
That architecture creates several boundaries where confidentiality ends. A cloud mail provider can inspect the message for spam and malware. A forwarding service can receive and reprocess it. An administrator with authorized access can retrieve it from a mailbox. A compromise of any participating mail system can expose content that STARTTLS protected only during transit.
Message-level encryption addresses that gap by encrypting the content before SMTP transport begins. The recipient’s private key decrypts the message after delivery, so intermediate mail systems handle only an encrypted body. Standards such as S/MIME and OpenPGP, compared in this S/MIME vs. PGP guide, are the usual options.
This approach introduces key-management, recovery, and usability requirements. It is still the appropriate control when the sender must prevent intermediaries from reading the body. A breakdown of the types of email encryption and a guide to end-to-end email encryption cover those tradeoffs in more depth.
Metadata remains a separate concern, as the hop-to-hop discussion above shows. Timing, connection volume, domain relationships, and routing details can reveal business activity even when the body is encrypted. Organizations handling sensitive communications should minimize unnecessary recipients, use dedicated secure-mail workflows, and keep confidential facts out of subject lines.
STARTTLS blocks passive inspection on protected SMTP hops and establishes a safer default for ordinary email delivery. Its limits matter just as much: opportunistic negotiation permits plaintext fallback, weak validation permits impersonation, and hop-to-hop encryption leaves content exposed at trusted mail systems.
A defensible email policy combines validated TLS with MTA-STS or DANE where practical and enforced TLS for high-value partners. It adds message-level encryption for confidential content and employee training that treats unexpected delivery failures or certificate warnings as signals to report.
How to Configure STARTTLS on Mail Servers
To configure STARTTLS on mail servers, separate inbound mail transport from authenticated message submission and install a complete certificate chain. Then set a current TLS policy and test both successful encryption and deliberate failure.
Apply platform-specific settings to Postfix, Exim, Sendmail, or Microsoft Exchange. Move from opportunistic TLS to enforced TLS in stages, one delivery path at a time. The critical checkpoint is requiring encryption for authenticated users without assuming that every external mail destination supports it.

1. Decide Which SMTP Services Require TLS
STARTTLS is a negotiation mechanism that covers only one part of a complete mail security policy. A server advertises the STARTTLS capability in its SMTP response. The client can then request a TLS handshake before authentication or message transfer. If the client does not request TLS, the connection can remain plaintext unless the server policy rejects it.
Separate the primary SMTP roles:
- Message submission: Employee mail clients and applications submit messages through port 587 with STARTTLS or port 465 with implicit TLS, usually with SMTP AUTH. Require TLS before authentication and refuse plaintext authentication.
- Inbound SMTP: Other mail servers deliver messages to port 25. Advertise STARTTLS and prefer encrypted transport, but decide explicitly whether the organization can reject senders that do not support TLS.
- Internal relay: Applications, scanners, and line-of-business systems often need a restricted relay path. Give each trusted system a defined source range, certificate identity, or authenticated account. Avoid allowing broad unauthenticated relay.
The separation matters because authenticated submission carries credentials and often sensitive outbound content. Inbound SMTP is different because remote organizations control the sending servers. A mandatory TLS rule on port 25 can therefore delay or reject legitimate mail from senders that have not deployed TLS.
The IETF’s RFC 8314 guidance on encrypted mail submission treats cleartext access as obsolete and supports dedicated encrypted submission services. Administrators still need a deliberate policy for server-to-server delivery.
2. Install and Protect the Certificate and Key
A trusted certificate allows clients to verify that they reached the intended mail service. Issue the certificate for every public SMTP name used by clients or peer servers, such as smtp.example.com and mail.example.com. A certificate issued for the wrong hostname encrypts the connection but fails identity validation, so clients receive a certificate warning.
Install the server certificate, its private key, and the intermediate certificates required to build a complete trust chain. Configure the server to present the chain in the correct order, with the leaf certificate first and intermediates following it.
Keep the private key out of web directories, configuration repositories, backups readable by ordinary users, and process accounts with unnecessary access. Restrict permissions to the mail service account and the administrators responsible for certificate operations.
Certificate automation belongs in the operational design. Certbot or another ACME client can renew the certificate before expiration. Renewal remains incomplete until the mail service reloads the new certificate and administrators confirm that the active process has stopped presenting the old one.
Use a post-renewal hook to perform a graceful reload. Then test the certificate chain, hostname, and expiration date from outside the server. A failed reload can leave the service presenting an expiring certificate even though the automation job reports success.
3. Apply the Policy to Postfix, Exim, and Sendmail
Postfix divides TLS configuration between the SMTP server and client roles. On the inbound service, configure the certificate and key, and choose whether STARTTLS is offered or required. Set the minimum protocol version and cipher policy there as well.
Experience the Adaptive platform
Take a free tourOn the outbound client, define whether TLS is preferred or required for selected destinations, and whether the peer certificate must be verified. Keep relay authorization separate from TLS. Encryption does not prevent open relay behavior, so relay restrictions still need explicit recipient and sender controls.
Exim uses TLS options on the SMTP transport and listener, with separate controls for incoming connections and outgoing deliveries. Configure the certificate and private key on the daemon. Advertise STARTTLS only when the service can complete a valid handshake, and require TLS before accepting SMTP AUTH.
For outbound delivery, distinguish ordinary opportunistic encryption from domains that require verified TLS. A remote server that offers a certificate for the wrong name should never count as authenticated merely because the connection is encrypted.
Sendmail also requires distinct settings for server-side TLS, client-side TLS, certificates, authentication, and relay access. Confirm that the daemon advertises only the capabilities intended for each listener. A public port 25 listener should expose authenticated submission only if its access controls are designed for it. A submission listener should require TLS before accepting credentials and apply tighter rate, sender, and recipient controls.
Across all three Unix mail systems, set a minimum TLS version that the operating systems and client population support. Disable obsolete protocols, and review the cryptographic libraries actually installed before changing cipher settings. Prefer maintained platform defaults when they enforce current TLS versions and authenticated encryption.
The practical test has three parts. A client using an obsolete protocol should fail, a client using a current protocol should succeed, and an unauthenticated host should be unable to relay mail.
4. Configure Microsoft Exchange by Connector and Service
Microsoft Exchange applies mail flow behavior through receive connectors, send connectors, and client access settings. Treat each connector as a separate trust boundary. An internet-facing receive connector should accept inbound SMTP without granting relay privileges.
A connector for authenticated clients or internal applications should restrict permitted source addresses or authentication methods. It should also require TLS before accepting credentials or messages.
Configure the certificate assigned to the Exchange SMTP service and verify that its subject or SAN entries match the names used by clients and partner systems. Review receive connector authentication mechanisms, permission groups, and protocol logging together.
A connector can have a valid certificate and still fail policy. That happens when it advertises AUTH before TLS, permits anonymous relay, or accepts connections from an overly broad network range.
Send connectors control outbound delivery. Use opportunistic TLS for general internet delivery when preserving mail flow is the priority. Configure partner-specific or domain-specific TLS requirements when the recipient organization has an established policy. Where certificate validation is required, verify the remote name and chain. A successful STARTTLS negotiation alone does not prove the recipient’s identity.
5. Enforce TLS for Submission Without Plaintext Fallback
Authenticated users should never submit credentials over plaintext. On port 587, configure the server to reject AUTH until STARTTLS has completed. Then test with a client that attempts authentication before encryption. The expected result is a clear failure with no silent downgrade. Disable weak authentication methods that expose reusable passwords when stronger options are available.
“STARTTLS required before authentication” and “every message must use TLS” are separate rules. The first protects credentials on the submission service. The second governs message delivery after the server accepts the message.
For internal relays and high-sensitivity applications, require TLS in the connection policy and authenticate the sending system with narrowly scoped credentials or certificates. Keep relay permissions independent so that a TLS-capable but unauthorized host remains unable to send through the organization.
Review advertised capabilities regularly. Repair a broken certificate, missing intermediate, or incompatible protocol policy promptly when it causes handshakes to fail. Withdrawing the STARTTLS advertisement is at most a short-term measure, because it removes the opportunity for an encrypted connection.
Monitor SMTP logs for failed handshakes, authentication attempts before TLS, protocol downgrades, and unexpected relay attempts.
6. Handle Destinations That Do Not Support TLS
A universal mandatory TLS rule on outbound port 25 can create delivery failures because the sender does not control the recipient’s mail infrastructure. For ordinary internet delivery, use opportunistic TLS and record whether the remote server offered STARTTLS. Server-to-server SMTP does not require SMTP AUTH, so keep credentials off that channel.
Use enforced TLS for defined destinations such as regulated partners, financial institutions, healthcare organizations, or internal domains with a documented requirement. Maintain an exception process that names the destination, business owner, data classification, and expiration date. If a domain that should require TLS stops offering it, queue the message and alert the owner. Silent fallback to plaintext should never be an option there.
For highly sensitive exchanges, use a separate mechanism such as a secure portal, managed file transfer, or organization-wide mail encryption service.
7. Roll Out Enforcement in Stages
A staged rollout preserves delivery while producing evidence for the final policy. Inventory every SMTP listener, submission client, application relay, certificate name, authentication method, and external partner that sends or receives mail. Confirm that port 587 and any port 465 service require encryption before authentication, while port 25 logs whether remote systems offer STARTTLS.
Run the policy in monitoring mode before enforcing rejection. Measure failed handshakes, certificate errors, obsolete client attempts, destinations that never advertise STARTTLS, and systems that authenticate incorrectly. Fix certificate chains, application libraries, and old client configurations before enforcement.
A high handshake success rate is insufficient evidence of readiness. A single untracked scanner or finance application can become a delivery outage when the policy changes.
Enforce TLS for authenticated submission and internal relay paths after those issues are resolved. Apply mandatory TLS to named partner domains and sensitive workflows once those paths remain stable. Keep general internet delivery opportunistic unless organizational policy, regulation, or a contractual requirement justifies rejecting destinations that do not support TLS.
Schedule recurring checks after every mail server upgrade, certificate renewal, and cryptographic library change. Test both positive and negative cases, including valid, invalid, and expired certificates, missing intermediates, current and obsolete TLS, authentication before TLS, and unauthorized relay.
Recurring tests turn STARTTLS from a checkbox into an operating policy. That policy protects credentials, preserves necessary delivery, and exposes failures before users discover them.
How to Test and Troubleshoot STARTTLS Safely
To test STARTTLS safely, inspect the SMTP greeting and EHLO response and initiate TLS with OpenSSL. Then validate the certificate against the intended hostname and diagnose authentication and delivery separately.
Use Netcat or Telnet only to inspect plaintext SMTP dialogue. Never transmit credentials, message content, or production mail during testing. A successful TLS handshake proves that encryption was established. Whether the server will authenticate the client or deliver a message is a separate question.
1. Check the SMTP Dialogue Before Enabling TLS
Start by identifying the correct server and port. SMTP submission commonly uses port 587 with STARTTLS, while port 25 is primarily used for server-to-server delivery and often has different authentication and policy rules. Port 465 normally begins with TLS immediately, so it does not use the same STARTTLS sequence.
OpenSSL can perform the SMTP upgrade and negotiate TLS in one command, which makes it the most practical starting tool:
openssl s_client \
-starttls smtp \
-connect smtp.example.com:587 \
-servername smtp.example.com \
-crlf \
-showcerts
Replace the hostname and port with an authorized test endpoint. The -starttls smtp option tells OpenSSL to begin with a plaintext SMTP greeting, issue the protocol commands required to request TLS, and negotiate an encrypted session. The -servername option sends the hostname through Server Name Indication, which matters when multiple SMTP services share one IP address.
OpenSSL handles the plaintext greeting and EHLO silently and reports an error if the server does not offer STARTTLS. If that happens, stop. Avoid typing STARTTLS repeatedly or sending AUTH or MAIL FROM commands to force progress.
A missing advertisement usually points to one of four causes: the wrong port, a server configuration problem, a policy that disables encryption for that listener, or a middlebox altering the dialogue.
Netcat can display the pre-TLS exchange. The short pauses let the server send its greeting first, because some mail servers drop clients that speak too early:
(sleep 2; printf 'EHLO diagnostic.example\r\n'; sleep 2; printf 'QUIT\r\n') | \
nc -v smtp.example.com 587
Telnet provides the same visibility when Netcat is unavailable:
telnet smtp.example.com 587
EHLO diagnostic.example
QUIT
In the output, look for a 220 greeting followed by an EHLO response containing 250-STARTTLS. Use a domain the organization controls in the EHLO argument. These commands should stop after the server advertises its capabilities. Never paste a password, token, recipient address, message body, or real customer data into an interactive SMTP session. The SMTP STARTTLS command specification defines the server advertisement and client upgrade sequence.
A failed connection before the greeting indicates DNS resolution, routing, firewall, or service availability trouble. A greeting followed by a timeout after EHLO points more strongly to a firewall, proxy, or inspection device interfering with the session. Compare results from an approved internal host and an approved external test location, but keep both tests read-only.
2. Validate the TLS Certificate and Hostname
A TLS handshake can succeed while the connection remains unsafe for the hostname the application intended to reach. Certificate validation must answer two separate questions. Does the client trust the certificate, and does the certificate identify the SMTP hostname?
Run OpenSSL with explicit verification:
openssl s_client \
-starttls smtp \
-connect smtp.example.com:587 \
-servername smtp.example.com \
-verify_hostname smtp.example.com \
-verify_return_error \
-crlf
Check the output for “Verify return code: 0 (ok),” the certificate chain, the negotiated protocol, and the cipher. Inspect the certificate identity and validity dates separately:
openssl s_client \
-starttls smtp \
-connect smtp.example.com:587 \
-servername smtp.example.com \
-showcerts </dev/null 2>/dev/null | \
openssl x509 -noout -subject -issuer -dates -ext subjectAltName
The hostname must appear in the certificate’s Subject Alternative Name field. A certificate issued to mail.example.net does not automatically authenticate smtp.example.com, even if both names resolve to the same server. An expired certificate, incomplete chain, or hostname mismatch requires server-side correction. An unknown private issuer may instead require a properly managed client trust store.
A “Verification: OK” line does not confirm that the certificate matches the hostname or that the server will accept authentication and relay mail. In some OpenSSL workflows, that line describes certificate-chain verification under the supplied options. It does not prove that the certificate matches the hostname or that the intended trust store was used. Nor does it show that the SMTP server will accept authentication and relay mail.
A misleading success result often has one of four causes:
- Testing without -verify_hostname.
- Using a workstation with an outdated or custom trust store.
- Omitting -verify_return_error.
- Connecting through a proxy that presents its own inspection certificate.
Compare the issuer and Subject Alternative Name with the certificate the mail administrator expects. If a corporate proxy signs traffic, confirm that its inspection certificate is authorized for the test environment. The application should trust the approved enterprise root, and verification should stay enabled.
OpenSSL also allows protocol-specific testing:
openssl s_client \
-starttls smtp \
-connect smtp.example.com:587 \
-servername smtp.example.com \
-tls1_2 \
-verify_hostname smtp.example.com \
-verify_return_error
Repeat with -tls1_3 only when the service and client support it. Errors such as “no protocols available,” “wrong version number,” or “handshake failure” can indicate an unsupported TLS version or a cipher-policy mismatch. They can also mean the test started TLS immediately against a STARTTLS port or used -starttls against an implicit-TLS port such as 465.
Keep production encryption settings intact when a diagnostic command fails. Test the versions the organization permits, then correct the endpoint or client configuration.
3. Diagnose Authentication After the Handshake
Once OpenSSL reports a negotiated protocol and cipher, the TLS layer has completed. Authentication is a separate SMTP stage. A “535 Authentication credentials invalid” response usually points to the account, password, OAuth token, authentication mechanism, tenant policy, or submission configuration. STARTTLS is rarely the cause.
Test credentials in OpenSSL only when the mail administrator has provided a controlled, nonproduction account and an approved method. OpenSSL’s interactive commands can expose sensitive data in terminal history, screen recordings, process logs, or support transcripts. A safer test uses the organization’s mail client or a dedicated test harness that suppresses message content and limits access to a disposable account.
If authentication fails after a valid handshake, confirm the following:
- The client is using the submission hostname and port assigned to authenticated sending.
- The account is allowed to use SMTP submission.
- The authentication mechanism is enabled and compatible with the client.
- A multifactor authentication requirement, missing app password, OAuth enforcement, or conditional access policy is not blocking the login.
- The client is not attempting authentication before STARTTLS.
- The server is not requiring a different sender identity or tenant-specific endpoint.
A successful login still does not prove delivery. The server can accept authentication and reject the envelope because of sender restrictions, recipient policy, relay controls, rate limits, or anti-abuse rules.
4. Trace Delivery After a Successful Handshake
Delivery troubleshooting begins only after transport security and authentication have passed. Send one harmless test message from a controlled account to a controlled mailbox. Then record the SMTP response codes, queue identifier, timestamp, sender, recipient, and destination domain. Never include confidential content, customer data, or active credentials.
A message accepted with a 250 response can still be queued for later processing. Inspect the sending system’s queue and logs for deferred delivery, retry intervals, DNS failures, connection refusals, TLS negotiation errors, and remote policy responses.
A 421 or 451 response generally signals a temporary condition. A 550, 551, 553, or 554 response usually requires correction to the sender, recipient, DNS, authentication, reputation, or policy configuration.
Check DNS independently:
dig +short MX recipient.example
dig +short A smtp.example.com
dig +short AAAA smtp.example.com
An absent or incorrect MX record, stale DNS data, unreachable IPv6 route, or firewall block can prevent delivery even when STARTTLS works correctly. If only one network path fails, compare IPv4 and IPv6 connectivity and review outbound firewall rules.
If the receiving organization rejects the message after the handshake, read the complete enhanced status code and remote explanation. A certificate fix will not necessarily resolve a policy rejection.
Inspect the delivered message’s full headers in the recipient mailbox. Look for Received fields that identify the transport path and TLS details, along with Authentication-Results fields for SPF, DKIM, and DMARC. Header evidence describes what the receiving system observed. It cannot replace server logs or prove that every hop used the same protection.
Preserve the original headers without forwarding or editing them, because forwarding can add new hops and obscure the delivery path.
For repeatable testing, document the endpoint, port, DNS result, certificate subject, issuer, expiration date, and Subject Alternative Name. Record the negotiated TLS version, authentication outcome, SMTP response codes, queue state, and delivered-header evidence as well. Separating transport, identity, authentication, and delivery keeps each failure tied to the control that can correct it.
How Can Organizations Monitor STARTTLS Across Multiple Mail Servers?
Monitoring STARTTLS takes more than checking whether a mail server advertises the command. Administrators should build a control set that measures advertisement, negotiation, certificates, authentication, queue behavior, routing, and plaintext fallback across every domain, relay, and mail platform.
Centralize redacted telemetry and test each route with synthetic probes. Revalidate the full path after migrations, DNS changes, firewall edits, and certificate renewals. Those practices fit within a broader email security monitoring program.

1. Monitor STARTTLS Availability and Certificate Health
Create an inventory of every SMTP endpoint. Record its role, hostname, domain, provider, IP address, listening port, certificate authority, and expected TLS policy.
Separate internet-facing mail transfer agents from internal relays, submission servers, filtering gateways, backup MX hosts, and application notification services. A server that is secure on port 587 can still expose a weak path through an overlooked relay on port 25.
Run scheduled checks against each endpoint and compare the observed result with its approved baseline. Monitoring should capture:
- STARTTLS advertisement after EHLO
- TLS handshake success rate
- Negotiated TLS version and cipher
- Certificate expiration and chain validity
- Certificate hostname mismatch
- Authentication failures
- Queue age and delivery latency
- Remote rejection codes
- Plaintext fallback attempts
- Delivery success by route, domain, relay, and port
A missing STARTTLS advertisement is a configuration event that deserves investigation beyond a single failed probe. On port 25, opportunistic TLS depends on the receiving server advertising STARTTLS, while submission services should require TLS before accepting credentials.
RFC 8314 requires mail submission and access servers to support TLS 1.2 or later. A session that still negotiates an older version points to a client or server that needs remediation.
Certificate monitoring must test the name that the SMTP client actually uses. A certificate can be valid, unexpired, and issued by a trusted authority while still failing. That happens when the client connects to smtp.example.com and the certificate covers only mail.example.com. Alert before expiration, and also alert on chain changes, unexpected issuers, SAN changes, and a sudden shift from the approved TLS version.
2. Collect Safe Logs and Route-Level Metrics
Centralized telemetry turns isolated SMTP failures into an operational picture. Collect SMTP conversation status codes, MTA delivery logs, TLS negotiation fields, authentication outcomes, and DNS resolver logs. Add firewall connection events, reverse proxy or mail gateway logs, and queue manager records.
Capture connection time, source and destination, route identifier, message status, retry count, response code, TLS result, and policy decision. Leave message content out of the collection.
Redact or hash envelope identifiers where practical. Exclude message bodies, subject lines, attachment names, authorization headers, passwords, OAuth tokens, private keys, and full authentication payloads. Preserve only the minimum recipient and sender metadata needed to troubleshoot routing, access controls, and delivery.
Apply retention limits and role-based access, because mail telemetry can reveal business relationships even when content is absent.
Normalize fields across platforms so administrators can compare a cloud relay with an on-premises MTA. A useful event record identifies the sending service, receiving endpoint, port, TLS state, certificate result, authentication result, queue age, and final disposition.
Dashboards should show trends by domain and route alongside organization-wide averages. A healthy aggregate can conceal one failing subsidiary, newly acquired domain, or backup relay that handles only high-value traffic.
Investigate correlated changes. A rise in handshake failures alongside certificate mismatch events points to identity or renewal problems. Successful TLS negotiation followed by queue growth points toward routing, reputation, throttling, or downstream acceptance issues.
Authentication failures concentrated on port 587 require a different response from remote rejection on port 25. That holds even when both appear as delivery failures in a high-level dashboard.
3. Validate Ports, Firewalls, and Connectivity Paths
Port policy must reflect the function of each service. Permit outbound and inbound TCP 25 only where mail transfer is required, and restrict it to approved mail servers, relays, and provider ranges. Use TCP 587 for authenticated message submission and require STARTTLS before authentication.
Reserve port 465 for implicit TLS submission when the platform and provider explicitly support it. Treat port 2525 as a provider-specific submission or relay port. Document its encryption and authentication requirements, and avoid assuming it behaves like port 587.
Firewall and proxy reviews should confirm that security controls leave the EHLO response intact and allow the TLS handshake. They should also confirm that no control terminates TLS unexpectedly or permits an unencrypted retry after a failed negotiation.
Record the intended path from application to relay, relay to filtering service, and filtering service to recipient MX. Test both directions where the organization operates multiple domains or regional mail platforms.
DNS belongs in the same control set. Monitor MX records, A and AAAA records, reverse DNS, SPF, DKIM, DMARC, and any MTA-STS policy used to declare transport expectations.
RFC 8461 defines MTA-STS as a mechanism for mail service providers to declare their ability to receive TLS-protected mail. A DNS or policy change can therefore alter delivery behavior even when the MTA configuration stays the same.
Synthetic probes should test representative routes without sending real business content. Use controlled mailboxes and harmless test messages. Verify that port 25 delivery negotiates the expected TLS version and that port 587 rejects authentication before TLS.
Confirm as well that port 465 completes implicit TLS and that port 2525 follows the provider’s documented behavior. Store only probe identifiers, timestamps, route results, and transport metadata.
4. Revalidate Every Change and Migration
A mail server migration is incomplete until administrators validate the old and new paths from outside the organization. Before cutover, record the baseline for STARTTLS advertisement, handshake success, certificate identity, queue age, delivery status, and remote rejection.
After changing MX, DNS, firewall, proxy, certificate, or relay settings, rerun the same probes from multiple networks. Confirm that every intended route reaches the new endpoint.
Use change control gates that require four checks before closure:
- Confirm DNS propagation and resolver results.
- Verify certificate names and chain validation from actual client and relay locations.
- Send synthetic messages through each approved port and route.
- Inspect logs for plaintext fallback, authentication failures, queue growth, and remote rejection over the next delivery cycle.
Keep the previous configuration available for rollback, but remove obsolete relays once they are no longer needed. Delete stale firewall rules, old certificates, unused MX records, and credentials after the new path is stable.
The final operational record should identify who approved the change, which endpoints were tested, what TLS policy was observed, and which exceptions remain. That record makes STARTTLS a measurable control that auditors and administrators can verify.
How Does STARTTLS Support Healthcare Email and Compliance Programs?
STARTTLS reduces exposure of electronic protected health information (ePHI) while it travels between mail systems. By itself, it neither provides end-to-end encryption nor satisfies every HIPAA safeguard. When sending and receiving mail servers successfully negotiate TLS, the SMTP session is encrypted in transit.
If negotiation fails or is bypassed, message content can travel without that protection. Healthcare organizations must therefore document delivery controls, assess insecure paths, and treat STARTTLS as one part of a compliance program.
How Does STARTTLS Protect ePHI in Transit?
STARTTLS allows an SMTP connection to begin normally and switch to an encrypted TLS session before the message is transmitted. That transport encryption helps prevent interception while email moves between participating mail servers. The protection extends to messages containing diagnoses, treatment details, insurance information, lab results, or other ePHI.
The protection applies only to the encrypted connection. It does not automatically protect the sender’s mailbox, the recipient’s mailbox, backups, endpoint devices, screenshots, forwarded copies, or downstream systems. It also does not verify the recipient’s identity or prove that the message reached the correct address.
Healthcare teams should treat STARTTLS as one layer in a broader transmission-security design. Message-level encryption, access controls, identity verification, data-loss prevention, and incident response remain necessary safeguards.
Security awareness training for healthcare teams should explain when ordinary email is acceptable and when protected delivery is required. It should also cover how staff should respond to insecure-delivery warnings.
A practical policy should distinguish between opportunistic TLS and enforced TLS:
- Opportunistic TLS: Encrypts the connection when the recipient supports TLS but can allow delivery without encryption when the recipient does not.
- Enforced TLS: Blocks or reroutes delivery when the required encryption standard is unavailable.
The correct setting depends on the message’s sensitivity, the recipient relationship, contractual requirements, and the organization’s documented risk analysis. A referral or pathology report demands a stricter delivery path than a routine scheduling notice without clinical detail.
What Should Happen When a Recipient Does Not Support TLS?
A recipient that does not support the required TLS configuration creates a decision point, and sending ePHI anyway is not an acceptable default. If the message contains sensitive health information, the sender should follow a predefined fallback path that preserves confidentiality and records the decision.
Approved fallback options include:
- Enforced encrypted delivery: Hold or reject the message until the recipient’s mail system meets the organization’s TLS requirements.
- Secure portal delivery: Send a notification containing no ePHI and require the recipient to authenticate to a protected portal.
- Message-level encryption: Encrypt the message or attachment independently of the SMTP connection so the content remains protected after delivery and storage.
- Approved alternate channels: Use an authorized healthcare exchange, secure file-transfer service, or verified phone process when email is unsuitable.
Each fallback should match the sensitivity of the message. Staff should avoid ad hoc exceptions made because a request is urgent. That caution matters most when someone asks them to send a patient file despite an insecure-delivery warning. Such pressure resembles the urgency cyberattackers exploit through business email compromise (BEC), impersonation, and social engineering.
Employees need clear instructions for insecure-delivery prompts. They should stop and verify the recipient and the requested information. They should also avoid copying ePHI into personal email or unapproved messaging apps, and contact the privacy or security team when the approved route is unavailable.
Treating this pause as a professional safeguard makes the employee an active control in the transmission-security process. Employees who stop an unsafe transaction should receive support for that decision.
How Should Healthcare Organizations Document STARTTLS for Governance, Risk, and Compliance?
STARTTLS supports governance, risk, and compliance programs only when the organization can show how the control operates and how exceptions are handled. A policy should identify systems that send healthcare email and recipient domains that require enforced TLS. It should also define minimum TLS settings, messages that require message-level encryption, and approved alternate channels.
Certificate management requires separate documentation. Assign ownership for certificate issuance, renewal, deployment, validation, and revocation. Record expiration dates, monitoring responsibilities, and escalation procedures so an expired or misconfigured certificate cannot silently turn a protected route into an unprotected one.
Mail administrators should retain logs showing connection outcomes, failed negotiations, policy blocks, rerouted messages, and administrative changes. Log design should also limit unnecessary reproduction of ePHI and restrict access to authorized personnel.
Exception management should be specific and formal. Each exception should identify the recipient, business justification, data category, approved delivery method, responsible owner, expiration date, and compensating safeguard.
A standing exception for a partner that cannot support TLS should have a defined end. The risk owner should review it on a set schedule and close it when the recipient adopts encrypted delivery or the relationship ends.
The HHS HIPAA Security Rule requires covered entities to assess and implement reasonable and appropriate safeguards based on their circumstances. HHS does not make STARTTLS a universal HIPAA checkbox.
The organization must connect its configuration, monitoring, fallback decisions, and workforce procedures to the risks identified in its analysis. A practical guide to making email HIPAA compliant covers the encryption and business associate requirements in more detail.
Evidence should demonstrate operation as well as intent. Useful records include current mail-flow diagrams, TLS enforcement policies, certificate inventories, configuration reviews, and failed-delivery reports. Exception approvals, remediation tickets, periodic access reviews, and training completion records also help.
Governance teams should sample messages to confirm that sensitive categories use the approved delivery method. They should also confirm that employees understand what an insecure-delivery prompt means.
STARTTLS is most valuable inside a controlled workflow. Transport encryption reduces interception exposure between cooperating mail systems. Enforced policies, secure alternatives, certificate oversight, monitoring, and trained staff address the points where protection can fail.
How STARTTLS Fits Into Human-Layer Email Security
Human-layer email security begins where STARTTLS ends. STARTTLS encrypts email while it travels between mail systems, but it does not evaluate the person, request, or intent behind a message. As the IETF email applicability draft notes, opportunistic STARTTLS also remains vulnerable to man-in-the-middle attacks when confidentiality is not enforced.

Where Do Transport Controls End and Social Engineering Begin?
STARTTLS creates an encrypted connection between participating mail servers after the SMTP session negotiates TLS. It can prevent unauthorized parties from reading message content in transit. However, it does not authenticate the sender’s business intent or establish that the visible sender is trustworthy. A cyberattacker can send a malicious message through an encrypted connection just as easily as a legitimate sender can.
That distinction separates infrastructure protection from phishing awareness training. Transport controls govern what happens between systems. Human-layer controls determine whether an employee recognizes an unusual request and pauses before acting. They also determine whether the employee verifies the sender through a trusted channel and reports the message to security staff.
A modern phishing awareness training program should treat STARTTLS as one layer in a wider control set. Encryption offers no evidence that an email is safe. Employees need to understand that a padlock or successful TLS negotiation does not indicate whether an invoice change, password request, or executive instruction is legitimate.
Why Can Encrypted Phishing Still Be Malicious?
Encrypted phishing remains dangerous because cyberattackers exploit trust and urgency, which transport encryption does not address. A spear phishing email can use a TLS-protected connection, impersonate a supplier, and reference a real project. It can then direct an employee to a fraudulent payment account. STARTTLS does not inspect the payment request or check it against approval procedures. It also cannot detect that a message imitating an executive's writing style was generated by AI.
The same limitation applies to business email compromise (BEC). A cyberattacker can compromise a legitimate mailbox or imitate a known contact, then send messages over protected transport. The message can arrive without obvious delivery tampering while still attempting to redirect payroll, obtain tax records, or extract sensitive information.
CISA’s October 2023 phishing guidance defines phishing as social engineering that persuades people to visit malicious sites or provide information. Encryption alone therefore cannot address the full attack cycle.
AI-generated phishing emails intensify the cyberthreat by producing polished language at scale. Vishing and smishing attacks, along with synthetic executive instructions, can reinforce the same fraudulent story across multiple channels.
Employees do not need to identify cryptographic protocol details during a busy workday. They need practical signals and a clear response path. Training should teach them to verify sender identity independently and confirm payment or bank-account changes through a known phone number.
The same training should show employees how to handle unexpected attachments without opening them and how to hover over links before selecting them. It should also teach them to withhold sensitive information until the request is validated.
How Should Training Connect STARTTLS to Safer Email Decisions?
Security awareness training should explain STARTTLS in plain language, then focus on the decisions that transport encryption cannot make. A useful scenario shows an employee receiving an encrypted message that appears to come from a finance leader and requests an urgent wire transfer. The exercise should ask whether the recipient verified the instruction, followed the organization’s approval process, and reported the anomaly.
The same decision framework applies beyond email. A vishing simulation tests whether an employee trusts a familiar voice without independent verification. A smishing exercise tests whether a recipient opens a link from an unknown number.
A spear phishing scenario can use open-source intelligence (OSINT) to make a request appear relevant to the employee’s role. Each exercise reinforces the same principle: technical delivery signals cannot substitute for judgment.
Training also needs a post-delivery action. Employees should know how to report a suspicious message, preserve relevant details, and stop a payment process. They should also know how to contact the supposed sender through a trusted channel and notify security after clicking a link or sharing information.
Rapid reporting gives defenders time to contain related messages and protect colleagues who received the same campaign. A documented phishing incident response playbook turns those reports into consistent containment steps.
STARTTLS is valuable because confidential transport reduces exposure while email moves between systems. Human-layer security remains necessary because the most damaging decision often occurs after delivery. At that point, a person decides whether to trust, click, transfer, disclose, or report. Protecting both layers keeps encrypted transit from being mistaken for verified intent.
STARTTLS FAQs: Email Encryption, Ports, and TLS Security
What Is the Difference Between STARTTLS and Implicit TLS on Port 465?
STARTTLS begins as a plaintext protocol connection and upgrades it after the client sends the STARTTLS command. Implicit TLS on port 465 starts the TLS handshake before any SMTP commands are exchanged, as specified in RFC 8314. Both can provide encrypted SMTP submission when certificate validation and TLS policies are configured correctly.
STARTTLS depends on successful capability negotiation and a deliberate upgrade. Implicit TLS treats encryption as a connection requirement from the beginning. Use the mode that matches the server and client configuration. Avoid nonstandard combinations, such as STARTTLS on port 465, unless the provider explicitly documents them.
Can STARTTLS Connections Be Downgraded to Plaintext?
Yes. A STARTTLS connection can be downgraded to plaintext when a client treats missing or failed STARTTLS as an acceptable fallback. Downgrade can also happen when a cyberattacker interferes with capability discovery, as documented in RFC 8461. Prevent downgrade by requiring TLS for authenticated submission, validating certificates and hostnames, and rejecting delivery when policy requires encryption.
For server-to-server mail, MTA-STS or DANE can tell a sending system to expect authenticated TLS, which removes reliance on an unauthenticated opportunity to encrypt. Monitor SMTP TLS reports and mail logs for unexpected plaintext routes, failed handshakes, and changes in advertised capabilities. Encryption that is merely offered is weaker than encryption that policy requires.
Does STARTTLS Provide End-to-End Encryption for Email?
No. STARTTLS provides hop-to-hop transport encryption between participating mail systems. End-to-end encryption from the sender’s device to the recipient’s device requires a different mechanism. RFC 3207 defines STARTTLS as a mechanism for upgrading an SMTP connection. Protection ends when that connection ends or when a message moves across another route without equivalent TLS.
Mail servers can still process message content. STARTTLS also does not automatically conceal all routing metadata, protect a compromised endpoint, or encrypt a message stored in a mailbox. Use enforced transport policies for mail in transit. Add message-level encryption or a secure portal when confidentiality must persist across delivery and storage.
Is Port 587 Used With STARTTLS?
Yes. Port 587 commonly supports SMTP submission with explicit STARTTLS, although a provider can require a different secure configuration. RFC 6409 separates message submission from relay, and RFC 8314 describes port 587 as a STARTTLS submission service while defining implicit TLS for port 465.
Authenticated users should submit mail through the provider’s designated submission port and stay off unrestricted relay ports. Confirm the required security mode, authentication method, certificate hostname, and minimum TLS version in the provider’s documentation. Configure clients to fail when required TLS cannot be negotiated. Port numbers indicate common conventions, and the server’s advertised policy still needs checking.
Which TLS Versions Should Be Used With STARTTLS?
Use TLS 1.3 where supported and retain TLS 1.2 when interoperability requires it. Disable SSL 2.0, SSL 3.0, TLS 1.0, and TLS 1.1. NIST SP 800-52 Rev. 2 requires TLS 1.2 support for government TLS servers and clients and has required TLS 1.3 support since January 1, 2024.
Apply the same baseline to STARTTLS. Check the mail software, operating system, certificate chain, and recipient compatibility before removing TLS 1.2. Select modern cipher suites through the platform’s maintained policy, and avoid copying outdated internet examples. Track negotiated versions and failed handshakes in logs. Combined with enforced TLS, a current version baseline turns encryption from an advertised option into a controlled transport requirement.
Reduce Phishing Risk Across the Organization
Encrypted transport protects a mail path. Phishing, deepfake-enabled social engineering, and deceptive requests can still reach employees through that same protected path. A security awareness program gives employees practical ways to verify identity, links, attachments, and payment changes before acting. Take a self-guided tour of Adaptive Security’s security awareness training platform.
As experts in cybersecurity insights and AI threat analysis, the Adaptive Security Team is sharing its expertise with organizations.
Get started with Adaptive Security
Related articles

Ransomware Attacks in Healthcare: A Practical Guide to Protecting Patient Care and Operations at Scale

Email Security Platform Reporting and Analytics: How to Evaluate Visibility, KPIs and Remediation Workflows

