0% found this document useful (0 votes)
13 views

Simple Mail Transfer Protocol (SMTP)

Uploaded by

PK S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Simple Mail Transfer Protocol (SMTP)

Uploaded by

PK S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 1 of 13

Simple Mail Transfer Protocol


From Wikipedia, the free encyclopedia
The five-layer TCP/IP model
Simple 5. Application layer
Mail
DHCP • DNS • FTP • Gopher • HTTP • IMAP4 •
IRC • NNTP • XMPP • MIME • POP3 • SIP •
SMTP • SNMP • SSH • TELNET • RPC • RTP •
RTCP • TLS/SSL • SDP • SOAP • VPN • PPTP •
L2TP • GTP • …
4. Transport layer

TCP • UDP • DCCP • SCTP • …


3. Internet layer

IP (IPv4 • IPv6) • IGMP • ICMP • RSVP • BGP •


RIP • OSPF • ISIS • IPsec • ARP • RARP • …
2. Data link layer

802.11 • ATM • DTM • Ethernet • FDDI • Frame


Relay • GPRS • EVDO • HSPA • HDLC • PPP • …
1. Physical layer

Ethernet physical layer • ISDN • Modems • PLC •


SONET/SDH • G.709 • WiMAX • …

Transfer Protocol (SMTP) is the de facto standard for e-mail

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 2 of 13

transmissions across the Internet. Formally SMTP is defined in


RFC 821 (STD 10) as amended by RFC 1123 (STD 3) chapter 5.
The protocol used today is also known as ESMTP and defined in
RFC 2821.

Contents
„ 1 Description
„ 2 History
„ 2.1 Developers
„ 3 Outgoing mail SMTP server
„ 4 Sample communications
„ 5 Security and spamming
„ 6 References
„ 7 Related Requests For Comments (RFCs)
„ 8 See also
„ 9 External links
„ 9.1 cr.yp.to links
„ 9.2 Other links

Description
SMTP is a relatively simple, text-based protocol, where one or
more recipients of a message are specified (and in most cases
verified to exist) and then the message text is transferred. It is a
client-server protocol, where the client transmits an email
message to the server. Either an end-user's email client, a.k.a.
MUA (Mail User Agent), or a relaying server's MTA (Mail
Transfer Agents) can act as an SMTP client.

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 3 of 13

An email client knows the outgoing mail SMTP server from its
configuration. A relaying server typically determines which
SMTP server to connect to by looking up the MX (Mail
eXchange) DNS record for each recipient's domain name, the
part of the email address to the right of the at sign (@).
Conformant MTAs (not all) fall back to a simple A record in the
case of no MX. Some current mail transfer agents will also use
SRV records, a more general form of MX, though these are not
widely adopted. (Relaying servers can also be configured to use a
smart host.)

The SMTP client initiates a TCP connection to server's port 25


(unless overridden by configuration.) It is quite easy to test an
SMTP server using the telnet program (see below).

SMTP is a "push" protocol that does not allow one to "pull"


messages from a remote server on demand. To do this a mail
client must use POP3 or IMAP. Another SMTP server can
trigger a delivery in SMTP using ETRN.

History
SMTP developed out of Mail Box Protocol (ca. 1971), FTP Mail
[1] [2]
(ca. 1973), and Mail Protocol. The work continued
throughout the 1970s, until the ARPANET converted into the
modern Internet around 1990. Jon Postel then proposed a Mail
Transfer Protocol in 1980 that began to remove the mail's
[3]
reliance on FTP SMTP was published as RFC 821 in 1982

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 4 of 13

also by Jonathan Postel.

SMTP started becoming widely used in the early 1980s. At the


time, it was a complement to UUCP (Unix to Unix CoPy) which
was better suited to handle e-mail transfers between machines
that were intermittently connected. SMTP, on the other hand,
works best when both the sending and receiving machines are
connected to the network all the time. Both use a store and
forward mechanism and are examples of push technology.

The article about sender rewriting contains technical background


info about the early SMTP history and source routing before
RFC 1123.

SMTP-AUTH was introduced with RFC 2554 in 1998/99, more


or less at the same time as RFC 2476 that introduced Mail
submission agent as a different flavor of SMTP. Until then
clients could only be recognized by their IP address.

Sendmail was one of the first (if not the first) mail transfer agent
to implement SMTP. As of 2001 there are at least 50 programs
that implement SMTP as a client (sender of messages) or a server
(receiver of messages). Some other popular SMTP server
programs include Postfix, qmail, Novell GroupWise, Exim,
Novell NetMail and Microsoft Exchange Server.

Since this protocol started out as purely ASCII text-based, it did


