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–HumanreadableEncodingofbinaryData876543218765432187654321000000111111111111000000654321000000111111111111000000654321654321654321base64encodingTreatevery3bytes(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

1 / 21
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功