Vous êtes sur la page 1sur 10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

SimpleMailTransferProtocol
FromWikipedia,thefreeencyclopedia

SimpleMailTransferProtocol(SMTP)isanInternetstandardforelectronicmail(email)transmission.First
definedbyRFC821in1982,itwaslastupdatedin2008withtheExtendedSMTPadditionsbyRFC5321which
istheprotocolinwidespreadusetoday.
SMTPbydefaultusesTCPport25.Theprotocolformailsubmissionisthesame,butusesport587.SMTP
connectionssecuredbySSL,knownasSMTPS,defaulttoport465(nonstandard,butsometimesusedforlegacy
reasons).
AlthoughelectronicmailserversandothermailtransferagentsuseSMTPtosendandreceivemailmessages,user
levelclientmailapplicationstypicallyuseSMTPonlyforsendingmessagestoamailserverforrelaying.For
retrievingmessages,clientapplicationsusuallyuseeitherPOP3orIMAP.
Althoughproprietarysystems(suchasMicrosoftExchangeandIBMNotes)andwebmailsystems(suchas
Outlook.com,GmailandYahoo!Mail)usetheirownnonstandardprotocolstoaccessmailboxaccountsontheir
ownmailservers,alluseSMTPwhensendingorreceivingemailfromoutsidetheirownsystems.

Contents
1 History
2 Mailprocessingmodel
3 Protocoloverview
3.1 SMTPvsmailretrieval
3.2 RemoteMessageQueueStarting
3.3 OnDemandMailRelay
3.4 Internationalization
4 OutgoingmailSMTPserver
4.1 Outgoingmailserveraccessrestrictions
4.1.1 Restrictingaccessbylocation
4.1.2 Clientauthentication
4.1.3 Openrelay
4.2 Ports
5 SMTPtransportexample
6 Optionalextensions
7 Spoofingandspamming
8 Implementations
9 Relatedrequestsforcomments
10 Seealso
11 Notes
12 References
13 Externallinks

History

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

1/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

Variousformsofonetooneelectronicmessagingwereusedinthe1960s.Peoplecommunicatedwithoneanother
usingsystemsdevelopedforspecificmainframecomputers.Asmorecomputerswereinterconnected,especiallyin
theUSGovernment'sARPANET,standardsweredevelopedtoallowusersofdifferentsystemstoemailone
another.SMTPgrewoutofthesestandardsdevelopedduringthe1970s.
SMTPcantraceitsrootstotwoimplementationsdescribedin1971:theMailBoxProtocol,whoseimplementation
hasbeendisputed,[1]butisdiscussedinRFC196andotherRFCs,andtheSNDMSGprogram,which,accordingto
RFC2235,RayTomlinsonofBBNinventedforTENEXcomputerstosendmailmessagesacrossthe
ARPANET.[2][3][4]Fewerthan50hostswereconnectedtotheARPANETatthistime.[5]
FurtherimplementationsincludeFTPMail[6]andMailProtocol,bothfrom1973.[7]Developmentworkcontinued
throughoutthe1970s,untiltheARPANETtransitionedintothemodernInternetaround1980.JonPostelthen
proposedaMailTransferProtocolin1980thatbegantoremovethemail'srelianceonFTP.[8]SMTPwas
publishedasRFC788inNovember1981,alsobyPostel.
TheSMTPstandardwasdevelopedaroundthesametimeasUsenet,aonetomanycommunicationnetworkwith
somesimilarities.
SMTPbecamewidelyusedintheearly1980s.Atthetime,itwasacomplementtoUnixtoUnixCopyProgram
(UUCP)mail,whichwasbettersuitedforhandlingemailtransfersbetweenmachinesthatwereintermittently
connected.SMTP,ontheotherhand,worksbestwhenboththesendingandreceivingmachinesareconnectedto
thenetworkallthetime.Bothuseastoreandforwardmechanismandareexamplesofpushtechnology.Though
Usenet'snewsgroupsarestillpropagatedwithUUCPbetweenservers,[9]UUCPasamailtransporthasvirtually
disappeared[10]alongwiththe"bangpaths"itusedasmessageroutingheaders.[11]
Sendmail,releasedwith4.1cBSD,rightafterRFC788,wasoneofthefirstmailtransferagentstoimplement
SMTP.[12]Overtime,asBSDUnixbecamethemostpopularoperatingsystemontheInternet,sendmailbecame
themostcommonMTA(mailtransferagent).[13]SomeotherpopularSMTPserverprogramsincludePostfix,
qmail,NovellGroupWise,Exim,NovellNetMail,MicrosoftExchangeServerandOracleCommunications
MessagingServer.
Messagesubmission(RFC2476)andSMTPAUTH(RFC2554)wereintroducedin1998and1999,both
describingnewtrendsinemaildelivery.Originally,SMTPserversweretypicallyinternaltoanorganization,
receivingmailfortheorganizationfromtheoutside,andrelayingmessagesfromtheorganizationtotheoutside.
Butastimewenton,SMTPservers(mailtransferagents),inpractice,wereexpandingtheirrolestobecome
messagesubmissionagentsforMailuseragents,someofwhichwerenowrelayingmailfromtheoutsideofan
organization.(e.g.acompanyexecutivewishestosendemailwhileonatripusingthecorporateSMTPserver.)
Thisissue,aconsequenceoftherapidexpansionandpopularityoftheWorldWideWeb,meantthatSMTPhadto
includespecificrulesandmethodsforrelayingmailandauthenticatinguserstopreventabusessuchasrelayingof
unsolicitedemail(spam).Workonmessagesubmission(RFC2476)wasoriginallystartedbecausepopularmail
serverswouldoftenrewritemailinanattempttofixproblemsinit,forexample,addingadomainnametoan
unqualifiedaddress.Thisbehaviorishelpfulwhenthemessagebeingfixedisaninitialsubmission,butdangerous
andharmfulwhenthemessageoriginatedelsewhereandisbeingrelayed.Cleanlyseparatingmailintosubmission
andrelaywasseenasawaytopermitandencouragerewritingsubmissionswhileprohibitingrewritingrelay.As
spambecamemoreprevalent,itwasalsoseenasawaytoprovideauthorizationformailbeingsentoutfroman
organization,aswellastraceability.Thisseparationofrelayandsubmissionquicklybecameafoundationfor
modernemailsecuritypractices.

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

