SMTP, Simple Mail Transfer Protocol

Description Glossary RFCs Publications Obsolete RFCs

Description:

Protocol suite: TCP/IP.
Protocol type:Application layer message transfer protocol.
Related protocols: ESMTP, Extended Simple Mail Transfer Protocol.
LMTP, Local Mail Transfer Protocol.
Ports:25 (TCP).
366 (TCP) ODMR, On-Demand Mail Relay.
MIME subtype:application/batch-SMTP.
SNMP MIBs:
Working groups: eai, Email Address Internationalization.
msgtrk, Message Tracking Protocol.
IANA: SMTP service extensions.
Wiki: SMTP.
Links: 

MAC header IP header TCP header SMTP message

SMTP message:

SMTP commands are ASCII strings terminated by a CRLF combination.


SMTP commands:

CommandDescriptionReferences
8BITMIMEUse 8-bit data. RFC 1652
ATRNAuthenticated TURN. RFC 2645
AUTHAuthentication. RFC 4954
BDATBinary data. RFC 3030
BINARYMIMEBinary MIME.RFC 3030
BURLRemote Content. RFC 4468
CHECKPOINTCheckpoint/Restart.RFC 1845
CHUNKINGChunking.RFC 3030
CONNEGContent Conversion Negotiation.RFC 4141
CONPERMContent Conversion Permission.RFC 4141
DATAData. RFC 2821
DELIVERBYDelivery within prescribed period.RFC 2852
DSNDelivery Status Notification.RFC 3461
EHLOExtended Hello. RFC 2821
ENHANCEDSTATUSCODESEnhanced Status Codes.RFC 2034
ETRNExtended Turn. RFC 1985
EXPNExpand RFC 2821, RFC 5321
FUTURERELEASEFuture Message Release.RFC 4865
HELOHello RFC 2821
HELPHelp RFC 2821, RFC 5321
MAILMail RFC 2821
MT-PRIORITYPriority Message Handling. RFC 6710
MTRKMessage Tracking.RFC 3885
NO-SOLICITINGNotification of no soliciting.RFC 3865
NOOPNo operation RFC 2821
ONEXOne message transaction only. 
PIPELININGCommand Pipelining.RFC 2920
QUITQuit RFC 2821
RCPTRecipient RFC 2821
RSETReset RFC 2821
SAMLSend and mail. RFC 821, RFC 2821
SENDSend. RFC 821, RFC 2821
SIZEMessage size declaration.RFC 1870
SMTPUTF8Internationalized email address.RFC 6531
SOMLSend or mail. RFC 821, RFC 2821
STARTTLSStart TLS. RFC 3207
SUBMITTERSMTP Responsible Submitter. RFC 4405
TURNTurn. RFC 821, RFC 2821
UTF8SMTPInternationalized email address.RFC 5336, RFC 6531
VERBVerbose. 
VRFYVerify. RFC 2821

SMTP Reply Codes:

CodeDescription
211System status, or system help reply.
214Help message.
220Domain service ready.
Ready to start TLS.
221Domain service closing transmission channel.
250OK, queuing for node node started.
Requested mail action okay, completed.
251OK, no messages waiting for node node.
User not local, will forward to forwardpath.
252 OK, pending messages for node node started.
Cannot VRFY user (e.g., info is not local), but will take message for this user and attempt delivery.
253OK, messages pending messages for node node started.
354Start mail input; end with <CRLF>.<CRLF>.
355Octet-offset is the transaction offset.
421Domain service not available, closing transmission channel.
432A password transition is needed.
450Requested mail action not taken: mailbox unavailable.
ATRN request refused.
451Requested action aborted: local error in processing.
Unable to process ATRN request now
452Requested action not taken: insufficient system storage.
453You have no mail.
454TLS not available due to temporary reason.
Encryption required for requested authentication mechanism.
458Unable to queue messages for node node.
459Node node not allowed: reason.
500Command not recognized: command.
Syntax error.
501Syntax error, no parameters allowed.
502Command not implemented.
503Bad sequence of commands.
504Command parameter not implemented.
521Machine does not accept mail.
530Must issue a STARTTLS command first.
Encryption required for requested authentication mechanism.
534Authentication mechanism is too weak.
538Encryption required for requested authentication mechanism.
550Requested action not taken: mailbox unavailable.
551User not local; please try forwardpath.
552Requested mail action aborted: exceeded storage allocation.
553Requested action not taken: mailbox name not allowed.
554Transaction failed.

Glossary:

DSN, Delivery Status Notifications.

MSA, Message Submission Agent.
(RFC 4409) An MSA acts as a submission server to accept messages from MUAs, and either delivers them or acts as an SMTP client to relay them to an MTA.

MTA, Mail Transfer Agent.
(RFC 4409) An MTA acts as an SMTP server to accept messages from an MSA or another MTA, and either delivers them or acts as an SMTP client to relay them to another MTA.

MUA, Message User Agent.
A process that acts to compose and submit new messages and process delivered messages. For delivered messages, the receiving MUA may obtain and process the message according to local conventions or, in what is commonly referred to as a split-MUA model, the POP or IMAP protocols are used to access delivered messages.

