Skip to main content

Appendix A. TCP Transport Service

The TCP connection supports the transmission of 8-bit bytes. The SMTP data is 7-bit ASCII characters. Each character is transmitted as an 8-bit byte with the high-order bit cleared to zero. Service extensions may modify this restriction for specific purposes.

Connection Establishment

SMTP uses TCP port 25 as the standard well-known port for server connections. Message Submission uses port 587 (RFC 4409).

Connection Process:

  1. Client establishes TCP connection to server port 25
  2. Server accepts connection
  3. Server sends 220 greeting
  4. SMTP session begins

Data Transmission

Data is transmitted as a stream of 8-bit bytes. SMTP protocol elements (commands and replies) use 7-bit ASCII.

Connection Termination

After QUIT command and 221 reply:

  1. Server closes TCP connection
  2. Client receives TCP close notification
  3. Both sides release resources

Timeout Considerations

TCP keepalives or application-level timeouts should be used to detect failed connections and release resources.