SMTP
Simple Mail Transfer Protocol: the text conversation of commands and three-digit replies over TCP that mail servers use to pass a message from one to the next, defined by RFC 5321.
What it means
SMTP moves a message one hop at a time. The sending side, the SMTP client, opens a TCP connection, introduces itself with EHLO, names the sender with MAIL FROM and each recipient with RCPT TO, then sends the message after DATA. The receiving side, the SMTP server, answers every step with a three-digit reply code, and those codes are what a bounce or a deferral quotes back to you.
The protocol was first specified in RFC 821 in 1982; RFC 5321 (2008) is the current specification. SMTP carries two things: the envelope (the addresses given in MAIL FROM and RCPT TO, used for routing and for returning failures) and the content (header and body, formatted under RFC 5322). Between servers it runs on port 25; mail programs submitting new mail use port 587 or 465.
Example
S: 220 mx.example.net ESMTP
C: EHLO mail.example.com
S: 250-mx.example.net
S: 250 PIPELINING
C: MAIL FROM:<news@example.com>
S: 250 2.1.0 OK
C: RCPT TO:<ana@example.net>
S: 250 2.1.5 OK
C: DATA
S: 354 Start mail input; end with <CRLF>.<CRLF>
C: (header and body, then a line holding a single dot)
S: 250 2.0.0 OK queued
C: QUIT
S: 221 2.0.0 ByeRelated terms
On this site
Sources
What this definition rests on. The wording is ours; the facts are theirs.
- RFC 5321: Simple Mail Transfer Protocolrfc-editor.org
- RFC 5321, section 2.3.1: Mail Objectsrfc-editor.org
All 432 terms in the glossaryThe wiki: blocklists and bounce codes