2/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

AsthisprotocolstartedoutpurelyASCIItextbased,itdidnotdealwellwithbinaryfiles,orcharactersinmany
nonEnglishlanguages.StandardssuchasMultipurposeInternetMailExtensions(MIME)weredevelopedto
encodebinaryfilesfortransferthroughSMTP.Mailtransferagents(MTAs)developedafterSendmailalsotended
tobeimplemented8bitclean,sothatthealternate"justsendeight"strategycouldbeusedtotransmitarbitrary
textdata(inany8bitASCIIlikecharacterencoding)viaSMTP.Mojibakewasstillaproblemduetodiffering
charactersetmappingsbetweenvendors,althoughtheemailaddressesthemselvesstillallowedonlyASCII.8bit
cleanMTAstodaytendtosupportthe8BITMIMEextension,permittingbinaryfilestobetransmittedalmostas
easilyasplaintext.RecentlytheSMTPUTF8extensionwascreatedtosupportUTF8text,allowinginternational
contentandaddressesinnonLatinscriptslikeCyrillicorChinese.
ManypeoplecontributedtothecoreSMTPspecifications,amongthemJonPostel,EricAllman,DaveCrocker,
NedFreed,RandallGellens,JohnKlensin,andKeithMoore.

Mailprocessingmodel
Emailissubmittedbyamailclient(mailuseragent,MUA)to
amailserver(mailsubmissionagent,MSA)usingSMTPon
TCPport587.Mostmailboxprovidersstillallowsubmission
ontraditionalport25.TheMSAdeliversthemailtoitsmail
transferagent(mailtransferagent,MTA).Often,thesetwo
agentsareinstancesofthesamesoftwarelaunchedwith
differentoptionsonthesamemachine.Localprocessingcan
bedoneeitheronasinglemachine,orsplitamongmultiple
machinesmailagentprocessesononemachinecansharefiles,
butifprocessingisonmultiplemachines,theytransfer
messagesbetweeneachotherusingSMTP,whereeach
machineisconfiguredtousethenextmachineasasmarthost.
EachprocessisanMTA(anSMTPserver)initsownright.

BluearrowsdepictimplementationofSMTP
variations.

