您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 电子设计/PCB > SMTP(简单邮件传输协议)
SMTP(简单邮件传输协议)SIMPLEMAILTRANSFERPROTOCOLRFC2812Introdution•standarde-mailprotocol•partoftheTCP/IPprotocol•definesthemessageformatandthemessagetransferagent(MTA)•TCPport25•text-basedprotocolInternetemailsystem•Useragent•Mailserver•SMTPSomemailagents•MicrosoftOutlook•Foxmail•NetscapeMessenger•Endora•Mail,pine,elmMailServer•Coreofemailsystem•Mailbox•MessagequeueSMTP•SMTPwasoriginallydesignedforonlyplaintext(ASCIItext)•Providesreliabledeliveryofmessages•UsesTCPandmessageexchangebetweenclientandserver•Otherfunctions:–E-mailaddresslookup–E-mailaddressverificationScenarioSMTPSession220mail.cs.tcd.ieESMTPPostfix(1.1.13)heloFooBarmailfrom:alice@crepes.fr250Okrcptto:bob@hamburger.edu250Okdata354EnddatawithCRLF.CRLFTo:Someone@Somewhere.comFrom:SomeOneElse@Somewhere.comSubject:FooBarHelloWorld.250Ok:queuedasA04537DB3quit221ByeSMTPcommands•HELOdomainnamestartupandgiveyourhostnameMAIL•MAILFROM:sender-addressmailfromthisaddress•RECVTO:recipient-addresssendittothisaddress•VRFYaddressdoesthisaddressactuallyexist(verify)•EXPNaddressexpandthisaddress•DATAstartgivingyouthebodyofthemailmessage•RSETresetstateanddropcurrentmailmessage•NOOPdonothing•DEBUG[level]setdebugginglevel•HELPgivemesomehelpplease•QUITclosethisconnectionTelnetSMTPserver•telnetservername25Helo,mailfrom,rcptto,data,crlf.crlf,quitSMTP,HTTP–Request/ReplyprotocolsbuiltonTCPorUDP–Designedtohandleafixedsetofmessages–PullportocolandpushprotocolProtocolDataFormatProgramsSMTPRFC822andMIMEPine,NSMail,Eudora,…HTTPHTMLExplorer,Netscape,OperaMIME:MultipurposeInternetMailExtensions•Consistsofthreeparts1.AdditionalRFC822Headers•MIME-Version:•Content-Type:•Content-Transfer-Encoding:2.Contenttypes(andsubtypes)•text/plain•text/rich•image/gif•application/postscript•Multipart/mixed;boundary=“…”MIMEEncoding•MailsystemsassumeASCII–Only64validcharactersA-Z,a-z,0-9,+,/•Somedatatypesincludearbitrarybinarydata(e.g.JPEG)•Base64encoding–3bytesofdatamapto4ASCIICharacters–A=0,B=1,…•Also7bitASCIIencoding–HumanreadableEncodingofbinaryData876543218765432187654321000000111111111111000000654321000000111111111111000000654321654321654321base64encodingTreatevery3bytes(24bits)as46-bitwordsTheBase64AlphabetValueEncodingValueEncodingValueEncodingValueEncoding0A17R34i51z1B18S35j5202C19T36k5313D20U37l5424E21V38m5535F22W39n5646G23X40o5757H24Y41p5868I25Z42q5979J26a43r60810K27b44s61911L28c45t62+12M29d46u63/13N30e47v14O31f48w15P32g49x16Q33h50yFrom:SteveZdancewicstevez@cis.upenn.eduMIME-Version:1.0To:stevez@cis.upenn.eduSubject:ExampleMailContent-Type:multipart/mixed;boundary=------------020307000708030506070607Thisisamulti-partmessageinMIMEformat.--------------020307000708030506070607Content-Type:text/plain;charset=us-ascii;format=flowedContent-Transfer-Encoding:7bitThisisthebody.--------------020307000708030506070607Content-Type:text/plain;name=example.txtContent-Transfer-Encoding:7bitContent-Disposition:inline;filename=example.txtHello--------------020307000708030506070607Content-Type:image/jpeg;name=doc.jpgContent-Transfer-Encoding:base64Content-Disposition:inline;filename=doc.jpg/9j/4AAQSkZJRgABAQEASABIAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04…MailAccessProtocolsPop3•Asimplemailaccessprotocol•RFC1939•Port110•ComputerwithmailboxesrunsPOPserver–UserrunsPOPclientonlocalcomputer–POPclientcanaccessandretrievemessagesfrommailbox–Requiresauthentication(password)POPCommands•USER-enteryouruserID•PASS-enteryourpassword•QUIT-quitthePOP3server•LIST-listthemessagesandtheirsize•RETR-retrieveamessage,passitamessagenumber•DELE-deleteamessage,passitamessagenumber•TOP-showthetopxlinesofamessage,passitamessagenumberandthenumberoflines•list•1498•Retr1•(…)•.•quit
本文标题:SMTP(简单邮件传输协议)
链接地址:https://www.777doc.com/doc-2849738 .html