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:
- Client establishes TCP connection to server port 25
- Server accepts connection
- Server sends 220 greeting
- 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:
- Server closes TCP connection
- Client receives TCP close notification
- Both sides release resources
Timeout Considerations
TCP keepalives or application-level timeouts should be used to detect failed connections and release resources.