TheboundaryMTAusestheDomainnamesystem(DNS)tolookupthemailexchangerrecord(MXrecord)for
therecipient'sdomain(thepartoftheemailaddressontherightof@).TheMXrecordcontainsthenameofthe
targethost.Basedonthetargethostandotherfactors,theMTAselectsanexchangeserver:seethearticleMX
record.TheMTAconnectstotheexchangeserverasanSMTPclient.
MessagetransfercanoccurinasingleconnectionbetweentwoMTAs,orinaseriesofhopsthroughintermediary
systems.AreceivingSMTPservermaybetheultimatedestination,anintermediate"relay"(thatis,itstoresand
forwardsthemessage)ora"gateway"(thatis,itmayforwardthemessageusingsomeprotocolotherthanSMTP).
Eachhopisaformalhandoffofresponsibilityforthemessage,wherebythereceivingservermusteitherdeliver
themessageorproperlyreportthefailuretodoso.[14]
Oncethefinalhopacceptstheincomingmessage,ithandsittoamaildeliveryagent(MDA)forlocaldelivery.An
MDAsavesmessagesintherelevantmailboxformat.Aswithsending,thisreceptioncanbedoneusingoneor
multiplecomputers,butinthediagramabovetheMDAisdepictedasoneboxnearthemailexchangerbox.An
MDAmaydelivermessagesdirectlytostorage,orforwardthemoveranetworkusingSMTPorotherprotocol
suchasLocalMailTransferProtocol(LMTP),aderivativeofSMTPdesignedforthispurpose.
Oncedeliveredtothelocalmailserver,themailisstoredforbatchretrievalbyauthenticatedmailclients(MUAs).
Mailisretrievedbyenduserapplications,calledemailclients,usingInternetMessageAccessProtocol(IMAP),a
protocolthatbothfacilitatesaccesstomailandmanagesstoredmail,orthePostOfficeProtocol(POP)which

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

3/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

typicallyusesthetraditionalmboxmailfileformatoraproprietarysystemsuchasMicrosoftExchange/Outlookor
LotusNotes/Domino.Webmailclientsmayuseeithermethod,buttheretrievalprotocolisoftennotaformal
standard.
SMTPdefinesmessagetransport,notthemessagecontent.Thus,itdefinesthemailenvelopeanditsparameters,
suchastheenvelopesender,butnottheheader(excepttraceinformation)northebodyofthemessageitself.STD
10andRFC5321defineSMTP(theenvelope),whileSTD11andRFC5322definethemessage(headerand
body),formallyreferredtoastheInternetMessageFormat.

Protocoloverview
SMTPisaconnectionoriented,textbasedprotocolinwhichamailsendercommunicateswithamailreceiverby
issuingcommandstringsandsupplyingnecessarydataoverareliableordereddatastreamchannel,typicallya
TransmissionControlProtocol(TCP)connection.AnSMTPsessionconsistsofcommandsoriginatedbyanSMTP
client(theinitiatingagent,sender,ortransmitter)andcorrespondingresponsesfromtheSMTPserver(thelistening
agent,orreceiver)sothatthesessionisopened,andsessionparametersareexchanged.Asessionmayincludezero
ormoreSMTPtransactions.AnSMTPtransactionconsistsofthreecommand/replysequences:
1.MAILcommand,toestablishthereturnaddress,alsocalledreturnpath,[15]reversepath,[16]bounceaddress,
mfrom,orenvelopesender.
2.RCPTcommand,toestablisharecipientofthemessage.Thiscommandcanbeissuedmultipletimes,one
foreachrecipient.Theseaddressesarealsopartoftheenvelope.
3.DATAtosignalthebeginningofthemessagetextthecontentofthemessage,asopposedtoitsenvelope.It
consistsofamessageheaderandamessagebodyseparatedbyanemptyline.DATAisactuallyagroupof
commands,andtheserverrepliestwice:oncetotheDATAcommanditself,toacknowledgethatitisreadyto
receivethetext,andthesecondtimeaftertheendofdatasequence,toeitheracceptorrejecttheentire
message.
BesidestheintermediatereplyforDATA,eachserver'sreplycanbeeitherpositive(2xxreplycodes)ornegative.
Negativerepliescanbepermanent(5xxcodes)ortransient(4xxcodes).Arejectisapermanentfailureandthe
clientshouldsendabouncemessagetotheserveritreceiveditfrom.Adropisapositiveresponsefollowedby
messagediscardratherthandelivery.
Theinitiatinghost,theSMTPclient,canbeeitheranenduser'semailclient,functionallyidentifiedasamailuser
agent(MUA),orarelayserver'smailtransferagent(MTA),thatisanSMTPserveractingasanSMTPclient,in
therelevantsession,inordertorelaymail.FullycapableSMTPserversmaintainqueuesofmessagesforretrying
messagetransmissionsthatresultedintransientfailures.
AMUAknowstheoutgoingmailSMTPserverfromitsconfiguration.Arelayservertypicallydetermineswhich
servertoconnecttobylookinguptheMX(MaileXchange)DNSresourcerecordforeachrecipient'sdomain
name.IfnoMXrecordisfound,aconformantrelayingserver(notallare)insteadlooksuptheArecord.Relay
serverscanalsobeconfiguredtouseasmarthost.ArelayserverinitiatesaTCPconnectiontotheserveronthe
"wellknownport"forSMTP:port25,orforconnectingtoanMSA,port587.Themaindifferencebetweenan
MTAandanMSAisthatconnectingtoanMSArequiresSMTPAuthentication.

