<s>
The	O
Simple	B-Protocol
Mail	I-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
SMTP	B-Protocol
)	O
is	O
an	O
Internet	O
standard	O
communication	O
protocol	O
for	O
electronic	O
mail	O
transmission	O
.	O
</s>
<s>
Mail	B-Protocol
servers	I-Protocol
and	O
other	O
message	B-Protocol
transfer	I-Protocol
agents	I-Protocol
use	O
SMTP	B-Protocol
to	O
send	O
and	O
receive	O
mail	O
messages	O
.	O
</s>
<s>
User-level	O
email	B-Protocol
clients	I-Protocol
typically	O
use	O
SMTP	B-Protocol
only	O
for	O
sending	O
messages	O
to	O
a	O
mail	B-Protocol
server	I-Protocol
for	O
relaying	O
,	O
and	O
typically	O
submit	O
outgoing	O
email	O
to	O
the	O
mail	B-Protocol
server	I-Protocol
on	O
port	B-Protocol
587	I-Protocol
or	O
465	O
per	O
.	O
</s>
<s>
For	O
retrieving	O
messages	O
,	O
IMAP	B-Protocol
(	O
which	O
replaced	O
the	O
older	O
POP3	B-Protocol
)	O
is	O
standard	O
,	O
but	O
proprietary	O
servers	O
also	O
often	O
implement	O
proprietary	O
protocols	O
,	O
e.g.	O
,	O
Exchange	B-Protocol
ActiveSync	I-Protocol
.	O
</s>
<s>
SMTP	B-Protocol
's	O
origins	O
began	O
in	O
1980	O
,	O
building	O
on	O
concepts	O
implemented	O
on	O
the	O
ARPANET	O
since	O
1971	O
.	O
</s>
<s>
The	O
protocol	O
version	O
in	O
common	O
use	O
today	O
has	O
extensible	O
structure	O
with	O
various	O
extensions	O
for	O
authentication	O
,	O
encryption	B-Protocol
,	O
binary	O
data	O
transfer	O
,	O
and	O
internationalized	O
email	O
addresses	O
.	O
</s>
<s>
SMTP	B-Protocol
servers	I-Protocol
commonly	O
use	O
the	O
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
on	O
port	B-Protocol
number	I-Protocol
25	O
(	O
for	O
plaintext	O
)	O
and	O
587	O
(	O
for	O
encrypted	O
communications	O
)	O
.	O
</s>
<s>
Various	O
forms	O
of	O
one-to-one	O
electronic	B-Application
messaging	I-Application
were	O
used	O
in	O
the	O
1960s	O
.	O
</s>
<s>
Users	O
communicated	O
using	O
systems	O
developed	O
for	O
specific	O
mainframe	B-Architecture
computers	I-Architecture
.	O
</s>
<s>
SMTP	B-Protocol
grew	O
out	O
of	O
these	O
standards	O
developed	O
during	O
the	O
1970s	O
.	O
</s>
<s>
Mail	O
on	O
the	O
ARPANET	O
traces	O
its	O
roots	O
to	O
1971	O
:	O
the	O
Mail	O
Box	O
Protocol	O
,	O
which	O
was	O
not	O
implemented	O
,	O
<ref> , Tom Van Vleck: "It is not clear this protocol was ever implemented"</ref>	O
but	O
is	O
discussed	O
in	O
;	O
and	O
the	O
SNDMSG	B-Application
program	O
,	O
which	O
Ray	O
Tomlinson	O
of	O
BBN	O
adapted	O
that	O
year	O
to	O
send	O
messages	O
across	O
two	O
computers	O
on	O
the	O
ARPANET.The	O
First	O
Network	O
Email	O
,	O
Ray	O
Tomlinson	O
,	O
BBNPicture	O
of	O
"	O
The	O
First	O
Email	O
Computer	O
"	O
by	O
Dan	O
Murphy	O
,	O
a	O
PDP-10Dan	O
Murphy	O
's	O
TENEX	O
and	O
TOPS-20	O
Papers	O
A	O
further	O
proposal	O
for	O
a	O
Mail	B-Protocol
Protocol	I-Protocol
was	O
made	O
in	O
RFC	O
524	O
in	O
June	O
1973	O
,	O
–	O
A	O
Proposed	O
Mail	B-Protocol
Protocol	I-Protocol
which	O
was	O
not	O
implemented	O
.	O
</s>
<s>
The	O
use	O
of	O
the	O
File	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
FTP	O
)	O
for	O
"	O
network	O
mail	O
"	O
on	O
the	O
ARPANET	O
was	O
proposed	O
in	O
RFC	O
469	O
in	O
March	O
1973	O
.	O
</s>
<s>
In	O
1980	O
,	O
Jon	O
Postel	O
and	O
Suzanne	O
Sluizer	O
published	O
which	O
proposed	O
the	O
Mail	O
Transfer	B-Protocol
Protocol	I-Protocol
as	O
a	O
replacement	O
for	O
the	O
use	O
of	O
the	O
FTP	O
for	O
mail	O
.	O
</s>
<s>
of	O
May	O
1981	O
removed	O
all	O
references	O
to	O
FTP	O
and	O
allocated	O
port	B-Protocol
57	O
for	O
TCP	B-Protocol
and	O
UDP	B-Protocol
,	O
an	O
allocation	O
that	O
has	O
since	O
been	O
removed	O
by	O
IANA	O
.	O
</s>
<s>
In	O
November	O
1981	O
,	O
Postel	O
published	O
"	O
Simple	B-Protocol
Mail	I-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
"	O
.	O
</s>
<s>
The	O
SMTP	B-Protocol
standard	O
was	O
developed	O
around	O
the	O
same	O
time	O
as	O
Usenet	B-Application
,	O
a	O
one-to-many	O
communication	O
network	O
with	O
some	O
similarities	O
.	O
</s>
<s>
SMTP	B-Protocol
became	O
widely	O
used	O
in	O
the	O
early	O
1980s	O
.	O
</s>
<s>
At	O
the	O
time	O
,	O
it	O
was	O
a	O
complement	O
to	O
the	O
Unix	B-Protocol
to	I-Protocol
Unix	I-Protocol
Copy	I-Protocol
Program	I-Protocol
(	O
UUCP	B-Protocol
)	O
,	O
which	O
was	O
better	O
suited	O
for	O
handling	O
email	O
transfers	O
between	O
machines	O
that	O
were	O
intermittently	O
connected	O
.	O
</s>
<s>
SMTP	B-Protocol
,	O
on	O
the	O
other	O
hand	O
,	O
works	O
best	O
when	O
both	O
the	O
sending	O
and	O
receiving	O
machines	O
are	O
connected	O
to	O
the	O
network	O
all	O
the	O
time	O
.	O
</s>
<s>
Both	O
used	O
a	O
store	B-Protocol
and	I-Protocol
forward	I-Protocol
mechanism	O
and	O
are	O
examples	O
of	O
push	B-General_Concept
technology	I-General_Concept
.	O
</s>
<s>
Though	O
Usenet	B-Application
's	O
newsgroups	B-Application
were	O
still	O
propagated	O
with	O
UUCP	B-Protocol
between	O
servers	O
,	O
UUCP	B-Protocol
as	O
a	O
mail	O
transport	O
has	O
virtually	O
disappeared	O
along	O
with	O
the	O
"	O
bang	O
paths	O
"	O
it	O
used	O
as	O
message	O
routing	O
headers.The	O
article	O
about	O
sender	O
rewriting	O
contains	O
technical	O
background	O
info	O
about	O
the	O
early	O
SMTP	B-Protocol
history	O
and	O
source	O
routing	O
before	O
.	O
</s>
<s>
Sendmail	B-Application
,	O
released	O
with	O
4.1cBSD	B-Operating_System
in	O
1983	O
,	O
was	O
one	O
of	O
the	O
first	O
mail	B-Protocol
transfer	I-Protocol
agents	I-Protocol
to	O
implement	O
SMTP	B-Protocol
.	O
</s>
<s>
Over	O
time	O
,	O
as	O
BSD	B-Operating_System
Unix	I-Operating_System
became	O
the	O
most	O
popular	O
operating	O
system	O
on	O
the	O
Internet	O
,	O
Sendmail	B-Application
became	O
the	O
most	O
common	O
MTA	B-Protocol
(	O
mail	B-Protocol
transfer	I-Protocol
agent	I-Protocol
)	O
.	O
</s>
<s>
The	O
original	O
SMTP	B-Protocol
protocol	I-Protocol
supported	O
only	O
unauthenticated	O
unencrypted	O
7-bit	B-Protocol
ASCII	I-Protocol
text	O
communications	O
,	O
susceptible	O
to	O
trivial	O
man-in-the-middle	O
attack	O
,	O
spoofing	O
,	O
and	O
spamming	O
,	O
and	O
requiring	O
any	O
binary	O
data	O
to	O
be	O
encoded	O
to	O
readable	O
text	O
before	O
transmission	O
.	O
</s>
<s>
Due	O
to	O
absence	O
of	O
a	O
proper	O
authentication	O
mechanism	O
,	O
by	O
design	O
every	O
SMTP	B-Protocol
server	I-Protocol
was	O
an	O
open	O
mail	B-Protocol
relay	I-Protocol
.	O
</s>
<s>
The	O
Internet	O
Mail	O
Consortium	O
(	O
IMC	O
)	O
reported	O
that	O
55%	O
of	O
mail	B-Protocol
servers	I-Protocol
were	O
open	O
relays	O
in	O
1998	O
,	O
but	O
less	O
than	O
1%	O
in	O
2002	O
.	O
</s>
<s>
Because	O
of	O
spam	O
concerns	O
most	O
email	O
providers	O
blocklist	O
open	O
relays	O
,	O
making	O
original	O
SMTP	B-Protocol
essentially	O
impractical	O
for	O
general	O
use	O
on	O
the	O
Internet	O
.	O
</s>
<s>
In	O
November	O
1995	O
,	O
defined	O
Extended	O
Simple	B-Protocol
Mail	I-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
ESMTP	B-Protocol
)	O
,	O
which	O
established	O
a	O
general	O
structure	O
for	O
all	O
existing	O
and	O
future	O
extensions	O
which	O
aimed	O
to	O
add-in	O
the	O
features	O
missing	O
from	O
the	O
original	O
SMTP	B-Protocol
.	O
</s>
<s>
ESMTP	B-Protocol
defines	O
consistent	O
and	O
manageable	O
means	O
by	O
which	O
ESMTP	B-Protocol
clients	O
and	O
servers	O
can	O
be	O
identified	O
and	O
servers	O
can	O
indicate	O
supported	O
extensions	O
.	O
</s>
<s>
Message	O
submission	O
(	O
)	O
and	O
SMTP-AUTH	O
(	O
)	O
were	O
introduced	O
in	O
1998	O
and	O
1999	O
,	O
both	O
describing	O
new	O
trends	O
in	O
email	O
delivery	O
.	O
</s>
<s>
Originally	O
,	O
SMTP	B-Protocol
servers	I-Protocol
were	O
typically	O
internal	O
to	O
an	O
organization	O
,	O
receiving	O
mail	O
for	O
the	O
organization	O
from	O
the	O
outside	O
,	O
and	O
relaying	O
messages	O
from	O
the	O
organization	O
to	O
the	O
outside	O
.	O
</s>
<s>
But	O
as	O
time	O
went	O
on	O
,	O
SMTP	B-Protocol
servers	I-Protocol
(	O
mail	B-Protocol
transfer	I-Protocol
agents	I-Protocol
)	O
,	O
in	O
practice	O
,	O
were	O
expanding	O
their	O
roles	O
to	O
become	O
message	B-Protocol
submission	I-Protocol
agents	I-Protocol
for	O
Mail	B-Protocol
user	I-Protocol
agents	I-Protocol
,	O
some	O
of	O
which	O
were	O
now	O
relaying	O
mail	O
from	O
the	O
outside	O
of	O
an	O
organization	O
.	O
</s>
<s>
a	O
company	O
executive	O
wishes	O
to	O
send	O
email	O
while	O
on	O
a	O
trip	O
using	O
the	O
corporate	O
SMTP	B-Protocol
server	I-Protocol
.	O
)	O
</s>
<s>
This	O
issue	O
,	O
a	O
consequence	O
of	O
the	O
rapid	O
expansion	O
and	O
popularity	O
of	O
the	O
World	O
Wide	O
Web	O
,	O
meant	O
that	O
SMTP	B-Protocol
had	O
to	O
include	O
specific	O
rules	O
and	O
methods	O
for	O
relaying	O
mail	O
and	O
authenticating	O
users	O
to	O
prevent	O
abuses	O
such	O
as	O
relaying	O
of	O
unsolicited	O
email	O
(	O
spam	O
)	O
.	O
</s>
<s>
Work	O
on	O
message	O
submission	O
(	O
)	O
was	O
originally	O
started	O
because	O
popular	O
mail	B-Protocol
servers	I-Protocol
would	O
often	O
rewrite	O
mail	O
in	O
an	O
attempt	O
to	O
fix	O
problems	O
in	O
it	O
,	O
for	O
example	O
,	O
adding	O
a	O
domain	O
name	O
to	O
an	O
unqualified	O
address	O
.	O
</s>
<s>
Standards	O
such	O
as	O
Multipurpose	B-Protocol
Internet	I-Protocol
Mail	I-Protocol
Extensions	I-Protocol
(	O
MIME	B-Protocol
)	O
were	O
developed	O
to	O
encode	O
binary	O
files	O
for	O
transfer	O
through	O
SMTP	B-Protocol
.	O
</s>
<s>
Mail	B-Protocol
transfer	I-Protocol
agents	I-Protocol
(	O
MTAs	O
)	O
developed	O
after	O
Sendmail	B-Application
also	O
tended	O
to	O
be	O
implemented	O
8-bit	O
clean	O
,	O
so	O
that	O
the	O
alternate	O
"	O
just	O
send	O
eight	O
"	O
strategy	O
could	O
be	O
used	O
to	O
transmit	O
arbitrary	O
text	O
data	O
(	O
in	O
any	O
8-bit	O
ASCII-like	O
character	O
encoding	O
)	O
via	O
SMTP	B-Protocol
.	O
</s>
<s>
Mojibake	O
was	O
still	O
a	O
problem	O
due	O
to	O
differing	O
character	O
set	O
mappings	O
between	O
vendors	O
,	O
although	O
the	O
email	O
addresses	O
themselves	O
still	O
allowed	O
only	O
ASCII	B-Protocol
.	O
</s>
<s>
8-bit-clean	O
MTAs	O
today	O
tend	O
to	O
support	O
the	O
8BITMIME	O
extension	O
,	O
permitting	O
some	O
binary	O
files	O
to	O
be	O
transmitted	O
almost	O
as	O
easily	O
as	O
plain	O
text	O
(	O
limits	O
on	O
line	O
length	O
and	O
permitted	O
octet	O
values	O
still	O
apply	O
,	O
so	O
that	O
MIME	B-Protocol
encoding	O
is	O
needed	O
for	O
most	O
non-text	O
data	O
and	O
some	O
text	O
formats	O
)	O
.	O
</s>
<s>
Many	O
people	O
contributed	O
to	O
the	O
core	O
SMTP	B-Protocol
specifications	O
,	O
among	O
them	O
Jon	O
Postel	O
,	O
Eric	O
Allman	O
,	O
Dave	O
Crocker	O
,	O
Ned	O
Freed	O
,	O
Randall	O
Gellens	O
,	O
John	O
Klensin	O
,	O
and	O
Keith	O
Moore	O
.	O
</s>
<s>
Email	O
is	O
submitted	O
by	O
a	O
mail	B-Protocol
client	I-Protocol
(	O
mail	B-Protocol
user	I-Protocol
agent	I-Protocol
,	O
MUA	O
)	O
to	O
a	O
mail	B-Protocol
server	I-Protocol
(	O
mail	B-Protocol
submission	I-Protocol
agent	I-Protocol
,	O
MSA	O
)	O
using	O
SMTP	B-Protocol
on	O
TCP	B-Protocol
port	I-Protocol
587	O
.	O
</s>
<s>
Most	O
mailbox	O
providers	O
still	O
allow	O
submission	O
on	O
traditional	O
port	B-Protocol
25	I-Protocol
.	O
</s>
<s>
The	O
MSA	O
delivers	O
the	O
mail	O
to	O
its	O
mail	B-Protocol
transfer	I-Protocol
agent	I-Protocol
(	O
mail	B-Protocol
transfer	I-Protocol
agent	I-Protocol
,	O
MTA	B-Protocol
)	O
.	O
</s>
<s>
Local	O
processing	O
can	O
be	O
done	O
either	O
on	O
a	O
single	O
machine	O
,	O
or	O
split	O
among	O
multiple	O
machines	O
;	O
mail	O
agent	B-General_Concept
processes	O
on	O
one	O
machine	O
can	O
share	O
files	O
,	O
but	O
if	O
processing	O
is	O
on	O
multiple	O
machines	O
,	O
they	O
transfer	O
messages	O
between	O
each	O
other	O
using	O
SMTP	B-Protocol
,	O
where	O
each	O
machine	O
is	O
configured	O
to	O
use	O
the	O
next	O
machine	O
as	O
a	O
smart	O
host	O
.	O
</s>
<s>
Each	O
process	O
is	O
an	O
MTA	B-Protocol
(	O
an	O
SMTP	B-Protocol
server	I-Protocol
)	O
in	O
its	O
own	O
right	O
.	O
</s>
<s>
The	O
boundary	O
MTA	B-Protocol
uses	O
DNS	B-Protocol
to	O
look	O
up	O
the	O
MX	B-Protocol
(	O
mail	B-Protocol
exchanger	I-Protocol
)	O
record	O
for	O
the	O
recipient	O
's	O
domain	O
(	O
the	O
part	O
of	O
the	O
email	O
address	O
on	O
the	O
right	O
of	O
@	O
)	O
.	O
</s>
<s>
The	O
MX	B-Protocol
record	I-Protocol
contains	O
the	O
name	O
of	O
the	O
target	O
MTA	B-Protocol
.	O
</s>
<s>
Based	O
on	O
the	O
target	O
host	O
and	O
other	O
factors	O
,	O
the	O
sending	O
MTA	B-Protocol
selects	O
a	O
recipient	O
server	B-Application
and	O
connects	O
to	O
it	O
to	O
complete	O
the	O
mail	O
exchange	O
.	O
</s>
<s>
A	O
receiving	O
SMTP	B-Protocol
server	I-Protocol
may	O
be	O
the	O
ultimate	O
destination	O
,	O
an	O
intermediate	O
"	O
relay	O
"	O
(	O
that	O
is	O
,	O
it	O
stores	O
and	O
forwards	O
the	O
message	O
)	O
or	O
a	O
"	O
gateway	O
"	O
(	O
that	O
is	O
,	O
it	O
may	O
forward	O
the	O
message	O
using	O
some	O
protocol	O
other	O
than	O
SMTP	B-Protocol
)	O
.	O
</s>
<s>
Per	O
section	O
2.1	O
,	O
each	O
hop	O
is	O
a	O
formal	O
handoff	O
of	O
responsibility	O
for	O
the	O
message	O
,	O
whereby	O
the	O
receiving	O
server	B-Application
must	O
either	O
deliver	O
the	O
message	O
or	O
properly	O
report	O
the	O
failure	O
to	O
do	O
so	O
.	O
</s>
<s>
Once	O
the	O
final	O
hop	O
accepts	O
the	O
incoming	O
message	O
,	O
it	O
hands	O
it	O
to	O
a	O
mail	B-Protocol
delivery	I-Protocol
agent	I-Protocol
(	O
MDA	O
)	O
for	O
local	O
delivery	O
.	O
</s>
<s>
As	O
with	O
sending	O
,	O
this	O
reception	O
can	O
be	O
done	O
using	O
one	O
or	O
multiple	O
computers	O
,	O
but	O
in	O
the	O
diagram	O
above	O
the	O
MDA	O
is	O
depicted	O
as	O
one	O
box	O
near	O
the	O
mail	B-Protocol
exchanger	I-Protocol
box	O
.	O
</s>
<s>
An	O
MDA	O
may	O
deliver	O
messages	O
directly	O
to	O
storage	O
,	O
or	O
forward	O
them	O
over	O
a	O
network	O
using	O
SMTP	B-Protocol
or	O
other	O
protocol	O
such	O
as	O
Local	B-Protocol
Mail	I-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
LMTP	B-Protocol
)	O
,	O
a	O
derivative	O
of	O
SMTP	B-Protocol
designed	O
for	O
this	O
purpose	O
.	O
</s>
<s>
Once	O
delivered	O
to	O
the	O
local	O
mail	B-Protocol
server	I-Protocol
,	O
the	O
mail	O
is	O
stored	O
for	O
batch	O
retrieval	O
by	O
authenticated	O
mail	B-Protocol
clients	I-Protocol
(	O
MUAs	O
)	O
.	O
</s>
<s>
Mail	O
is	O
retrieved	O
by	O
end-user	O
applications	O
,	O
called	O
email	B-Protocol
clients	I-Protocol
,	O
using	O
Internet	B-Protocol
Message	I-Protocol
Access	I-Protocol
Protocol	I-Protocol
(	O
IMAP	B-Protocol
)	O
,	O
a	O
protocol	O
that	O
both	O
facilitates	O
access	O
to	O
mail	O
and	O
manages	O
stored	O
mail	O
,	O
or	O
the	O
Post	B-Protocol
Office	I-Protocol
Protocol	I-Protocol
(	O
POP	O
)	O
which	O
typically	O
uses	O
the	O
traditional	O
mbox	B-Application
mail	O
file	O
format	O
or	O
a	O
proprietary	O
system	O
such	O
as	O
Microsoft	O
Exchange/Outlook	O
or	O
Lotus	O
Notes/Domino	O
.	O
</s>
<s>
Webmail	B-Protocol
clients	O
may	O
use	O
either	O
method	O
,	O
but	O
the	O
retrieval	O
protocol	O
is	O
often	O
not	O
a	O
formal	O
standard	O
.	O
</s>
<s>
SMTP	B-Protocol
defines	O
message	O
transport	O
,	O
not	O
the	O
message	O
content	O
.	O
</s>
<s>
STD	O
10	O
and	O
define	O
SMTP	B-Protocol
(	O
the	O
envelope	O
)	O
,	O
while	O
STD	O
11	O
and	O
define	O
the	O
message	O
(	O
header	O
and	O
body	O
)	O
,	O
formally	O
referred	O
to	O
as	O
the	O
Internet	O
Message	O
Format	O
.	O
</s>
<s>
SMTP	B-Protocol
is	O
a	O
connection-oriented	B-Protocol
,	O
text-based	O
protocol	O
in	O
which	O
a	O
mail	O
sender	O
communicates	O
with	O
a	O
mail	O
receiver	O
by	O
issuing	O
command	O
strings	O
and	O
supplying	O
necessary	O
data	O
over	O
a	O
reliable	O
ordered	O
data	O
stream	O
channel	O
,	O
typically	O
a	O
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
(	O
TCP	B-Protocol
)	O
connection	O
.	O
</s>
<s>
An	O
SMTP	B-Protocol
session	O
consists	O
of	O
commands	O
originated	O
by	O
an	O
SMTP	B-Protocol
client	B-Protocol
(	O
the	O
initiating	O
agent	B-General_Concept
,	O
sender	O
,	O
or	O
transmitter	O
)	O
and	O
corresponding	O
responses	O
from	O
the	O
SMTP	B-Protocol
server	I-Protocol
(	O
the	O
listening	O
agent	B-General_Concept
,	O
or	O
receiver	O
)	O
so	O
that	O
the	O
session	O
is	O
opened	O
,	O
and	O
session	O
parameters	O
are	O
exchanged	O
.	O
</s>
<s>
A	O
session	O
may	O
include	O
zero	O
or	O
more	O
SMTP	B-Protocol
transactions	O
.	O
</s>
<s>
An	O
SMTP	B-Protocol
transaction	O
consists	O
of	O
three	O
command/reply	O
sequences	O
:	O
</s>
<s>
DATA	O
is	O
actually	O
a	O
group	O
of	O
commands	O
,	O
and	O
the	O
server	B-Application
replies	O
twice	O
:	O
once	O
to	O
the	O
DATA	O
command	O
itself	O
,	O
to	O
acknowledge	O
that	O
it	O
is	O
ready	O
to	O
receive	O
the	O
text	O
,	O
and	O
the	O
second	O
time	O
after	O
the	O
end-of-data	O
sequence	O
,	O
to	O
either	O
accept	O
or	O
reject	O
the	O
entire	O
message	O
.	O
</s>
<s>
Besides	O
the	O
intermediate	O
reply	O
for	O
DATA	O
,	O
each	O
server	B-Application
's	O
reply	O
can	O
be	O
either	O
positive	O
(	O
2xx	O
reply	O
codes	O
)	O
or	O
negative	O
.	O
</s>
<s>
A	O
reject	O
is	O
a	O
permanent	O
failure	O
and	O
the	O
client	B-Protocol
should	O
send	O
a	O
bounce	O
message	O
to	O
the	O
server	B-Application
it	O
received	O
it	O
from	O
.	O
</s>
<s>
The	O
initiating	O
host	O
,	O
the	O
SMTP	B-Protocol
client	B-Protocol
,	O
can	O
be	O
either	O
an	O
end-user	O
'	O
s	O
email	B-Protocol
client	I-Protocol
,	O
functionally	O
identified	O
as	O
a	O
mail	B-Protocol
user	I-Protocol
agent	I-Protocol
(	O
MUA	O
)	O
,	O
or	O
a	O
relay	O
server	B-Application
's	O
mail	B-Protocol
transfer	I-Protocol
agent	I-Protocol
(	O
MTA	B-Protocol
)	O
,	O
that	O
is	O
an	O
SMTP	B-Protocol
server	I-Protocol
acting	O
as	O
an	O
SMTP	B-Protocol
client	B-Protocol
,	O
in	O
the	O
relevant	O
session	O
,	O
in	O
order	O
to	O
relay	O
mail	O
.	O
</s>
<s>
Fully	O
capable	O
SMTP	B-Protocol
servers	I-Protocol
maintain	O
queues	O
of	O
messages	O
for	O
retrying	O
message	O
transmissions	O
that	O
resulted	O
in	O
transient	O
failures	O
.	O
</s>
<s>
A	O
MUA	O
knows	O
the	O
outgoing	O
mail	O
SMTP	B-Protocol
server	I-Protocol
from	O
its	O
configuration	O
.	O
</s>
<s>
A	O
relay	O
server	B-Application
typically	O
determines	O
which	O
server	B-Application
to	O
connect	O
to	O
by	O
looking	O
up	O
the	O
MX	B-Protocol
(	O
Mail	O
eXchange	O
)	O
DNS	B-Protocol
resource	O
record	O
for	O
each	O
recipient	O
's	O
domain	O
name	O
.	O
</s>
<s>
If	O
no	O
MX	B-Protocol
record	I-Protocol
is	O
found	O
,	O
a	O
conformant	O
relaying	O
server	B-Application
(	O
not	O
all	O
are	O
)	O
instead	O
looks	O
up	O
the	O
A	B-Protocol
record	I-Protocol
.	O
</s>
<s>
A	O
relay	O
server	B-Application
initiates	O
a	O
TCP	B-Protocol
connection	O
to	O
the	O
server	B-Application
on	O
the	O
"	O
well-known	O
port	B-Protocol
"	O
for	O
SMTP	B-Protocol
:	O
port	B-Protocol
25	I-Protocol
,	O
or	O
for	O
connecting	O
to	O
an	O
MSA	O
,	O
port	B-Protocol
587	I-Protocol
.	O
</s>
<s>
The	O
main	O
difference	O
between	O
an	O
MTA	B-Protocol
and	O
an	O
MSA	O
is	O
that	O
connecting	O
to	O
an	O
MSA	O
requires	O
SMTP	B-Protocol
Authentication	O
.	O
</s>
<s>
SMTP	B-Protocol
is	O
a	O
delivery	O
protocol	O
only	O
.	O
</s>
<s>
In	O
normal	O
use	O
,	O
mail	O
is	O
"	O
pushed	O
"	O
to	O
a	O
destination	O
mail	B-Protocol
server	I-Protocol
(	O
or	O
next-hop	O
mail	B-Protocol
server	I-Protocol
)	O
as	O
it	O
arrives	O
.	O
</s>
<s>
Mail	O
is	O
routed	O
based	O
on	O
the	O
destination	O
server	B-Application
,	O
not	O
the	O
individual	O
user(s )	O
to	O
which	O
it	O
is	O
addressed	O
.	O
</s>
<s>
Other	O
protocols	O
,	O
such	O
as	O
the	O
Post	B-Protocol
Office	I-Protocol
Protocol	I-Protocol
(	O
POP	O
)	O
and	O
the	O
Internet	B-Protocol
Message	I-Protocol
Access	I-Protocol
Protocol	I-Protocol
(	O
IMAP	B-Protocol
)	O
are	O
specifically	O
designed	O
for	O
use	O
by	O
individual	O
users	O
retrieving	O
messages	O
and	O
managing	O
mail	O
boxes	O
.	O
</s>
<s>
To	O
permit	O
an	O
intermittently-connected	O
mail	B-Protocol
server	I-Protocol
to	O
pull	O
messages	O
from	O
a	O
remote	O
server	B-Application
on	O
demand	O
,	O
SMTP	B-Protocol
has	O
a	O
feature	O
to	O
initiate	O
mail	O
queue	O
processing	O
on	O
a	O
remote	O
server	B-Application
(	O
see	O
Remote	O
Message	O
Queue	O
Starting	O
below	O
)	O
.	O
</s>
<s>
POP	O
and	O
IMAP	B-Protocol
are	O
unsuitable	O
protocols	O
for	O
relaying	O
mail	O
by	O
intermittently-connected	O
machines	O
;	O
they	O
are	O
designed	O
to	O
operate	O
after	O
final	O
delivery	O
,	O
when	O
information	O
critical	O
to	O
the	O
correct	O
operation	O
of	O
mail	B-Protocol
relay	I-Protocol
(	O
the	O
"	O
mail	O
envelope	O
"	O
)	O
has	O
been	O
removed	O
.	O
</s>
<s>
Remote	O
Message	O
Queue	O
Starting	O
enables	O
a	O
remote	O
host	O
to	O
start	O
processing	O
of	O
the	O
mail	O
queue	O
on	O
a	O
server	B-Application
so	O
it	O
may	O
receive	O
messages	O
destined	O
to	O
it	O
by	O
sending	O
a	O
corresponding	O
command	O
.	O
</s>
<s>
The	O
original	O
TURN	O
command	O
was	O
deemed	O
insecure	O
and	O
was	O
extended	O
in	O
with	O
the	O
ETRN	B-Protocol
command	O
which	O
operates	O
more	O
securely	O
using	O
an	O
authentication	O
method	O
based	O
on	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
information	O
.	O
</s>
<s>
An	O
email	B-Protocol
client	I-Protocol
needs	O
to	O
know	O
the	O
IP	O
address	O
of	O
its	O
initial	O
SMTP	B-Protocol
server	I-Protocol
and	O
this	O
has	O
to	O
be	O
given	O
as	O
part	O
of	O
its	O
configuration	O
(	O
usually	O
given	O
as	O
a	O
DNS	B-Protocol
name	I-Protocol
)	O
.	O
</s>
<s>
This	O
server	B-Application
will	O
deliver	O
outgoing	O
messages	O
on	O
behalf	O
of	O
the	O
user	O
.	O
</s>
<s>
Server	B-Application
administrators	O
need	O
to	O
impose	O
some	O
control	O
on	O
which	O
clients	O
can	O
use	O
the	O
server	B-Application
.	O
</s>
<s>
In	O
the	O
past	O
,	O
many	O
systems	O
imposed	O
usage	O
restrictions	O
by	O
the	O
location	O
of	O
the	O
client	B-Protocol
,	O
only	O
permitting	O
usage	O
by	O
clients	O
whose	O
IP	O
address	O
is	O
one	O
that	O
the	O
server	B-Application
administrators	O
control	O
.	O
</s>
<s>
Usage	O
from	O
any	O
other	O
client	B-Protocol
IP	O
address	O
is	O
disallowed	O
.	O
</s>
<s>
Modern	O
SMTP	B-Protocol
servers	I-Protocol
typically	O
offer	O
an	O
alternative	O
system	O
that	O
requires	O
authentication	O
of	O
clients	O
by	O
credentials	O
before	O
allowing	O
access	O
.	O
</s>
<s>
Under	O
this	O
system	O
,	O
an	O
ISP	O
's	O
SMTP	B-Protocol
server	I-Protocol
will	O
not	O
allow	O
access	O
by	O
users	O
who	O
are	O
outside	O
the	O
ISP	O
's	O
network	O
.	O
</s>
<s>
More	O
precisely	O
,	O
the	O
server	B-Application
may	O
only	O
allow	O
access	O
to	O
users	O
with	O
an	O
IP	O
address	O
provided	O
by	O
the	O
ISP	O
,	O
which	O
is	O
equivalent	O
to	O
requiring	O
that	O
they	O
are	O
connected	O
to	O
the	O
Internet	O
using	O
that	O
same	O
ISP	O
.	O
</s>
<s>
A	O
mobile	O
user	O
may	O
often	O
be	O
on	O
a	O
network	O
other	O
than	O
that	O
of	O
their	O
normal	O
ISP	O
,	O
and	O
will	O
then	O
find	O
that	O
sending	O
email	O
fails	O
because	O
the	O
configured	O
SMTP	B-Protocol
server	I-Protocol
choice	O
is	O
no	O
longer	O
accessible	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
organisation	O
's	O
SMTP	B-Protocol
server	I-Protocol
may	O
only	O
provide	O
service	O
to	O
users	O
on	O
the	O
same	O
network	O
,	O
enforcing	O
this	O
by	O
firewalling	O
to	O
block	O
access	O
by	O
users	O
on	O
the	O
wider	O
Internet	O
.	O
</s>
<s>
Or	O
the	O
server	B-Application
may	O
perform	O
range	O
checks	O
on	O
the	O
client	B-Protocol
's	O
IP	O
address	O
.	O
</s>
<s>
These	O
methods	O
were	O
typically	O
used	O
by	O
corporations	O
and	O
institutions	O
such	O
as	O
universities	O
which	O
provided	O
an	O
SMTP	B-Protocol
server	I-Protocol
for	O
outbound	O
mail	O
only	O
for	O
use	O
internally	O
within	O
the	O
organisation	O
.	O
</s>
<s>
However	O
,	O
most	O
of	O
these	O
bodies	O
now	O
use	O
client	B-Protocol
authentication	O
methods	O
,	O
as	O
described	O
below	O
.	O
</s>
<s>
Where	O
a	O
user	O
is	O
mobile	O
,	O
and	O
may	O
use	O
different	O
ISPs	O
to	O
connect	O
to	O
the	O
internet	O
,	O
this	O
kind	O
of	O
usage	O
restriction	O
is	O
onerous	O
,	O
and	O
altering	O
the	O
configured	O
outbound	O
email	O
SMTP	B-Protocol
server	I-Protocol
address	O
is	O
impractical	O
.	O
</s>
<s>
It	O
is	O
highly	O
desirable	O
to	O
be	O
able	O
to	O
use	O
email	B-Protocol
client	I-Protocol
configuration	O
information	O
that	O
does	O
not	O
need	O
to	O
change	O
.	O
</s>
<s>
Modern	O
SMTP	B-Protocol
servers	I-Protocol
typically	O
require	O
authentication	O
of	O
clients	O
by	O
credentials	O
before	O
allowing	O
access	O
,	O
rather	O
than	O
restricting	O
access	O
by	O
location	O
as	O
described	O
earlier	O
.	O
</s>
<s>
This	O
more	O
flexible	O
system	O
is	O
friendly	O
to	O
mobile	O
users	O
and	O
allows	O
them	O
to	O
have	O
a	O
fixed	O
choice	O
of	O
configured	O
outbound	O
SMTP	B-Protocol
server	I-Protocol
.	O
</s>
<s>
SMTP	B-Protocol
Authentication	O
,	O
often	O
abbreviated	O
SMTP	B-Protocol
AUTH	O
,	O
is	O
an	O
extension	O
of	O
the	O
SMTP	B-Protocol
in	O
order	O
to	O
log	O
in	O
using	O
an	O
authentication	O
mechanism	O
.	O
</s>
<s>
Communication	O
between	O
mail	B-Protocol
servers	I-Protocol
generally	O
uses	O
the	O
standard	O
TCP	B-Protocol
port	I-Protocol
25	I-Protocol
designated	O
for	O
SMTP	B-Protocol
.	O
</s>
<s>
Mail	B-Protocol
clients	I-Protocol
however	O
generally	O
do	O
n't	O
use	O
this	O
,	O
instead	O
using	O
specific	O
"	O
submission	O
"	O
ports	O
.	O
</s>
<s>
465	O
This	O
port	B-Protocol
was	O
deprecated	O
after	O
,	O
until	O
the	O
issue	O
of	O
.	O
</s>
<s>
Port	B-Protocol
2525	O
and	O
others	O
may	O
be	O
used	O
by	O
some	O
individual	O
providers	O
,	O
but	O
have	O
never	O
been	O
officially	O
supported	O
.	O
</s>
<s>
Many	O
Internet	O
service	O
providers	O
now	O
block	O
all	O
outgoing	O
port	B-Protocol
25	I-Protocol
traffic	O
from	O
their	O
customers	O
.	O
</s>
<s>
A	O
typical	O
example	O
of	O
sending	O
a	O
message	O
via	O
SMTP	B-Protocol
to	O
two	O
mailboxes	O
(	O
alice	O
and	O
theboss	O
)	O
located	O
in	O
the	O
same	O
mail	O
domain	O
(	O
example.com	O
)	O
is	O
reproduced	O
in	O
the	O
following	O
session	O
exchange	O
.	O
</s>
<s>
(	O
In	O
this	O
example	O
,	O
the	O
conversation	O
parts	O
are	O
prefixed	O
with	O
S	O
:	O
and	O
C	O
:	O
,	O
for	O
server	B-Application
and	O
client	B-Protocol
,	O
respectively	O
;	O
these	O
labels	O
are	O
not	O
part	O
of	O
the	O
exchange	O
.	O
)	O
</s>
<s>
After	O
the	O
message	O
sender	O
(	O
SMTP	B-Protocol
client	B-Protocol
)	O
establishes	O
a	O
reliable	O
communications	O
channel	O
to	O
the	O
message	O
receiver	O
(	O
SMTP	B-Protocol
server	I-Protocol
)	O
,	O
the	O
session	O
is	O
opened	O
with	O
a	O
greeting	O
by	O
the	O
server	B-Application
,	O
usually	O
containing	O
its	O
fully	B-Protocol
qualified	I-Protocol
domain	I-Protocol
name	I-Protocol
(	O
FQDN	B-Protocol
)	O
,	O
in	O
this	O
case	O
smtp.example.com	O
.	O
</s>
<s>
The	O
client	B-Protocol
notifies	O
the	O
receiver	O
of	O
the	O
originating	O
email	O
address	O
of	O
the	O
message	O
in	O
a	O
MAIL	O
FROM	O
command	O
.	O
</s>
<s>
In	O
this	O
example	O
the	O
email	O
message	O
is	O
sent	O
to	O
two	O
mailboxes	O
on	O
the	O
same	O
SMTP	B-Protocol
server	I-Protocol
:	O
one	O
for	O
each	O
recipient	O
listed	O
in	O
the	O
To	O
:	O
and	O
Cc	O
:	O
header	O
fields	O
.	O
</s>
<s>
The	O
corresponding	O
SMTP	B-Protocol
command	O
is	O
RCPT	O
TO	O
.	O
</s>
<s>
Each	O
successful	O
reception	O
and	O
execution	O
of	O
a	O
command	O
is	O
acknowledged	O
by	O
the	O
server	B-Application
with	O
a	O
result	B-Protocol
code	I-Protocol
and	I-Protocol
response	I-Protocol
message	I-Protocol
(	O
e.g.	O
,	O
250	O
Ok	O
)	O
.	O
</s>
<s>
Since	O
a	O
message	O
body	O
can	O
contain	O
a	O
line	O
with	O
just	O
a	O
period	O
as	O
part	O
of	O
the	O
text	O
,	O
the	O
client	B-Protocol
sends	O
two	O
periods	O
every	O
time	O
a	O
line	O
starts	O
with	O
a	O
period	O
;	O
correspondingly	O
,	O
the	O
server	B-Application
replaces	O
every	O
sequence	O
of	O
two	O
periods	O
at	O
the	O
beginning	O
of	O
a	O
line	O
with	O
a	O
single	O
one	O
.	O
</s>
<s>
The	O
server	B-Application
's	O
positive	O
reply	O
to	O
the	O
end-of-data	O
,	O
as	O
exemplified	O
,	O
implies	O
that	O
the	O
server	B-Application
has	O
taken	O
the	O
responsibility	O
of	O
delivering	O
the	O
message	O
.	O
</s>
<s>
The	O
probability	O
that	O
a	O
communication	O
failure	O
occurs	O
exactly	O
at	O
this	O
step	O
is	O
directly	O
proportional	O
to	O
the	O
amount	O
of	O
filtering	O
that	O
the	O
server	B-Application
performs	O
on	O
the	O
message	O
body	O
,	O
most	O
often	O
for	O
anti-spam	O
purposes	O
.	O
</s>
<s>
If	O
the	O
email	O
has	O
other	O
recipients	O
located	O
elsewhere	O
,	O
the	O
client	B-Protocol
would	O
QUIT	O
and	O
connect	O
to	O
an	O
appropriate	O
SMTP	B-Protocol
server	I-Protocol
for	O
subsequent	O
recipients	O
after	O
the	O
current	O
destination(s )	O
had	O
been	O
queued	O
.	O
</s>
<s>
The	O
information	O
that	O
the	O
client	B-Protocol
sends	O
in	O
the	O
HELO	O
and	O
MAIL	O
FROM	O
commands	O
are	O
added	O
(	O
not	O
seen	O
in	O
example	O
code	O
)	O
as	O
additional	O
header	O
fields	O
to	O
the	O
message	O
by	O
the	O
receiving	O
server	B-Application
.	O
</s>
<s>
This	O
causes	O
an	O
error	O
on	O
the	O
server	B-Application
when	O
trying	O
to	O
send	O
the	O
221	O
Bye	O
reply	O
.	O
</s>
<s>
Clients	O
learn	O
a	O
server	B-Application
's	O
supported	O
options	O
by	O
using	O
the	O
EHLO	B-Protocol
greeting	O
,	O
as	O
exemplified	O
below	O
,	O
instead	O
of	O
the	O
original	O
HELO	O
.	O
</s>
<s>
Clients	O
fall	O
back	O
to	O
HELO	O
only	O
if	O
the	O
server	B-Application
does	O
not	O
support	O
EHLO	B-Protocol
greeting	O
.	O
</s>
<s>
Modern	O
clients	O
may	O
use	O
the	O
ESMTP	B-Protocol
extension	O
keyword	O
SIZE	O
to	O
query	O
the	O
server	B-Application
for	O
the	O
maximum	O
message	O
size	O
that	O
will	O
be	O
accepted	O
.	O
</s>
<s>
Users	O
can	O
manually	O
determine	O
in	O
advance	O
the	O
maximum	O
size	O
accepted	O
by	O
ESMTP	B-Protocol
servers	O
.	O
</s>
<s>
The	O
client	B-Protocol
replaces	O
the	O
HELO	O
command	O
with	O
the	O
EHLO	B-Protocol
command	O
.	O
</s>
<s>
In	O
the	O
simplest	O
case	O
,	O
an	O
ESMTP	B-Protocol
server	B-Application
declares	O
a	O
maximum	O
SIZE	O
immediately	O
after	O
receiving	O
an	O
EHLO	B-Protocol
.	O
</s>
<s>
According	O
to	O
,	O
however	O
,	O
the	O
numeric	O
parameter	O
to	O
the	O
SIZE	O
extension	O
in	O
the	O
EHLO	B-Protocol
response	O
is	O
optional	O
.	O
</s>
<s>
Clients	O
may	O
instead	O
,	O
when	O
issuing	O
a	O
MAIL	O
FROM	O
command	O
,	O
include	O
a	O
numeric	O
estimate	O
of	O
the	O
size	O
of	O
the	O
message	O
they	O
are	O
transferring	O
,	O
so	O
that	O
the	O
server	B-Application
can	O
refuse	O
receipt	O
of	O
overly-large	O
messages	O
.	O
</s>
<s>
Original	O
SMTP	B-Protocol
supports	O
only	O
a	O
single	O
body	O
of	O
ASCII	B-Protocol
text	I-Protocol
,	O
therefore	O
any	O
binary	O
data	O
needs	O
to	O
be	O
encoded	O
as	O
text	O
into	O
that	O
body	O
of	O
the	O
message	O
before	O
transfer	O
,	O
and	O
then	O
decoded	O
by	O
the	O
recipient	O
.	O
</s>
<s>
Binary-to-text	O
encodings	O
,	O
such	O
as	O
uuencode	B-Device
and	O
BinHex	O
were	O
typically	O
used	O
.	O
</s>
<s>
It	O
was	O
standardized	O
in	O
1994	O
as	O
It	O
facilitates	O
the	O
transparent	O
exchange	O
of	O
e-mail	O
messages	O
containing	O
octets	O
outside	O
the	O
seven-bit	B-Protocol
ASCII	I-Protocol
character	O
set	O
by	O
encoding	O
them	O
as	O
MIME	B-Protocol
content	O
parts	O
,	O
typically	O
encoded	O
with	O
Base64	B-Protocol
.	O
</s>
<s>
On-Demand	B-Protocol
Mail	I-Protocol
Relay	I-Protocol
(	O
ODMR	O
)	O
is	O
an	O
SMTP	B-Protocol
extension	O
standardized	O
in	O
that	O
allows	O
an	O
intermittently-connected	O
SMTP	B-Protocol
server	I-Protocol
to	O
receive	O
email	O
queued	O
for	O
it	O
when	O
it	O
is	O
connected	O
.	O
</s>
<s>
Original	O
SMTP	B-Protocol
supports	O
email	O
addresses	O
composed	O
of	O
ASCII	B-Protocol
characters	I-Protocol
only	O
,	O
which	O
is	O
inconvenient	O
for	O
users	O
whose	O
native	O
script	O
is	O
not	O
Latin	O
based	O
,	O
or	O
who	O
use	O
diacritic	O
not	O
in	O
the	O
ASCII	B-Protocol
character	I-Protocol
set	I-Protocol
.	O
</s>
<s>
Current	O
support	O
is	O
limited	O
,	O
but	O
there	O
is	O
strong	O
interest	O
in	O
broad	O
adoption	O
of	O
and	O
the	O
related	O
RFCs	O
in	O
countries	O
like	O
China	O
that	O
have	O
a	O
large	O
user	O
base	O
where	O
Latin	O
(	O
ASCII	B-Protocol
)	O
is	O
a	O
foreign	O
script	O
.	O
</s>
<s>
Like	O
SMTP	B-Protocol
,	O
ESMTP	B-Protocol
is	O
a	O
protocol	O
used	O
to	O
transport	O
Internet	O
mail	O
.	O
</s>
<s>
It	O
is	O
used	O
as	O
both	O
an	O
inter-server	O
transport	O
protocol	O
and	O
(	O
with	O
restricted	O
behavior	O
enforced	O
)	O
a	O
mail	O
submission	O
protocol	O
.	O
</s>
<s>
The	O
main	O
identification	O
feature	O
for	O
ESMTP	B-Protocol
clients	O
is	O
to	O
open	O
a	O
transmission	O
with	O
the	O
command	O
EHLO	B-Protocol
(	O
Extended	O
HELLO	O
)	O
,	O
rather	O
than	O
HELO	O
(	O
Hello	O
,	O
the	O
original	O
standard	O
)	O
.	O
</s>
<s>
A	O
server	B-Application
will	O
respond	O
with	O
success	O
(	O
code	O
250	O
)	O
,	O
failure	O
(	O
code	O
550	O
)	O
or	O
error	O
(	O
code	O
500	O
,	O
501	O
,	O
502	O
,	O
504	O
,	O
or	O
421	O
)	O
,	O
depending	O
on	O
its	O
configuration	O
.	O
</s>
<s>
An	O
ESMTP	B-Protocol
server	B-Application
returns	O
the	O
code	O
250	O
OK	O
in	O
a	O
multi-line	O
reply	O
with	O
its	O
domain	O
and	O
a	O
list	O
of	O
keywords	O
to	O
indicate	O
supported	O
extensions	O
.	O
</s>
<s>
A	O
RFC	B-Protocol
821	I-Protocol
compliant	O
server	B-Application
returns	O
error	O
code	O
500	O
,	O
allowing	O
ESMTP	B-Protocol
clients	O
to	O
try	O
either	O
HELO	O
or	O
QUIT	O
.	O
</s>
<s>
The	O
first	O
definitions	O
were	O
the	O
RFC	B-Protocol
821	I-Protocol
optional	O
services	O
:	O
SEND	O
,	O
SOML	O
(	O
Send	O
or	O
Mail	O
)	O
,	O
SAML	O
(	O
Send	O
and	O
Mail	O
)	O
,	O
EXPN	O
,	O
HELP	O
,	O
and	O
TURN	O
.	O
</s>
<s>
The	O
format	O
of	O
additional	O
SMTP	B-Protocol
verbs	O
was	O
set	O
and	O
for	O
new	O
parameters	O
in	O
MAIL	O
and	O
RCPT	O
.	O
</s>
<s>
ATRN	O
–	O
Authenticated	O
TURN	O
for	O
On-Demand	B-Protocol
Mail	I-Protocol
Relay	I-Protocol
,	O
</s>
<s>
AUTH	O
–	O
Authenticated	O
SMTP	B-Protocol
,	O
</s>
<s>
ETRN	B-Protocol
–	O
Extended	O
version	O
of	O
remote	O
message	O
queue	O
starting	O
command	O
TURN	O
,	O
</s>
<s>
The	O
ESMTP	B-Protocol
format	O
was	O
restated	O
in	O
(	O
superseding	O
RFC	B-Protocol
821	I-Protocol
)	O
and	O
updated	O
to	O
the	O
latest	O
definition	O
in	O
in	O
2008	O
.	O
</s>
<s>
Support	O
for	O
the	O
EHLO	B-Protocol
command	O
in	O
servers	O
became	O
mandatory	O
,	O
and	O
HELO	O
designated	O
a	O
required	O
fallback	O
.	O
</s>
<s>
Non-standard	O
,	O
unregistered	O
,	O
service	O
extensions	O
can	O
be	O
used	O
by	O
bilateral	O
agreement	O
,	O
these	O
services	O
are	O
indicated	O
by	O
an	O
EHLO	B-Protocol
message	O
keyword	O
starting	O
with	O
"	O
X	O
"	O
,	O
and	O
with	O
any	O
additional	O
parameters	O
or	O
verbs	O
similarly	O
marked	O
.	O
</s>
<s>
SMTP	B-Protocol
commands	O
are	O
case-insensitive	O
.	O
</s>
<s>
An	O
SMTP	B-Protocol
server	I-Protocol
that	O
requires	O
a	O
specific	O
capitalization	O
method	O
is	O
a	O
violation	O
of	O
the	O
standard	O
.	O
</s>
<s>
Exim	B-Protocol
and	O
qmail	B-Application
do	O
not	O
translate	O
eight-bit	O
messages	O
to	O
seven-bit	O
when	O
making	O
an	O
attempt	O
to	O
relay	O
8-bit	O
data	O
to	O
non-8BITMIME	O
peers	O
,	O
as	O
is	O
required	O
by	O
the	O
RFC	O
.	O
</s>
<s>
This	O
does	O
not	O
cause	O
problems	O
in	O
practice	O
,	O
since	O
virtually	O
all	O
modern	O
mail	B-Protocol
relays	I-Protocol
are	O
8-bit	O
clean	O
.	O
</s>
<s>
Microsoft	B-Operating_System
Exchange	I-Operating_System
Server	I-Operating_System
2003	O
advertises	O
8BITMIME	O
by	O
default	O
,	O
but	O
relaying	O
to	O
a	O
non-8BITMIME	O
peer	O
results	O
in	O
a	O
bounce	O
.	O
</s>
<s>
The	O
SMTP-AUTH	O
extension	O
provides	O
an	O
access	O
control	O
mechanism	O
.	O
</s>
<s>
It	O
consists	O
of	O
an	O
authentication	O
step	O
through	O
which	O
the	O
client	B-Protocol
effectively	O
logs	O
into	O
the	O
mail	B-Protocol
server	I-Protocol
during	O
the	O
process	O
of	O
sending	O
mail	O
.	O
</s>
<s>
Servers	O
that	O
support	O
SMTP-AUTH	O
can	O
usually	O
be	O
configured	O
to	O
require	O
clients	O
to	O
use	O
this	O
extension	O
,	O
ensuring	O
the	O
true	O
identity	O
of	O
the	O
sender	O
is	O
known	O
.	O
</s>
<s>
The	O
SMTP-AUTH	O
extension	O
is	O
defined	O
in	O
.	O
</s>
<s>
SMTP-AUTH	O
can	O
be	O
used	O
to	O
allow	O
legitimate	O
users	O
to	O
relay	O
mail	O
while	O
denying	O
relay	O
service	O
to	O
unauthorized	O
users	O
,	O
such	O
as	O
spammers	O
.	O
</s>
<s>
It	O
does	O
not	O
necessarily	O
guarantee	O
the	O
authenticity	O
of	O
either	O
the	O
SMTP	B-Protocol
envelope	O
sender	O
or	O
the	O
"	O
From	O
:	O
"	O
header	O
.	O
</s>
<s>
For	O
example	O
,	O
spoofing	O
,	O
in	O
which	O
one	O
sender	O
masquerades	O
as	O
someone	O
else	O
,	O
is	O
still	O
possible	O
with	O
SMTP-AUTH	O
unless	O
the	O
server	B-Application
is	O
configured	O
to	O
limit	O
message	O
from-addresses	O
to	O
addresses	O
this	O
AUTHed	O
user	O
is	O
authorized	O
for	O
.	O
</s>
<s>
The	O
SMTP-AUTH	O
extension	O
also	O
allows	O
one	O
mail	B-Protocol
server	I-Protocol
to	O
indicate	O
to	O
another	O
that	O
the	O
sender	O
has	O
been	O
authenticated	O
when	O
relaying	O
mail	O
.	O
</s>
<s>
In	O
general	O
this	O
requires	O
the	O
recipient	O
server	B-Application
to	O
trust	O
the	O
sending	O
server	B-Application
,	O
meaning	O
that	O
this	O
aspect	O
of	O
SMTP-AUTH	O
is	O
rarely	O
used	O
on	O
the	O
Internet	O
.	O
</s>
<s>
Haraka	B-Protocol
and	O
other	O
servers	O
.	O
</s>
<s>
Oracle	B-Application
Communications	I-Application
Messaging	I-Application
Server	I-Application
as	O
of	O
release	O
8.0.2	O
.	O
</s>
<s>
The	O
STARTTLS	B-Protocol
extensions	O
enables	O
supporting	O
SMTP	B-Protocol
servers	I-Protocol
to	O
notify	O
connecting	O
clients	O
that	O
it	O
supports	O
TLS	B-Protocol
encrypted	O
communication	O
and	O
offers	O
the	O
opportunity	O
for	O
clients	O
to	O
upgrade	O
their	O
connection	O
by	O
sending	O
the	O
STARTTLS	B-Protocol
command	O
.	O
</s>
<s>
Servers	O
supporting	O
the	O
extension	O
do	O
not	O
inherently	O
gain	O
any	O
security	O
benefits	O
from	O
its	O
implementation	O
on	O
its	O
own	O
,	O
as	O
upgrading	O
to	O
a	O
TLS	B-Protocol
encrypted	O
session	O
is	O
dependent	O
on	O
the	O
connecting	O
client	B-Protocol
deciding	O
to	O
exercise	O
this	O
option	O
,	O
hence	O
the	O
term	O
opportunistic	B-Protocol
TLS	I-Protocol
.	O
</s>
<s>
STARTTLS	B-Protocol
is	O
effective	O
only	O
against	O
passive	O
observation	O
attacks	O
,	O
since	O
the	O
STARTTLS	B-Protocol
negotiation	O
happens	O
in	O
plain	O
text	O
and	O
an	O
active	O
attacker	O
can	O
trivially	O
remove	O
STARTTLS	B-Protocol
commands	O
.	O
</s>
<s>
This	O
type	O
of	O
man-in-the-middle	O
attack	O
is	O
sometimes	O
referred	O
to	O
as	O
STRIPTLS	O
,	O
where	O
the	O
encryption	B-Protocol
negotiation	O
information	O
sent	O
from	O
one	O
end	O
never	O
reaches	O
the	O
other	O
.	O
</s>
<s>
In	O
this	O
scenario	O
both	O
parties	O
take	O
the	O
invalid	O
or	O
unexpected	O
responses	O
as	O
indication	O
that	O
the	O
other	O
does	O
not	O
properly	O
support	O
STARTTLS	B-Protocol
,	O
defaulting	O
to	O
traditional	O
plain-text	O
mail	O
transfer	O
.	O
</s>
<s>
Note	O
that	O
STARTTLS	B-Protocol
is	O
also	O
defined	O
for	O
IMAP	B-Protocol
and	O
POP3	B-Protocol
in	O
other	O
RFCs	O
,	O
but	O
these	O
protocols	O
serve	O
different	O
purposes	O
:	O
SMTP	B-Protocol
is	O
used	O
for	O
communication	O
between	O
message	B-Protocol
transfer	I-Protocol
agents	I-Protocol
,	O
while	O
IMAP	B-Protocol
and	O
POP3	B-Protocol
are	O
for	O
end	O
clients	O
and	O
message	B-Protocol
transfer	I-Protocol
agents	I-Protocol
.	O
</s>
<s>
In	O
2014	O
the	O
Electronic	O
Frontier	O
Foundation	O
began	O
"	O
STARTTLS	B-Protocol
Everywhere	O
"	O
project	O
that	O
,	O
similarly	O
to	O
"	O
HTTPS	B-Operating_System
Everywhere	I-Operating_System
"	O
list	O
,	O
allowed	O
relying	O
parties	O
to	O
discover	O
others	O
supporting	O
secure	O
communication	O
without	O
prior	O
communication	O
.	O
</s>
<s>
The	O
project	O
stopped	O
accepting	O
submissions	O
on	O
29	O
April	O
2021	O
,	O
and	O
EFF	O
recommended	O
switching	O
to	O
DANE	B-Protocol
and	O
MTA-STS	O
for	O
discovering	O
information	O
on	O
peers	O
 '	O
