Electronic mail

519 views 53 slides May 03, 2021
Slide 1
Slide 1 of 53
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53

About This Presentation

One of the most popular Internet services is electronic mail (e-mail).

At the beginning of the Internet era, the messages sent by electronic mail were short and consisted of text only.

Today, electronic mail is much more complex. It allows a message to include text, audio, and video.

It also a...


Slide Content

Electronic mail
Dr R JegadeesanProf-CSE
JyothishmathiInstitute of Technology and Science,
Karimnagar

•OneofthemostpopularInternetservicesis
electronicmail(e-mail).
•AtthebeginningoftheInternetera,the
messagessentbyelectronicmailwereshortand
consistedoftextonly.
•Today,electronicmailismuchmorecomplex.It
allowsamessagetoincludetext,audio,and
video.
•Italsoallowsonemessagetobesenttooneor
morerecipients.

Architecture
•Toexplainthearchitectureofe-mail,wegive
fourscenarios.
•Webeginwiththesimplestsituationandadd
complexityasweproceed.
•Thefourthscenarioisthemostcommonin
theexchangeofemail.

First Scenario
•Inthefirstscenario,thesender(Alice)andthe
receiver(Bob)ofthee-mailareusers(orapplication
programs)onthesamesharedsystem(mailserver);
theyaredirectlyconnectedtoasharedsystem(mail
server).
•Theadministratorhascreatedonemailboxforeach
userwherethereceivedmessagesarestored.
•Amailboxispartofalocalharddrive,aspecialfile
boxwithpermissionrestrictions.
•Onlytheownerofthemailboxhasaccesstoit.

•WhenAlice,auser,needstosendamessage
toBob,anotheruser,Alicerunsauseragent
(UA)programtopreparethemessageand
storeitinBob'smailbox.
•Themessagehasthesenderandrecipient
mailboxaddresses(namesoffiles).
•Bobcanretrieveandreadthecontentsofhis
mailboxathisconvenience,usingauser
agent.

Whenthesenderandthereceiverofan
e-mailareonsamesystem,weneedonlytwo
useragents

Second Scenario
•Inthesecondscenario,thesenderandthe
receiverofthee-mailareusers(orapplication
programs)ontwodifferentsystems.
•ThemessageneedstobesentovertheInternet.
•HereweneedUserAgents(UAs)andMessage
TransferAgents(MTAs),

•Aliceneedstouseauseragentprogramto
sendhermessagetothesystem(mailserver)
atherownsite.
•Thesystem(mailserver)athersiteusesa
queuetostoremessageswaitingtobesent.
•Bobalsoneedsauseragentprogramto
retrievemessagesstoredinthemailboxofthe
system(mailserver)athissite.

•Themessage,however,needstobesent
throughtheInternetfromAlice'ssitetoBob's
site.
•HeretwoMessageTransferAgents(MTA’s)
areneeded:oneclientandoneserver.
•Whenthesenderandthereceiverofane-
mailareondifferentsystems,weneedtwo
UAsandpairofMTAs(clientandserver).

Third Scenario
•Inthethirdscenario,Bob,asinthesecondscenario,is
directlyconnectedtohissystem.
•Alice,however,isseparatedfromhersystem.
•EitherAliceisconnectedtothesystemviaapoint-to-
pointWAN,suchasadial-upmodem,aDSL,ora
cablemodem;
•AliceisconnectedtoaLANinanorganizationthat
usesonemailserverforhandlinge-mails-allusers
needtosendtheirmessagestothismailserver

•Alicestillneedsauseragenttoprepareher
message.Shethenneedstosendthemessage
throughtheLANorWAN.
•Thiscanbedonethroughapairofmessage
transferagents(clientandserver).
•WheneverAlicehasamessagetosend,shecalls
theuseragentwhich,inturm,callstheMTA
client.
•TheMTAclientestablishesaconnectionwith
theMTAserveronthesystem,whichisrunning
allthetime.
•ThesystematAlice'ssitequeuesallmessages
received.

•ItthenusesanMTAclienttosendthe
messagestothesystematBob'ssite;the
systemreceivesthemessageandstoresitin
Bob'smailbox.
•Athisconvenience,Bobuseshisuseragent
toretrievethemessageandreadsit.
•Whenthesenderisconnectedtothemail
serverviaaLANoraWAN,weneedtwoUAs
andtwopairsofMTAs(clientandserver).

Fourth Scenario1 2 3 4 5 6 8 9