SMTPvsmailretrieval
SMTPisadeliveryprotocolonly.Innormaluse,mailis"pushed"toadestinationmailserver(ornexthopmail
server)asitarrives.Mailisroutedbasedonthedestinationserver,nottheindividualuser(s)towhichitis
addressed.Otherprotocols,suchasthePostOfficeProtocol(POP)andtheInternetMessageAccessProtocol
(IMAP)arespecificallydesignedforusebyindividualusersretrievingmessagesandmanagingmailboxes.To
https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

4/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

permitanintermittentlyconnectedmailservertopullmessagesfromaremoteserverondemand,SMTPhasa
featuretoinitiatemailqueueprocessingonaremoteserver(seeRemoteMessageQueueStartingbelow).POPand
IMAPareunsuitableprotocolsforrelayingmailbyintermittentlyconnectedmachinestheyaredesignedto
operateafterfinaldelivery,wheninformationcriticaltothecorrectoperationofmailrelay(the"mailenvelope")
hasbeenremoved.

RemoteMessageQueueStarting
RemoteMessageQueueStartingisafeatureofSMTPthatpermitsaremotehosttostartprocessingofthemail
queueonaserversoitmayreceivemessagesdestinedtoitbysendingtheTURNcommand.Thisfeaturehowever
wasdeemedinsecure[17]andwasextendedinRFC1985withtheETRNcommandwhichoperatesmoresecurely
usinganauthenticationmethodbasedonDomainNameSysteminformation.

OnDemandMailRelay
OnDemandMailRelay(ODMR)isanSMTPextensionstandardizedinRFC2645thatallowsanintermittently
connectedSMTPservertoreceiveemailqueuedforitwhenitisconnected.

Internationalization
UserswhosenativescriptisnotLatinbased,orwhousediacriticnotintheASCIIcharactersethavehaddifficulty
withtheLatinemailaddressrequirement.RFC6531wascreatedtosolvethatproblem,providing
internationalizationfeaturesforSMTP,theSMTPUTF8extensionandsupportformultibyteandnonASCII
charactersinemailaddresses,suchasthosewithdiacriticsandotherlanguagecharacterssuchasGreekand
Chinese.[18]
Currentsupportislimited,butthereisstronginterestinbroadadoptionofRFC6531andtherelatedRFCsin
countrieslikeChinathathavealargeuserbasewhereLatin(ASCII)isaforeignscript.

OutgoingmailSMTPserver
AnemailclientneedstoknowtheIPaddressofitsinitialSMTPserverandthishastobegivenaspartofits
configuration(usuallygivenasaDNSname).Thisserverwilldeliveroutgoingmessagesonbehalfoftheuser.

Outgoingmailserveraccessrestrictions
Serveradministratorsneedtoimposesomecontrolonwhichclientscanusetheserver.Thisenablesthemtodeal
withabuse,forexamplespam.Twosolutionshavebeenincommonuse:
Inthepast,manysystemsimposedusagerestrictionsbythelocationoftheclient,onlypermittingusageby
clientswhoseIPaddressisonethattheserveradministratorscontrol.UsagefromanyotherclientIPaddress
isdisallowed.
ModernSMTPserverstypicallyofferanalternativesystemthatrequiresauthenticationofclientsby
credentialsbeforeallowingaccess.
Restrictingaccessbylocation
Underthissystem,anISP'sSMTPserverwillnotallowaccessbyuserswhoareoutsidetheISP'snetwork.More
precisely,theservermayonlyallowaccesstouserswithanIPaddressprovidedbytheISP,whichisequivalentto
requiringthattheyareconnectedtotheInternetusingthatsameISP.Amobileusermayoftenbeonanetwork
https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

