Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Simple Mail Transfer Protocol
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Protocol overview== SMTP is a [[Connection-oriented communication|connection-oriented]], [[text-based protocol]] in which a mail sender communicates with a mail receiver by issuing command strings and supplying necessary data over a reliable ordered data stream channel, typically a [[Transmission Control Protocol]] (TCP) connection. An ''SMTP session'' consists of commands originated by an SMTP [[Client (computing)|client]] (the initiating [[Software agent|agent]], sender, or transmitter) and corresponding responses from the SMTP [[Server (computing)|server]] (the listening agent, or receiver) so that the session is opened, and session parameters are exchanged. A session may include zero or more SMTP transactions. An ''SMTP transaction'' consists of three command/reply sequences: # '''MAIL''' command, to establish the return address, also called return-path,<ref>[http://cr.yp.to/smtp/mail.html "The MAIL, RCPT, and DATA verbs"] {{Webarchive|url=https://web.archive.org/web/20140222014813/http://cr.yp.to/smtp/mail.html |date=February 22, 2014 }}, [D. J. Bernstein]</ref> reverse-path,<ref>{{IETF RFC|5321}} Section-7.2</ref> [[bounce address]], mfrom, or envelope sender. # '''RCPT''' command, to establish a recipient of the message. This command can be issued multiple times, one for each recipient. These addresses are also part of the envelope. # '''DATA''' to signal the beginning of the ''message text''; the content of the message, as opposed to its envelope. It consists of a ''message header'' and a ''message body'' separated by an empty line. DATA is actually a group of commands, and the server replies twice: once to the ''DATA command'' itself, to acknowledge that it is ready to receive the text, and the second time after the end-of-data sequence, to either accept or reject the entire message. Besides the intermediate reply for DATA, each server's reply can be either positive (2xx reply codes) or negative. Negative replies can be permanent (5xx codes) or transient (4xx codes). A '''reject''' is a permanent failure and the client should send a bounce message to the server it received it from. A '''drop''' is a positive response followed by message discard rather than delivery. The initiating host, the SMTP client, can be either an end-user's [[email client]], functionally identified as a [[mail user agent]] (MUA), or a relay server's [[mail transfer agent]] (MTA), that is an SMTP server acting as an SMTP client, in the relevant session, in order to relay mail. Fully capable SMTP servers maintain queues of messages for retrying message transmissions that resulted in transient failures. A MUA knows the ''outgoing mail'' SMTP server from its configuration. A relay server typically determines which server to connect to by looking up the [[MX record|MX]] (Mail eXchange) [[Domain Name System|DNS]] resource record for each recipient's [[domain name]]. If no MX record is found, a conformant relaying server (not all are) instead looks up the [[A record]]. Relay servers can also be configured to use a [[smart host]]. A relay server initiates a [[Transmission Control Protocol|TCP]] connection to the server on the "[[well-known port]]" for SMTP: [[TCP and UDP port|port]] 25, or for connecting to an MSA, port 465 or 587. The main difference between an MTA and an MSA is that connecting to an MSA requires [[SMTP Authentication]]. ===SMTP vs mail retrieval=== SMTP is a delivery protocol only. In normal use, mail is "pushed" to a destination mail server (or next-hop mail server) as it arrives. Mail is routed based on the destination server, not the individual user(s) to which it is addressed. Other protocols, such as the [[Post Office Protocol]] (POP) and the [[Internet Message Access Protocol]] (IMAP) are specifically designed for use by individual users retrieving messages and managing [[email mailbox|mailboxes]]. To permit an intermittently-connected mail server to ''pull'' messages from a remote server on demand, SMTP has a feature to initiate mail queue processing on a remote server (see [[#Remote Message Queue Starting|Remote Message Queue Starting]] below). POP and IMAP are unsuitable protocols for relaying mail by intermittently-connected machines; they are designed to operate after final delivery, when information critical to the correct operation of mail relay (the "mail envelope") has been removed. ===Remote Message Queue Starting=== Remote Message Queue Starting enables a remote host to start processing of the mail queue on a server so it may receive messages destined to it by sending a corresponding command. The original <code>TURN</code> command was deemed insecure and was extended in {{IETF RFC|1985}} with the <code>ETRN</code> command which operates more securely using an [[authentication]] method based on [[Domain Name System]] information.<ref>{{Cite press release|last=Systems|first=Message|title=Message Systems Introduces Latest Version Of Momentum With New API-Driven Capabilities|url=https://www.prnewswire.com/news-releases/message-systems-introduces-latest-version-of-momentum-with-new-api-driven-capabilities-277568381.html|access-date=2020-07-19|website=www.prnewswire.com|language=en|archive-date=July 19, 2020|archive-url=https://web.archive.org/web/20200719173812/https://www.prnewswire.com/news-releases/message-systems-introduces-latest-version-of-momentum-with-new-api-driven-capabilities-277568381.html|url-status=live}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Simple Mail Transfer Protocol
(section)
Add topic