•Inthefourthscenarioandmostcommonscenario,
BobisalsoconnectedtohismailserverbyaWANor
aLAN.
•AfterthemessagehasarrivedatBob'smailserver,
Bobneedstoretrieveit.
•Here,weneedanothersetofclient/serveragents,
whichwecallMessageAccessAgents(MAAs).
•BobusesanMAAclienttoretrievehismessages.The
clientsendsarequesttotheMAAserver,whichis
runningallthetime,andrequeststhetransferofthe
messages.

•Therearetwoimportantpointshere.
•First,BobcannotbypasstheMAAmailserveranduse
theMTAserverdirectly.
•TouseMTAserverdirectly,Bobwouldneedtorunthe
MTAserverallthetimebecausehedoesnotknow
whenamessagewillarrive.
•ThisimpliesthatBobmustkeephiscomputeronall
thetimeifheisconnectedtohissystemthrougha
LAN.
•Ifheisconnectedthrougha-WAN,hemustkeepthe
connectionupallthetime.Neitherofthesesituations
isfeasibletoday.

•Second,notethatBobneedsanotherpairof
client/serverprograms:messageaccess
programs.
•ThisissobecauseanMTAclient/server
programisapushprogram:theclientpushes
themessagetotheserver.Bobneedsapull
program.
•Theclientneedstopullthemessagefromthe
server.

USER AGENT
•Thefirstcomponentofanelectronicmail
systemistheuseragent(UA).
•Itprovidesservicetotheusertomakethe
processofsendingandreceivingamessage
easier.

Services Provided by a User Agent

Composing Messages
•Auseragenthelpstheusercomposethee-
mailmessagetobesentout.
•Mostuseragentsprovideatemplateonthe
screentobefilledinbytheuser.
•Someevenhaveabuilt-ineditorthatcando
spellchecking,grammarchecking.
•Auser,ofcourse,couldalternativelyusehis
orherfavouritetexteditororwordprocessor
tocreatethemessageandimportit,orcut
andpasteit,intotheuseragenttemplate.

Reading Messages
•Theseconddutyoftheuseragentistoreadthe
incomingmessages.
•Whenauserinvokesauseragent,itfirstchecks
themailintheincomingmailbox.
•Mostuseragentsshowaone-linesummaryof
eachreceivedmail.
•Eache-mailcontainsthefollowingfields.
•Aflagfieldthatshowsthestatusofthemail
suchasnew,alreadyreadbutnotrepliedto,or
readandrepliedto.
•sizeofthemessagefield
•senderfield.

Replying to Messages
•Afterreadingamessage,ausercanusetheuseragentto
replytoamessage.
•Auseragentusuallyallowstheusertoreplytothe
originalsender.
ForwardingMessages
▪Replying is defined as sending a message to the sender or
recipients of the copy.
▪Forwarding is defined as sending the message to a third
party.
▪A user agent allows the receiver to forward the message,
with or without extra comments, to a third party.

Handling Mailboxes
•Auseragentnormallycreatestwomailboxes:
aninboxandanoutbox.
•Eachboxisafilewithaspecialformatthat
canbehandledbytheuseragent.
•Theinboxkeepsallthereceivede-mailsuntil
theyaredeletedbytheuser.
•Theoutboxkeepsallthesente-mailsuntilthe
userdeletesthem.

MIME

MIME(Multipurpose Internet Mail Extensions)
•MultipurposeInternetMailExtensions
(MIME)isasupplementaryprotocolthat
allowsnon-ASCIIdatatobesentthroughe-
mail.
•MIMEtransformsnon-ASCIIdataatthe
sendersitetoASCIIdataanddeliversthemto
theclientMTAtobesentthroughtheInternet.
•Themessageatthereceivingsideis
transformedbacktotheoriginaldata.

•MIMEdefines five headers that can be added
to the original e-mail header section to define
the transformation parameters:
1. MIME-Version
2. Content-Type
3. Content-Transfer-Encoding
4. Content-Id
5. Content-Description

•MIME-VersionThisheaderdefinesthe
versionofMIMEused.Thecurrentversionis
1.1.
•Content-TypeThisheaderdefinesthetype
ofdatausedinthebodyofthemessage.The
contenttypeandthecontentsubtypeare
separatedbyaslash.
•MIMEallowssevendifferenttypesofdata

•Content-Transfer-EncodingThisheader
definesthemethodusedtoencodethe
messagesintobinary,7bitASCII
•Content-IdItdefinesauniqueidentifier.i.e.
Thisheaderuniquelyidentifiesthewhole
messageinamultiple-messageenvironment.
•Content-DescriptionThisheaderdefines
whetherthebodyisimage,audio,orvideo

Message Transfer Agent: SMTP

Message Transfer Agent: SMTP
•Theactualmailtransferisdonethrough
messagetransferagents(MTA)
•Tosendmail,asystemmusthavetheclient
MTA,andtoreceivemail,asystemmusthave
aserverMTA.
•TheformalprotocolthatusedbytheMTA
clientandserverintheInternetiscalledthe
SimpleMailTransferProtocol(SMTP)