TLS	B-Protocol
support	O
.	O
</s>
<s>
officially	O
declared	O
plain	O
text	O
obsolete	O
and	O
recommend	O
always	O
using	O
TLS	B-Protocol
for	O
mail	O
submission	O
and	O
access	O
,	O
adding	O
ports	O
with	O
implicit	O
TLS	B-Protocol
.	O
</s>
<s>
A	O
newer	O
2018	O
called	O
"	O
SMTP	B-Protocol
MTA	B-Protocol
Strict	O
Transport	O
Security	O
(	O
MTA-STS	O
)	O
"	O
aims	O
to	O
address	O
the	O
problem	O
of	O
active	O
adversary	O
by	O
defining	O
a	O
protocol	O
for	O
mail	B-Protocol
servers	I-Protocol
to	O
declare	O
their	O
ability	O
to	O
use	O
secure	O
channels	O
in	O
specific	O
files	O
on	O
the	O
server	B-Application
and	O
specific	O
DNS	B-Protocol
TXT	O
records	O
.	O
</s>
<s>
Note	O
that	O
MTA-STS	O
records	O
apply	O
only	O
to	O
SMTP	B-Protocol
traffic	O
between	O
mail	B-Protocol
servers	I-Protocol
while	O
communications	O
between	O
a	O
user	O
's	O
client	B-Protocol
and	O
the	O
mail	B-Protocol
server	I-Protocol
are	O
protected	O
by	O
Transport	B-Protocol
Layer	I-Protocol
Security	I-Protocol
with	O
SMTP/MSA	O
,	O
IMAP	B-Protocol
,	O
POP3	B-Protocol
,	O
or	O
HTTPS	B-Protocol
in	O
combination	O
with	O
an	O
organizational	O
or	O
technical	O
policy	O
.	O
</s>
<s>
Essentially	O
,	O
MTA-STS	O
is	O
a	O
means	O
to	O
extend	O
such	O
a	O
policy	O
to	O
third	O
parties	O
.	O
</s>
<s>
In	O
April	O
2019	O
Google	B-Application
Mail	I-Application
announced	O
support	O
for	O
MTA-STS	O
.	O
</s>
<s>
"	O
SMTP	B-Protocol
TLS	B-Protocol
Reporting	O
"	O
describes	O
a	O
reporting	O
mechanism	O
and	O
format	O
for	O
sharing	O
statistics	O
and	O
specific	O
information	O
about	O
potential	O
failures	O
with	O
recipient	O
domains	O
.	O
</s>
<s>
In	O
April	O
2019	O
Google	B-Application
Mail	I-Application
announced	O
support	O
for	O
SMTP	B-Protocol
TLS	B-Protocol
Reporting	O
.	O
</s>
<s>
The	O
original	O
design	O
of	O
SMTP	B-Protocol
had	O
no	O
facility	O
to	O
authenticate	O
senders	O
,	O
or	O
check	O
that	O
servers	O
were	O
authorized	O
to	O
send	O
on	O
their	O
behalf	O
,	O
with	O
the	O
result	O
that	O
email	O
spoofing	O
is	O
possible	O
,	O
and	O
commonly	O
used	O
in	O
email	O
spam	O
and	O
phishing	O
.	O
</s>
<s>
Occasional	O
proposals	O
are	O
made	O
to	O
modify	O
SMTP	B-Protocol
extensively	O
or	O
replace	O
it	O
completely	O
.	O
</s>
<s>
One	O
example	O
of	O
this	O
is	O
Internet	O
Mail	O
2000	O
,	O
but	O
neither	O
it	O
,	O
nor	O
any	O
other	O
has	O
made	O
much	O
headway	O
in	O
the	O
face	O
of	O
the	O
network	O
effect	O
of	O
the	O
huge	O
installed	O
base	O
of	O
classic	O
SMTP	B-Protocol
.	O
</s>
<s>
Instead	O
,	O
mail	B-Protocol
servers	I-Protocol
now	O
use	O
a	O
range	O
of	O
techniques	O
,	O
such	O
as	O
stricter	O
enforcement	O
of	O
standards	O
such	O
as	O
,	O
DomainKeys	B-Protocol
Identified	I-Protocol
Mail	I-Protocol
,	O
Sender	B-Protocol
Policy	I-Protocol
Framework	I-Protocol
and	O
DMARC	O
,	O
DNSBLs	O
and	O
greylisting	O
to	O
reject	O
or	O
quarantine	O
suspicious	O
emails	O
.	O
</s>