not deal well with binary files. Standards such as Multipurpose
Internet Mail Extensions (MIME) were developed to encode
binary files for transfer through SMTP. MTAs developed after

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 5 of 13

sendmail also tended to be implemented 8-bit-clean, so that the


alternate "just send eight" strategy could be used to transmit
arbitrary data via SMTP. Non-8-bit-clean MTAs today tend to
support the 8BITMIME extension, permitting binary files to be
transmitted almost as easily as plain text.

Developers
Many people edited or contributed to the core SMTP
specifications, among them Jon Postel, Eric Allman, Dave
Crocker, Ned Freed, Randall Gellens, John Klensin, and Keith
Moore.

Outgoing mail SMTP server


An email client requires the name or the IP address of an SMTP
server as part of its configuration. The server will take care of
delivering messages on behalf of the user. This setting allows for
various policies and network designs. Clients from behind a
firewall are able to send mail to any Internet address without
directly connecting to the Internet. End-users directly connected
to the Internet can use the services of an e-mail provider that is
not necessarily the same as their connection provider.

Before SMTP-AUTH was widely implemented, the only


practical setting for an end user or small office directly
connected to the Internet was to use the connection provider's
SMTP server. Nowadays, decent SMTP servers support
authentication and encrypted SMTP sessions. Even then, some

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 6 of 13

still believe that using their connection provider’s SMTP server


for outgoing mail would result in a better overall resource usage,
because that allows to optimize the delivery paths of outgoing
messages. After recognizing the amount of resources burned for
delivering spam, that statement is not true.

Another choice is whether to use port 25 or port 587, as


established by RFC 2476. Many servers support both. Some
servers still support port 465 for legacy secure SMTP, it is
preferable to use encryption on standard ports after RFC 2487.

Sample communications
After establishing a connection between the sender (the client)
and the receiver (the server), the following is a legal SMTP
session. In the following conversation, everything sent by the
client is prefaced with C: and everything sent by the server is
prefaced with S:. On most computer systems, a connection can
be established using the telnet command on the client machine,
for example.

telnet www.example.com 25

which opens a TCP connection from the sending machine to the


MTA listening on port 25 on host www.example.com.

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 7 of 13

S: 220 www.example.com ESMTP Postfix


C: HELO mydomain.com
S: 250 Hello mydomain.com
C: MAIL FROM:<[email protected]>
S: 250 Ok
C: RCPT TO:<[email protected]>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: Subject: test message
C: From: [email protected]
C: To: [email protected]
C:
C: Hello,
C: This is a test.
C: Goodbye.
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye

Please note that the data the client sends in the HELO and MAIL
FROM commands can be retrieved in additional headers that the
server adds to the message: Received and Return-Path
respectively.

Although optional and not shown above, nearly all clients ask the
server which SMTP extensions the server supports, by using the
EHLO greeting to invoke Extended SMTP (ESMTP). These
clients use HELO only if the server does not respond to EHLO.

Contemporary clients will use the ESMTP extension keyword


SIZE to inquire of the server the maximum message size that will
be accepted. Older clients and servers will try to transfer huge
messages that will be rejected after wasting the network
resources, including a lot of connect time to dialup ISPs that are
paid by the minute.

For the edit planning of giant files or sending with older clients,

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 8 of 13

users can manually determine in advance the maximum size


accepted by ESMTP servers. The user telnets as above, but
substitutes "EHLO mydomain.com" for the HELO command
line.

S: 220-serverdomain.com ESMTP {postfix version and date}


S: 220 NO UCE. {etc., terms of service}
C: EHLO mydomain.com
S: 250-serverdomain.com Hello mydomain.com [127.0.0.1]
S: 250-SIZE 14680064
S: 250-PIPELINING
S: 250 HELP

This serverdomain.com declares that it will accept a fixed


maximum message size no larger than 14,680,064 octets (8-bit
bytes). Depending on the server's actual resource usage, it may
be currently unable to accept a message this large.

In the simplest case, an ESMTP server will declare a maximum


SIZE with only the EHLO user interaction. If no number appears
after the SIZE keyword, or if the current message limit must be
exactly determined, the user can further interact by simulating
the ESMTP header of a message with an estimated size. See
External Link RFC 1870 below.

Security and spamming


One of the limitations of the original SMTP is that it has no
facility for authentication of senders. Therefore the SMTP-
AUTH extension was defined. However, the impracticalities of
widespread SMTP-AUTH implementation and management
means that E-mail spamming is not and cannot be addressed by

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 9 of 13

it.

Modifying SMTP extensively, or replacing it completely, is not


believed to be practical, due to the network effects of the huge
installed base of SMTP. Internet Mail 2000 is one such proposal
for replacement.

Spam is enabled by several factors, including vendors