5/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

otherthanthatoftheirnormalISP,andwillthenfindthatsendingemailfailsbecausetheconfiguredSMTPserver
choiceisnolongeraccessible.
Thissystemhasseveralvariations.Forexample,anorganisation'sSMTPservermayonlyprovideservicetousers
onthesamenetwork,enforcingthisbyfirewallingtoblockaccessbyusersonthewiderInternet.Ortheserver
mayperformrangechecksontheclient'sIPaddress.Thesemethodsweretypicallyusedbycorporationsand
institutionssuchasuniversitieswhichprovidedanSMTPserverforoutboundmailonlyforuseinternallywithin
theorganisation.However,mostofthesebodiesnowuseclientauthenticationmethods,asdescribedbelow.
Whereauserismobile,andmayusedifferentISPstoconnecttotheinternet,thiskindofusagerestrictionis
onerous,andalteringtheconfiguredoutboundemailSMTPserveraddressisimpractical.Itishighlydesirableto
beabletouseemailclientconfigurationinformationthatdoesnotneedtochange.
Clientauthentication
ModernSMTPserverstypicallyrequireauthenticationofclientsbycredentialsbeforeallowingaccess,ratherthan
restrictingaccessbylocationasdescribedearlier.Thismoreflexiblesystemisfriendlytomobileusersandallows
themtohaveafixedchoiceofconfiguredoutboundSMTPserver.
Openrelay
AserverthatisaccessibleonthewiderInternetanddoesnotenforcethesekindsofaccessrestrictionsisknownas
anopenrelay.Thisisnowgenerallyconsideredabadpracticeworthyofblacklisting.

Ports
CommunicationbetweenmailserversgenerallyalwaysusesthestandardTCPport25designatedforSMTP.
Mailclientshowevergenerallydon'tusethis,insteadusingspecific"submission"ports.Mailservicesgenerally
acceptemailsubmissionfromclientsononeof:
587(Submission),asformalizedinRFC6409(previouslyRFC2476)
465ThisporthasbeendeprecatedsinceRFC2487,afterbeingbrieflyassignedforsecureSMTPinthe
1990s.Despitethis,itiscommonlyusedbymailproviders[19][20]
Port2525andothersmaybeusedbysomeindividualproviders,buthaveneverbeenofficiallysupported.
MostInternetserviceprovidersnowblockalloutgoingport25trafficfromtheircustomersasanantispam
measure.[21]Forthesamereason,businesseswilltypicallyconfiguretheirfirewalltoonlyallowoutgoingport25
trafficfromtheirdesignatedmailservers.

SMTPtransportexample
AtypicalexampleofsendingamessageviaSMTPtotwomailboxes(aliceandtheboss)locatedinthesamemail
domain(example.comorlocalhost.com)isreproducedinthefollowingsessionexchange.(Inthisexample,the
conversationpartsareprefixedwithS:andC:,forserverandclient,respectivelytheselabelsarenotpartofthe
exchange.)
Afterthemessagesender(SMTPclient)establishesareliablecommunicationschanneltothemessagereceiver
(SMTPserver),thesessionisopenedwithagreetingbytheserver,usuallycontainingitsfullyqualifieddomain
name(FQDN),inthiscasesmtp.example.com.TheclientinitiatesitsdialogbyrespondingwithaHELOcommand
https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

6/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

identifyingitselfinthecommand'sparameterwithitsFQDN(oranaddressliteralifnoneisavailable).[22]
S:220smtp.example.comESMTPPostfix
C:HELOrelay.example.org
S:250Hellorelay.example.org,Iamgladtomeetyou
C:MAILFROM:<bob@example.org>
S:250Ok
C:RCPTTO:<alice@example.com>
S:250Ok
C:RCPTTO:<theboss@example.com>
S:250Ok
C:DATA
S:354Enddatawith<CR><LF>.<CR><LF>
C:From:"BobExample"<bob@example.org>
C:To:AliceExample<alice@example.com>
C:Cc:theboss@example.com
C:Date:Tue,15January200816:02:430500
C:Subject:Testmessage
C:
C:HelloAlice.
C:Thisisatestmessagewith5headerfieldsand4linesinthemessagebody.
C:Yourfriend,
C:Bob
C:.
S:250Ok:queuedas12345
C:QUIT
S:221Bye
{Theserverclosestheconnection}

