Generated by DeepSeek V3.2| SMTP | |
|---|---|
| Name | Simple Mail Transfer Protocol |
| Developer | Internet Engineering Task Force |
| Date | August 1982 |
| Based on | Mail Transfer Protocol |
| Osi layer | Application layer |
| Port | 25, 587, 465 |
| Rfc | RFC 5321 |
SMTP. The Simple Mail Transfer Protocol is the foundational standard for sending electronic mail across Internet Protocol networks. Defined originally in RFC 821 by Jonathan B. Postel, it operates as a push protocol in the application layer of the Internet protocol suite. While clients typically retrieve messages using protocols like Post Office Protocol or Internet Message Access Protocol, SMTP is used almost exclusively for mail submission and relay between mail servers.
SMTP's development traces to the early ARPANET, evolving from the Mail Box Protocol and later the Mail Transfer Protocol. Its specification was published as RFC 821 in 1982, coinciding with the adoption of TCP/IP. The protocol was designed for plain text communication, originally relying on Network Control Program and later stable Transmission Control Protocol connections. A major revision, documented in RFC 5321, updated the standard while maintaining backward compatibility. The protocol's operation is characterized by a client–server model where an SMTP client, often termed a Mail User Agent or a relaying server, initiates a connection to an SMTP server on well-known ports like TCP port 25. The basic model involves direct server-to-server communication, though modern architectures often involve separate submission agents and Message transfer agent relays. Key entities in the framework include the Sender Policy Framework for validation and the Domain Name System using MX records to locate mail exchangers for a domain.
An SMTP session begins with the client establishing a Transmission Control Protocol connection to the server, which responds with a 220 service-ready greeting. The client then issues an EHLO or original HELO command to identify itself. The core transaction involves a sequence of commands: MAIL FROM specifies the Return-Path, RCPT TO identifies each recipient, and DATA initiates the transfer of the email message headers and body. The message termination is signaled by a sequence containing a single dot on a line. The session concludes with the QUIT command. Servers respond with three-digit numeric codes, such as 250 for success or 550 for failure. For reliability, the protocol can use intermediate Message transfer agent hosts, as defined in RFC 5321, and employs DNSBL services to reject connections from known sources of spam. The protocol's store-and-forward design allows routing through multiple Internet service provider networks.
Original SMTP lacked authentication or encryption, making it vulnerable to spoofing and eavesdropping. The Internet Engineering Task Force addressed this with extension mechanisms, defined in RFC 1869, allowing servers to advertise enhanced capabilities. A pivotal security extension is STARTTLS, which upgrades a plain text connection to an encrypted one using Transport Layer Security. For authentication, the Simple Authentication and Security Layer framework enables mechanisms like CRAM-MD5 and PLAIN, formalized in RFC 4954. SMTP-AUTH allows clients to authenticate before sending mail, combating open relay abuse. Other significant extensions include SMTPUTF8 for internationalized email addresses and Enhanced Status Codes for better error reporting. Despite these, spam remains a challenge, combated by auxiliary systems like Sender Policy Framework, DomainKeys Identified Mail, and DMARC.
SMTP is primarily for sending mail; retrieval is handled by separate protocols. The Post Office Protocol, particularly POP3, allows clients to download messages from a server, often deleting them from the server afterward. The more advanced Internet Message Access Protocol enables managing a mailbox directly on the server, supporting multiple folders and stateful operations. For web-based mail, HTTP is typically used as the client-access protocol, with SMTP operating in the backend for sending. The format of the messages themselves is defined separately by RFC 5322 for the basic Internet Message Format and MIME for carrying non-text attachments. Submission of mail from clients often uses the dedicated port 587 with SMTP-AUTH, as specified in RFC 6409, distinguishing it from port 25 used for server-to-server relay.
Virtually every email system on the Internet relies on SMTP for message transmission. Common open-source Message transfer agent implementations include Sendmail, one of the earliest; Postfix, developed by Wietse Venema; and Exim, widely used on Unix-like systems. Commercial offerings like Microsoft Exchange Server and IBM Notes also implement the protocol. Email client software, such as Mozilla Thunderbird and Microsoft Outlook, use SMTP to send messages through a configured Mail submission agent. The protocol's simplicity led to its adoption beyond traditional email, being used for system alerts and API-driven transactional email services from providers like Amazon SES, SendGrid, and Mailgun. Its enduring design, maintained by the Internet Engineering Task Force, ensures interoperability across a global network of diverse systems administered by entities like ICANN and regional Internet registries.
Category:Internet mail protocols Category:Application layer protocols Category:Internet standards