How Electronic Mail Works
The Protocol cog-wheels of the Virtual World
Sahil Babbar, Neeraj Vaishnao
Over “204 million” emails are sent per minute!
Indispensable in the 21st Century.
Robustness & Secureness
Mail Server-Client Interaction
Beginning the Magic
User is provided with an editor to type the message(for
web-based email client or desktop-based client).
Connection is established between Client and SMTP
server over the TCP.
TCP Handshake follows.
First the client sends a request to the server who is
waiting for the client to join, then server responds back
with ACK, and then in the third transmission (from the
client to the server).
When the user clicks the send button then the email is
transmitted to the SMTP server called Outgoing SMTP
The message along with some headers added from
Transport Layer is send to the Network Layer in the form
of Datagrams. Then this message is sent to SMTP server
of the ISP.
Note: Reliable delivery of this message is ensured by the
SMTP protocol and not by the Network Layer.
On the Way - Part I
Message needs to be reliably transmitted over the non-
SMTP Packet carries: Sender’s Address, Receipt’s
Address, Subject, Message, Checksum.
Parity check is done to ensure the data consistency
over the unreliable network.
TCP: Reliable Delivery, Error Control, Congestion
On the Way - Part II
The Outgoing SMTP server sends the SMTP packets
to the SMTP Server of the ISP of Receiver(called
Destination SMTP Server).
The Destination SMTP Server gets the information
about the Outgoing SMTP Server, transmitting
message according to MX(Mail eXchange) Record
stored in DNS Server (Domain Name System) of the
network over SMTP.
Reaching the Receiver
This is done by obtaining the MX (Mail Exchange)
Record associated with receiver’s email address.
Example: If the receiver’s address is having the domain
name as @iiitd.ac.in, the MX Record travel in the
Root Server -> ac.in DNS Server -> Google’s DNS
Server -> IIITD’s SMTP Server
1) Importance of Email in everyday corporate/govt/ personal life .
2) Hence it is important to
•Emails can be sent and viewed in various ways and one of
them is using desktop email applications.
•Desktop application maintains a connection with a remote
server called MTA (Mail Transfer Agent) for storing the emails.
•The user’s inbox is linked to MDA (Mail Delivery Agent) which
is responsible for addition of new emails to user’s inbox. In
Unix environments, the default settings for storing emails
locally is present, which stores them in the HOME directory of
the user. When users start their email clients then all the
emails stored in the directory are shown and therefore, the
remote server goes out of the picture.
Post Ofﬁce Protocol v3
Its Storage in SMTP till the mail client on client’s machine
does not request for an update. However, the mail is not
transferred to the receiver’s machine immediately, it is
stored in the SMTP server itself and gets transferred to
receiver’s machine only after the receiver opens his email
box and queries the mail server to retrieve the new emails.
When the receiver initiates to access the email, another
protocol called POP3 (Post Ofﬁce Protocol) gets activated
and fetches the mail updates onto the receiver’s machine.
Internet Message Access
•The main difference between both POP3 and IMAP is that POP3
stores the email messages, locally in the user’s machine and deletes
the message from the server, once it is downloaded to the client’s
machine and IMAP allows the user to remotely read the emails on the
remote mail server and temporarily stores them locally.
•IMAP serves as a cloud storage option.
•Both POP3 and IMAP4 are used for receiving emails and SMTP and
MSA are used to send emails. There are various email catching
softwares available online which directly queries the Destination SMTP
Server and display the emails in a browser window, although, these
software run on localhost conﬁgurations.
The concept of electronic mail has been a breakthrough
in the history of communication and people have become
so used to it that they often ignore the functioning
engines behind their screens.