web analytics


How Email works – A Nutshell View

Tags: emailmail clientMTAMUA

Published on: January 24, 2017 by Muhammed Ijaz

How Email works – A Nutshell View


Emails have become an unavoidable part of our life. The simplicity of sending and receiving an email is the major reason for its popularity. If you want to send a mail you just need the receiver’s email ID, as a result, it is one of the easiest means for communication.

However, most of us are still unaware of the how email works. By knowing the working of Emails we can easily troubleshoot the common issues we face while using Emails.

The ground reality is that the working of emails is not as simple as it may seem. There are a number of complex activities running on background when we use mail communication.

Before jumping into the working of emails lets see some very basic terms associated with it.

Common terms used


Mail User Agent, Program for viewing, reading, composing Emails.

eg: Webmail, MS Outlook, Mozilla Thunderbird, Apple Mail, elm, pine, mutt


Mail Transfer Agent, Program for Routing the mails. It accepts mails either dispatched by an MUA for delivery or from MDA for reception

eg: Exim, Sendmail, Postfix, Zimbra, QMail


Mail Delivery Agent, which performs the actual delivery.

eg: mail.local, procmail

Since we have seen the basic agents involved in Email communication, we can see how these “Agents” help us in mail communication.

Basic Working of Emails

  1. A user composes an Email using MUA and sends it.
  2. The Email is being transferred to the corresponding MTA/MDA. Some of the MTAs available today (Exim, Sendmail, QMail) and will handle the responsibilities of a MDA as well. So based on the headers of the Email, MTA determines the destination address, and it knows how to reach there, the mail is being transferred further to the MDA. The mail is being routed either locally or remote based on the Mail exchanger it is set to.
  3. The MTA at the receiver end identifies the message and pass on the local MDA.
  4. The local MDA hand overs the Email message to the MUA at the receiver end.

The image shown below represents the whole process.

Since we have seen the basic working of emails, let us dive deeper into the working now.

Detailed Explanation

First of all with the aid of MUA user composes the Email.

This involves mainly three parameters, such as the Outgoing Mail server name, Email address, and the password. Once the MUA authentication of those directives are complete, the message is passed over to the MTA for further process.

For instance, consider the sending Email address as alex@sender.com and the recipient as mark@recipient.com. The sending MTA checks where the recipient domain recipient.com resolves to. It asks the DNS server on the recipient.com network for the hostname of the mail server. The MX (Mail Exchanger) record in DNS identifies the Host Name of the mail server. The DNS server for recipient.com returns the value of the MX record, which is the hostname of the mail server, something like, mail.recipient.com.

The sending MTA now asks the DNS server on the recipient.com network for the address of the mail server host (mail.recipient.com). The A record in DNS maps the host name to an IP address. The DNS server for recipient.com returns the value of the A record for the mail server host (mail.recipient .com), which would be some IP address.

The sending mail server connects to the receiving mail server’s IP address and checks whether it can connect to the SMTP port of the recipient mail server and if it can, then it will deliver the E-mail.

Category : General, Linux

Muhammed Ijaz

Muhammed Ijaz

Ijaz is a person with keen interests in Computer Programming and Latest technologies. He is a person who is driven by curiosity. Apart from his technical skills he loves reading books and is a die hard fan of Chelsea FC.

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items