TheclientnotifiesthereceiveroftheoriginatingemailaddressofthemessageinaMAILFROMcommand.Thisis
alsothereturnorbounceaddressincasethemessagecannotbedelivered.Inthisexampletheemailmessageis
senttotwomailboxesonthesameSMTPserver:oneforeachrecipientlistedintheToandCcheaderfields.The
correspondingSMTPcommandisRCPTTO.Eachsuccessfulreceptionandexecutionofacommandis
acknowledgedbytheserverwitharesultcodeandresponsemessage(e.g.,250Ok).
ThetransmissionofthebodyofthemailmessageisinitiatedwithaDATAcommandafterwhichitistransmitted
verbatimlinebylineandisterminatedwithanendofdatasequence.Thissequenceconsistsofanewline(<CR>
<LF>),asinglefullstop(period),followedbyanothernewline.Sinceamessagebodycancontainalinewithjust
aperiodaspartofthetext,theclientsendstwoperiodseverytimealinestartswithaperiodcorrespondingly,the
serverreplaceseverysequenceoftwoperiodsatthebeginningofalinewithasingleone.Suchescapingmethodis
calleddotstuffing.
Theserver'spositivereplytotheendofdata,asexemplified,impliesthattheserverhastakentheresponsibilityof
deliveringthemessage.Amessagecanbedoubledifthereisacommunicationfailureatthistime,e.g.duetoa
powershortage:Untilthesenderhasreceivedthat250reply,itmustassumethemessagewasnotdelivered.Onthe
otherhand,afterthereceiverhasdecidedtoacceptthemessage,itmustassumethemessagehasbeendeliveredto
it.Thus,duringthistimespan,bothagentshaveactivecopiesofthemessagethattheywilltrytodeliver.[23]The
probabilitythatacommunicationfailureoccursexactlyatthisstepisdirectlyproportionaltotheamountof
filteringthattheserverperformsonthemessagebody,mostoftenforantispampurposes.Thelimitingtimeoutis
specifiedtobe10minutes.[24]
TheQUITcommandendsthesession.Iftheemailhasotherrecipientslocatedelsewhere,theclientwouldQUITand
connecttoanappropriateSMTPserverforsubsequentrecipientsafterthecurrentdestination(s)hadbeenqueued.
TheinformationthattheclientsendsintheHELOandMAILFROMcommandsareadded(notseeninexamplecode)as
additionalheaderfieldstothemessagebythereceivingserver.ItaddsaReceivedandReturnPathheaderfield,
respectively.

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

7/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

Someclientsareimplementedtoclosetheconnectionafterthemessageisaccepted(250Ok:queuedas12345),so
thelasttwolinesmayactuallybeomitted.Thiscausesanerrorontheserverwhentryingtosendthe221reply.

Optionalextensions
Clientslearnwhatoptionsaserversupports,byusingtheEHLOgreeting,asexemplifiedbelow,insteadofthe
originalHELO(exampleabove).ClientsfallbacktoHELOonlyiftheserverdoesnotsupportSMTPextensions.[25]
ModernclientsmayusetheESMTPextensionkeywordSIZEtoquerytheserverforthemaximummessagesize
thatwillbeaccepted.Olderclientsandserversmaytrytotransferexcessivelysizedmessagesthatwillberejected
afterconsumingnetworkresources,includingconnecttimetonetworklinksthatispaidbytheminute.[26]
UserscanmanuallydetermineinadvancethemaximumsizeacceptedbyESMTPservers.Theclientreplacesthe
HELOcommandwiththeEHLOcommand.
S:220smtp2.example.comESMTPPostfix
C:EHLObob.example.org
S:250smtp2.example.comHellobob.example.org[192.0.2.201]
S:250SIZE14680064
S:250PIPELINING
S:250HELP