implementing broken MTAs (that do not adhere to standards, and
therefore make it difficult for other MTAs to enforce standards),
security vulnerabilities within the operating system (often
exacerbated by always-on broadband connections) that allow
spammers to remotely control end-user PCs and cause them to
send spam, and a regrettable lack of "intelligence" in many
MTAs still a major problem.

There are a number of proposals for sideband protocols that will


assist SMTP operation. The Anti-Spam Research Group (ASRG)
of the Internet Research Task Force (IRTF) is working on a
number of E-mail authentication and other proposals for
providing simple source authentication that is flexible,
lightweight, and scalable. Recent Internet Engineering Task
Force (IETF) activities include MARID (2004) leading to two
approved IETF experiments in 2005, and DomainKeys Identified
Mail in 2006.

References
1. ^ RFC 469 - Network Mail Meeting Summary
2. ^ RFC 524 - A Proposed Mail Protocol

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 10 of 13

3. ^ RFC 772 - Mail Transfer Protocol

Related Requests For Comments (RFCs)


„ RFC 3700 Internet Official Protocol Standards (STD 1). As
of 2004, this RFC Designates RFC 821 and RFC 822 as the
SMTP and MAIL standards, respectively, with RFC 2821
and RFC 2822 as proposed standards. However, in practice
the newer "proposed standards" are said to "obsolete" the
original.
„ RFC 821 (official standard) Simple Mail Transfer Protocol
„ RFC 822 (official standard) Standard for the Format of
ARPA Internet Text Messages
„ RFC 1123 Requirements for Internet Hosts -- Application
and Support (STD 3)
„ RFC 1870 SMTP Service Extension for Message Size
Declaration (оbsoletes: RFC 1653)
„ RFC 2505 Anti-Spam Recommendations for SMTP MTAs
(BCP 30)
„ RFC 2554 SMTP Service Extension for Authentication
„ RFC 2821 The Simple Mail Transfer Protocol (obsoletes
RFC 821 aka STD 10, RFC 974, and RFC 1869)
„ RFC 2822 Internet Message Format (obsoletes RFC 822 aka
STD 11)
„ RFC 2920 SMTP Service Extension for Command
Pipelining (STD 60)
„ RFC 3030 SMTP Service Extensions for Transmission of
Large and Binary MIME Messages
„ RFC 3207 SMTP Service Extension for Secure SMTP over
Transport Layer Security (obsoletes RFC 2487)
„ RFC 3461 SMTP Service Extension for Delivery Status

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 11 of 13

Notifications (obsoletes RFC 1891)


„ RFC 3462 The Multipart/Report Content Type for the
Reporting of Mail System Administrative Messages
(obsoletes RFC 1892)
„ RFC 3463 Enhanced Status Codes for SMTP (obsoletes
RFC 1893 )
„ RFC 3464 An Extensible Message Format for Delivery
Status Notifications (obsoletes RFC 1894)
„ RFC 3552 Guidelines for Writing RFC Text on Security
Considerations (contains SMTP example)
„ RFC 3834 Recommendations for Automatic Responses to
Electronic Mail
„ RFC 4409 Message Submission for Mail (obsoletes RFC
2476)

See also
„ Bounce messages (SMTP non-delivery reports)
„ E-mail loop
„ E-mail authentication
„ SMTP-AUTH (ESMTPA)
„ Extended SMTP (ESMTP)
„ QMTP (Quick Mail Transport Protocol by Daniel J.
Bernstein)
„ Ident
„ Sender Policy Framework (SPF)
„ DNSSEC
„ Email encryption

External links

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 12 of 13

„ 2821bis draft (2005)


„ 2821 security draft (2005)
„ Internet Mail Architecture draft (2005)
„ Email Submission Access and Accountability draft (2005)
„ Essential Internet Protocols - SMTP

cr.yp.to links
„ The Hash Convention for Mail System Status Codes
(HCMSSC)
„ Internet mail infrastructure
„ SMTP reference manual
„ Tools in the war on mail loops
„ Variable Envelope Return Paths (VERP)

Other links
„ SMTP Sequence Diagram (PDF)
„ Diagram of e-mail flow (PDF, PNG )
„ Troubleshooting SMTP in Thunderbird Includes information
on getting around port 25 blocking.
„ The Case For Email Security - Security and Insecurity in
SMTP, POP and IMAP.
Retrieved from
"http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"

Category: Internet mail protocols

„ This page was last modified 15:33, 27 June 2007.


„ All text is available under the terms of the GNU Free
Documentation License. (See Copyrights for details.)

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia Page 13 of 13

Wikipedia® is a registered trademark of the Wikimedia


Foundation, Inc., a US-registered 501(c)(3) tax-deductible
nonprofit charity.

http://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&printable=yes 12/7/07

You might also like