•FigureshowstherangeoftheSMTPprotocol
infourthscenario.SMTPisusedtwotimes,
betweenthesenderandthesender'smail
serverandbetweenthetwomailservers.

•SMTPsimplydefineshowcommandsand
responsesmustbesentbackandforth.
Commands and Responses
•SMTPusescommandsandresponsesto
transfermessagesbetweenanMTAclientand
anMTAserver

Commands
•Commandsaresentfromtheclienttothe
server.Theformatofacommandisshownin
figure
•Itconsistsofakeywordfollowedbyzeroor
morearguments.
•SMTPdefines14commands.

•Thefirstfivearemandatory;everyimplementationmust
supportthesefivecommands.
•Thenextthreeareoftenusedandhighlyrecommended.
•Thelastsixarerarelyused.

•HELO:Sentbyaclienttoidentifyitself
•MAILFROMIdentifiesthesenderofthe
message;usedintheformMAILFROM:
•RCPTTOIdentifiesthemessagerecipients;
usedintheformRCPTTO:
•DATASentbyaclienttoinitiatethetransfer
ofmessagecontent.
•QUITTerminatesthesession.
•RSETResettheentiremessagetransaction
andthebuffer.

•NOOP:Askthereceivertosendavalidreply
•VRFYVerifiestherecipientsthatamailboxis
availableformessagedelivery
•TURN:Allowstheclientandservertoswitch
rolesandsendmailinthereversedirection
withouthavingtoestablishanewconnection.
•EXPN(Expand)Askthereceivertoconfirm
thatamailinglisthasbeenidentified.
•HELPReturnsalistofcommandsthatare
supportedbytheSMTPservice.
•SENDFrom(Send)Delivere-mailtooneor
moreworkstations

•SOML(Sendormail)Delivere-mailtoone
ormoreworkstationsorrecipientsiftheuser
isnotactive.
•SAML(Sendandmail)Delivere-mailtoone
ormoreworkstationsandrecipientsifthe
userisnotactive.

Responses
•Responsesaresentfromtheservertothe
client.
•Aresponseisathreedigitcodethatmay
befollowedbyadditionaltextual
information.

Message Access Agent(MAA):
POP3 and IMAP4

MessageAccessAgent(MAA):POPandIMAP
•Thefirstandthesecondstagesofmaildeliveryuse
SMTP.
•However,SMTPisnotinvolvedinthethirdstage
becauseSMTPisapushprotocol;itpushesthe
messagefromtheclienttotheserver.
•Inotherwords,thedirectionofthebulk:data
(messages)isfromtheclienttotheserver.
•Ontheotherhand,thethirdstageneedsapull
protocol;theclientmustpullmessagesfromthe
server.
•Thedirectionofthebulkdataisfromtheservertothe
client.Thethirdstageusesamessageaccessagent.

•Currentlytwomessageaccessagentprotocols
areavailable:PostOfficeProtocol,version3
(POP3)andInternetMailAccessProtocol,
version4(IMAP4)

POP3
•PostOfficeProtocol,version3(POP3)is
simpleandlimitedinfunctionality.
•TheclientPOP3softwareisinstalledonthe
recipientcomputer.
•TheserverPOP3softwareisinstalledonthe
mailserver.
•Mailaccessstartswhentheuserclientneeds
todownloade-mailfromthemailboxonthe
mailserver.

•The client opens a connection to the server on
TCP port 110.
•Itthensendsitsusernameandpasswordto
accessthemailbox.Theusercanthenlist
andretrievethemailmessages,onebyone.
asshowninfigure.
•POP3hastwomodes:thedeletemodeand
thekeepmode.
•Inthedeletemode,themailisdeletedfrom
themailboxaftereachretrieval.
•Inthekeepmode,themailremainsinthe
mailboxafterretrieval.

Internet Mail Access Protocol, version 4
•IMAP4issimilartoPOP3,butithasmore
features;IMAP4ismorepowerfulandmore
complex.
•IMAP4providesthefollowingextrafunctions
➢Ausercancheckthee-mailheaderbefore
downloading.
➢Ausercansearchthecontentsofthee-mail
foraspecificstringofcharactersbefore
downloading.
➢Ausercancreate,delete,orrenamemailboxes
onthemailserver

•Ausercanpartiallydownloade-mail.Thisis
especiallyusefulifbandwidthislimitedand
thee-mailcontainsmultimediawithhigh
bandwidthrequirements.
•Ausercancreateahierarchyofmailboxesin
afolderfore-mailstorage.

Thank you