Thussmtp2.example.comdeclaresthatitwillacceptafixedmaximummessagesizenolargerthan14,680,064
octets(8bitbytes).Dependingontheserver'sactualresourceusage,itmaybecurrentlyunabletoaccepta
messagethislarge.
Inthesimplestcase,anESMTPserverwilldeclareamaximumSIZEimmediatelyafterreceivinganEHLO.
AccordingtoRFC1870,however,thenumericparametertotheSIZEextensionintheEHLOresponseisoptional.
Clientsmayinstead,whenissuingaMAILFROMcommand,includeanumericestimateofthesizeofthemessage
theyaretransferring,sothattheservercanrefusereceiptofoverlylargemessages.

Spoofingandspamming
TheoriginaldesignofSMTPhadnofacilitytoauthenticatesenders,orcheckthatserverswereauthorizedtosend
ontheirbehalf,withtheresultthatemailspoofingispossible,andcommonlyusedinemailspamandphishing.
OccasionalproposalsaremadetomodifySMTPextensivelyorreplaceitcompletely.Oneexampleofthisis
InternetMail2000,butneitherit,noranyotherhasmademuchheadwayinthefaceofthenetworkeffectofthe
hugeinstalledbaseofclassicSMTP.Instead,mailserversnowusearangeoftechniques,includingDomainKeys,
DomainKeysIdentifiedMail,SenderPolicyFrameworkandDMARC,DNSBLsandgreylistingtorejector
quarantinesuspiciousemails.

Implementations
Relatedrequestsforcomments
RFC1123RequirementsforInternetHostsApplicationandSupport(STD3)
RFC1870SMTPServiceExtensionforMessageSizeDeclaration(bsoletes:RFC1653)
RFC2505AntiSpamRecommendationsforSMTPMTAs(BCP30)
RFC2920SMTPServiceExtensionforCommandPipelining(STD60)
https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

8/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

RFC3030SMTPServiceExtensionsforTransmissionofLargeandBinaryMIMEMessages
RFC3207SMTPServiceExtensionforSecureSMTPoverTransportLayerSecurity(obsoletesRFC
2487)
RFC3461SMTPServiceExtensionforDeliveryStatusNotifications(obsoletesRFC1891)
RFC3463EnhancedStatusCodesforSMTP(obsoletesRFC1893,updatedbyRFC5248)
RFC3464AnExtensibleMessageFormatforDeliveryStatusNotifications(obsoletesRFC1894)
RFC3798MessageDispositionNotification(updatesRFC3461)
RFC3834RecommendationsforAutomaticResponsestoElectronicMail
RFC4952OverviewandFrameworkforInternationalizedEmail(updatedbyRFC5336)
RFC4954SMTPServiceExtensionforAuthentication(obsoletesRFC2554,updatesRFC3463,updated
byRFC5248)
RFC5068EmailSubmissionOperations:AccessandAccountabilityRequirements(BCP134)
RFC5248ARegistryforSMTPEnhancedMailSystemStatusCodes(BCP138)(updatesRFC3463)
RFC5321TheSimpleMailTransferProtocol(obsoletesRFC821akaSTD10,RFC974,RFC1869,RFC
2821,updatesRFC1123)
RFC5322InternetMessageFormat(obsoletesRFC822akaSTD11,andRFC2822)
RFC5504DowngradingMechanismforEmailAddressInternationalization
RFC6409MessageSubmissionforMail(STD72)(obsoletesRFC4409,RFC2476)
RFC6522TheMultipart/ReportContentTypefortheReportingofMailSystemAdministrativeMessages
(obsoletesRFC3462,andinturnRFC1892)
RFC6531SMTPExtensionforInternationalizedEmailAddresses(updatesRFC2821,RFC2822,RFC
4952,andRFC5336)

Seealso
Bounceaddress
Emailencryption
Ident
POPbeforeSMTP/SMTPafterPOP
SenderPolicyFramework(SPF)
Variableenvelopereturnpath
Dkim