ODMR, On-Demand Mail Relay.
(RFC 2645) On-Demand Mail Relay is a restricted profile of SMTP. The initial client and server roles are short-lived, as the point is to allow the intermittently-connected host to request mail held for it by a service provider. The customer initiates a connection to the provider, authenticates, and requests its mail. The roles of client and server then reverse, and normal SMTP proceeds. The provider has an On-Demand Mail Relay process listening for connections on the ODMR port. This process does not need to be a full SMTP server. It does need to be an SMTP client with access to the outgoing mail queues, and as a server implement the EHLO, AUTH, ATRN, and QUIT commands. An MTA normally has a mail client component which processes the outgoing mail queues, attempting to send mail for particular domains, based on time or event (such as new mail being placed in the queue, or receipt of an ETRN command by the SMTP server component). The On-Demand Mail Relay service processes the outgoing queue not on a timer or new mail creation, but on request. The provider side has normal SMTP server responsibilities, including generation of delivery failure notices, etc. as needed.


RFCs:

[RFC 876] Survey of SMTP Implementations.

[RFC 1047] DUPLICATE MESSAGES AND SMTP.

[RFC 1090] SMTP on X.25.

[RFC 1123] Requirements for Internet Hosts -- Application and Support.

[RFC 1652] SMTP Service Extension for 8bit-MIME transport.

[RFC 1845] SMTP Service Extension for Checkpoint/Restart.

[RFC 1846] SMTP 521 Reply Code.

[RFC 1870] SMTP Service Extension for Message Size Declaration.

[RFC 1985] SMTP Service Extension for Remote Message Queue Starting.

[RFC 2034] SMTP Service Extension for Returning Enhanced Error Codes.

[RFC 2442] The Batch SMTP Media Type.

[RFC 2505] Anti-Spam Recommendations for SMTP MTAs.

[RFC 2645] ON-DEMAND MAIL RELAY (ODMR) SMTP with Dynamic IP Addresses.

[RFC 2846] GSTN Address Element Extensions in E-mail Services.

[RFC 2852] Deliver By SMTP Service Extension.

[RFC 2920] SMTP Service Extension for Command Pipelining.

[RFC 3027] Protocol Complications with the IP Network Address Translator.

[RFC 3030] SMTP Service Extensions for Transmission of Large and Binary MIME Messages.

[RFC 3191] Minimal GSTN address format in Internet Mail.

[RFC 3192] Minimal FAX address format in Internet Mail.

[RFC 3207] SMTP Service Extension for Secure SMTP over Transport Layer Security.

[RFC 3461] Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs).

[RFC 3463] Enhanced Mail System Status Codes.

[RFC 3464] An Extensible Message Format for Delivery Status Notifications.

[RFC 3675] .sex Considered Dangerous.

[RFC 3798] Message Disposition Notification.

[RFC 3848] ESMTP and LMTP Transmission Types Registration.

[RFC 3865] A No Soliciting Simple Mail Transfer Protocol (SMTP) Service Extension.

[RFC 3885] SMTP Service Extension for Message Tracking.

[RFC 3886] An Extensible Message Format for Message Tracking Responses.

[RFC 3974] SMTP Operational Experience in Mixed IPv4/v6 Environments.

[RFC 4141] SMTP and MIME Extensions for Content Conversion.

[RFC 4356] Mapping Between the Multimedia Messaging Service (MMS) and Internet Mail.

[RFC 4405] SMTP Service Extension for Indicating the Responsible Submitter of an E-Mail Message.

[RFC 4406] Sender ID: Authenticating E-Mail.

[RFC 4408] Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1.

[RFC 4409] Message Submission for Mail.

[RFC 4468] Message Submission BURL Extension.

[RFC 4496] Open Pluggable Edge Services (OPES) SMTP Use Cases.

[RFC 4954] SMTP Service Extension for Authentication.

[RFC 5068] Email Submission Operations: Access and Accountability Requirements.

[RFC 5248] A Registry for SMTP Enhanced Mail System Status Codes.

[RFC 5321] Simple Mail Transfer Protocol.

[RFC 5337] Internationalized Delivery Status and Disposition Notifications.

[RFC 5983] Mailing Lists and Internationalized Email Addresses.

[RFC 6710] Simple Mail Transfer Protocol Extension for Message Transfer Priorities.

[RFC 6729] Indicating Email Handling States in Trace Fields.


Publications:


Obsolete RFCs:

[RFC 788] SIMPLE MAIL TRANSFER PROTOCOL.

[RFC 821] Simple Mail Transfer Protocol.

[RFC 1425] SMTP Service Extensions.

[RFC 1426] SMTP Service Extension for 8 bit-MIME transport.

[RFC 1427] SMTP Service Extension for Message Size Declaration.

[RFC 1651] SMTP Service Extensions.

[RFC 1653] SMTP Service Extension for Message Size Declaration.

[RFC 1830] SMTP Service Extensions for Transmission of Large and Binary MIME Messages.

[RFC 1854] SMTP Service Extension for Command Pipelining.

[RFC 1869] SMTP Service Extensions.

[RFC 1891] SMTP Service Extension for Delivery Status Notifications.

[RFC 1893] Enhanced Mail System Status Codes.

[RFC 1894] An Extensible Message Format for Delivery Status Notifications.

[RFC 2197] SMTP Service Extension for Command Pipelining.

[RFC 2303] Minimal PSTN address format in Internet Mail.

[RFC 2304] Minimal FAX address format in Internet Mail.

[RFC 2476] Message Submission.

[RFC 2487] SMTP Service Extension for Secure SMTP over TLS.

[RFC 2554] SMTP Service Extension for Authentication.

[RFC 2821] Simple Mail Transfer Protocol.


Description Glossary RFCs Publications Obsolete RFCs