SMTP, Simple Mail Transfer Protocol |
Description | Glossary | RFCs | Publications | Obsolete RFCs |
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: | msgtrk, Message Tracking Protocol. |
Links: |
IANA: SMTP service extensions. wiki: SMTP. |
MAC header | IP header | TCP header | SMTP message |
SMTP message:
SMTP commands are ASCII strings terminated by a CRLF combination.
SMTP commands:
Command | Description | References |
---|---|---|
8BITMIME | Use 8-bit data. | RFC 1652 |
ATRN | Authenticated TURN. | RFC 2645 |
AUTH | Authentication. | RFC 2554, RFC 4954 |
BDAT | Binary data. | RFC 3030 |
BINARYMIME | Binary MIME. | RFC 3030 |
BURL | Remote Content. | RFC 4468 |
CHECKPOINT | Checkpoint/Restart. | RFC 1845 |
CHUNKING | Chunking. | RFC 3030 |
DATA | Data. | RFC 2821 |
DELIVERBY | Delivery within prescribed period. | RFC 2852 |
DSN | Delivery Status Notification. | RFC 3461 |
EHLO | Extended Hello. | RFC 2821 |
ENHANCEDSTATUSCODES | Enhanced Status Codes. | RFC 2034 |
ETRN | Extended Turn. | RFC 1985 |
EXPN | Expand | RFC 2821, RFC 5321 |
FUTURERELEASE | Future Message Release. | RFC 4865 |
HELO | Hello | RFC 2821 |
HELP | Help | RFC 2821, RFC 5321 |
RFC 2821 | ||
MTRK | Message Tracking. | RFC 3885 |
NO-SOLICITING | Notification of no soliciting. | RFC 3865 |
NOOP | No operation | RFC 2821 |
ONEX | One message transaction only. | |
PIPELINING | Command Pipelining. | RFC 2920 |
QUIT | Quit | RFC 2821 |
RCPT | Recipient | RFC 2821 |
RSET | Reset | RFC 2821 |
SAML | (deprecated) Send and mail. | RFC 821, RFC 2821 |
SEND | (deprecated) Send. | RFC 821, RFC 2821 |
SIZE | Message size declaration. | RFC 1870 |
SOML | (deprecated) Send or mail. | RFC 821, RFC 2821 |
STARTTLS | Start TLS. | RFC 3207 |
SUBMITTER | SMTP Responsible Submitter. | RFC 4405 |
TURN | (deprecated) Turn. | RFC 821, RFC 2821 |
UTF8SMTP | Internationalized email address. | RFC 5336 |
VERB | Verbose. | |
VRFY | Verify. | RFC 2821 |
SMTP Reply Codes:
Code | Description |
---|---|
211 | System status, or system help reply. |
214 | Help message. |
220 | Domain service ready. Ready to start TLS. |
221 | Domain service closing transmission channel. |
250 | OK, queuing for node node started. Requested mail action okay, completed. |
251 | OK, 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. |
253 | OK, messages pending messages for node node started. |
354 | Start mail input; end with <CRLF>.<CRLF>. |
355 | Octet-offset is the transaction offset. |
421 | Domain service not available, closing transmission channel. |
432 | A password transition is needed. |
450 | Requested mail action not taken: mailbox unavailable. ATRN request refused. |
451 | Requested action aborted: local error in processing.
Unable to process ATRN request now |
452 | Requested action not taken: insufficient system storage. |
453 | You have no mail. |
454 | TLS not available due to temporary reason.
Encryption required for requested authentication mechanism. |
458 | Unable to queue messages for node node. |
459 | Node node not allowed: reason. |
500 | Command not recognized: command. Syntax error. |
501 | Syntax error, no parameters allowed. |
502 | Command not implemented. |
503 | Bad sequence of commands. |
504 | Command parameter not implemented. |
521 | Machine does not accept mail. |
530 | Must issue a STARTTLS command first. Encryption required for requested authentication mechanism. |
534 | Authentication mechanism is too weak. |
538 | Encryption required for requested authentication mechanism. |
550 | Requested action not taken: mailbox unavailable. |
551 | User not local; please try forwardpath. |
552 | Requested mail action aborted: exceeded storage allocation. |
553 | Requested action not taken: mailbox name not allowed. |
554 | Transaction failed. |
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 2554] SMTP Service Extension for Authentication.
[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 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 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 2821] Simple Mail Transfer Protocol.
Description | Glossary | RFCs | Publications | Obsolete RFCs |