Notes
1.TheHistoryofElectronicMail(http://www.multicians.org/thvv/mailhistory.html),TomVanVleck:"Itisnotclearthis
protocolwaseverimplemented"
2.TheFirstNetworkEmail(https://openmap.bbn.com/~tomlinso/ray/firstemailframe.html),RayTomlinson,BBN
3.Pictureof"TheFirstEmailComputer(https://openmap.bbn.com/~tomlinso/ray/ka10.html)"byDanMurphy,aPDP10
4.DanMurphy'sTENEXandTOPS20Papers(http://www.opost.com/dlm/tenex/)Archived(https://web.archive.org/web/2
0071118204016/http://www.opost.com/dlm/tenex/)November18,2007,attheWaybackMachine.
5.RFC2235
6.RFC469NetworkMailMeetingSummary
7.RFC524AProposedMailProtocol
8.RFC772MailTransferProtocol
9.Tldp.org(http://tldp.org/HOWTO/UsenetNewsHOWTO/x64.html)
10.draftbarberuucpprojectconclusion05TheConclusionoftheUUCPMappingProject(https://tools.ietf.org/html/draft
barberuucpprojectconclusion05)
11.ThearticleaboutsenderrewritingcontainstechnicalbackgroundinfoabouttheearlySMTPhistoryandsourcerouting
beforeRFC1123.
12.EricAllman(1983),SendmailAnInternetworkMailRouter(PDF),BSDUNIXdocumentationset,Berkeley:University
ofCalifornia,retrievedJune29,2012

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

9/10

10/10/2016

SimpleMailTransferProtocolWikipedia,thefreeencyclopedia

13.CraigPartridge(2008),TheTechnicalDevelopmentofInternetEmail(PDF),IEEEAnnalsoftheHistoryofComputing,
IEEEComputerSociety,doi:10.1109/MAHC.2008.32
14.JohnKlensin(October2008)."BasicStructure"(https://tools.ietf.org/html/rfc5321#section2.1).SimpleMailTransfer
Protocol(https://tools.ietf.org/html/rfc5321).IETF.sec.2.1.RFC5321.https://tools.ietf.org/html/rfc5321#section2.1.
Retrieved16January2016.
15."TheMAIL,RCPT,andDATAverbs"(http://cr.yp.to/smtp/mail.html),[D.J.Bernstein]
16.RFC5321Section7.2
17.RFC1985,SMTPServiceExtensionforRemoteMessageQueueStarting,J.DeWinter,TheInternetSociety(August
1996)
18.JiankangYao(19December2014)."Chineseemailaddress".EAI(Mailinglist).IETF.Retrieved24May2016.
19."POPserversettingsforYahooMail".Yahoo!.Retrieved18January2016."OutgoingMail(SMTP)Server:Server
smtp.mail.yahoo.comPort465or587."
20."ProblemssendingmailwithPOPorIMAP".Google.Retrieved18January2016."IfyoutriedconfiguringyourSMTP
serveronport465."
21.CaraGarretson(2005)."ISPsPitchIntoStopSpam".PCWorld.Retrieved18January2016."Lastmonth,theAnti
SpamTechnicalAlliance,formedlastyearbyYahoo,AmericaOnline,EarthLink,andMicrosoft,issuedalistof
antispamrecommendationsthatincludesfilteringPort25."
22.RFC5321,SimpleMailTransferProtocol,J.Klensin,TheInternetSociety(October2008)
23.RFC1047
24.rfc5321#section4.5.3.2.6(https://tools.ietf.org/html/rfc5321#section4.5.3.2.6)
25.JohnKlensinNedFreedMarshallT.RoseEinarA.StefferudDaveCrocker(November1995).SMTPService
Extensions(https://tools.ietf.org/html/rfc1869).IETF.RFC1869.https://tools.ietf.org/html/rfc1869.
26."MAILParameters".IANA.Retrieved3April2016.

References
Hughes,L(1998).InternetEmail:Protocols,StandardsandImplementation.ArtechHousePublishers.
ISBN0890069395.
Hunt,C(2003).sendmailCookbook.O'ReillyMedia.ISBN0596004710.
Johnson,K(2000).InternetEmailProtocols:ADeveloper'sGuide.AddisonWesleyProfessional.ISBN0
201432889.
Loshin,P(1999).EssentialEmailStandards:RFCsandProtocolsMadePractical.JohnWiley&Sons.
ISBN0471345970.
Rhoton,J(1999).Programmer'sGuidetoInternetMail:SMTP,POP,IMAP,andLDAP.Elsevier.ISBN1
555582125.
Wood,D(1999).ProgrammingInternetMail.O'Reilly.ISBN1565924797.

Externallinks
EmailAddressInternationalizationIETFWorkingGroup
Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Simple_Mail_Transfer_Protocol&oldid=742292084"
Categories: Internetmailprotocols
Thispagewaslastmodifiedon2October2016,at21:14.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.
Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregisteredtrademark
oftheWikimediaFoundation,Inc.,anonprofitorganization.

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

10/10

Vous aimerez peut-être aussi