Q
  • Services
    Software
    Development
    AI
    Cyber Security
  • Highlights

    Quilliance Labs

    Office 365 Customization Java Enterprise Software Custom Map Server Cloud Email Service
  • Get in Touch
Q
Software Development
AI
Cyber Security
Quilliance Labs Quilliance Labs
  • Office 365 Customization
  • Java Enterprise Software
  • Custom Map Server
  • Cloud Email Service

How Email Is Delivered

SMTP Delivery on the Internet Explained

SMTP email delivery with MTAs, MUAs and MDAs SMTP delivery MUA to MTA. Focused. SMTP delivery MTA to MTA. Focused. Local inbox delivery. Focused. Inbox access by the MUA. Focused.

Email Delivery Architecture

The agents and protocols involved in delivering email over the internet

The journey of an email from the outbox of the sender to the inbox of the receiver involves multiple assets and protocols. The message is relayed through multiple processing elements until it is in the hands of the receiver.

Definitions

  • SMTP - Simple Mail Transfer Protocol: The protocol to transfer email. It carries the addressing information for routing a message through to the right destination.
  • MUA - Mail User Agent: The email client with the user interface to compose an email, read received emails and browse the inbox. Microsoft Outlook App, Mac Mail and Thunderbird are examples of MUA user clients. Many email services offer web-clients which allow users to write emails and manage their inbox in their internet browser.
  • MTA - Mail Transport Agent: The central element in delivering email. It examines the destination addressing and decides its destination server.
  • MDA - Mail Delivery Agent: The server which manages the inbox and the database of all its messages.
  • IMAP - Internet Message Access Protocol: The protocol for a MUA to manage the inbox. This includes reading received mail and managing them.
Mail SMTP delivery from MUA client to MTA Server

SMTP Mail Delivery MUA to MTA

Mail SMTP delivery from MUA client to MTA Server for small viewports

The first step in the email delivery is the transfer between the MUA user client and the MTA. It is executed when the user hits the send button.

This first MTA is provided by the email service. The email submission over SMTP requires authentication by the user. To protect the authentication and email submission is protected by TLS (Transport Layer Security).

SMTP Relaying & Delivery Between MTAs

point to point SMTP relay between two MTAs

MTAs are for email, what routers are for IP packets: They transmit the email based on their SMTP addressing. But instead of routing, this is called relaying. In order to find the IP address of the destination MTA, the sending MTA uses DNS.

During its journey, an email message traverses through multiple MTAs until it reaches the inbox of the receiver. This transmission is done on the internet backbone and is usually unencrypted and unprotected.

Local Delivery to Inbox

Final delivery of email from destination MTA to inbox database.

After the email is accepted by its final MTA, this MTA commits the message to the inbox database. The email is now ready to be read by the receiving user.

In the simplest case, the inbox database is a folder and file tree with a standard structure (maildir). But some email services - like Microsoft Exchange - often implement their proprietary solutions. In all cases, the local delivery takes place on a private network.

Managing the inbox through the IMAP protocol

Accessing the Inbox with IMAP

Managing the inbox through the IMAP protocol. Image for small viewport

After delivery, emails are kept in the inbox database of the MDA. The MUA email client of the receiver uses the IMAP protocol to access and manage the inbox.

This includes fetching email data for reading, but also managing the folders, moving emails between directories and deleting messages.

IMAP manages the inbox, but it does not transmit messages for sending. For transmission, the MUA uses SMTP for that. That is the reason why users commonly have to configure both an SMTP and an IMAP connection when setting up their email client for a new inbox.

MTA Mail Processing

Every MTA processes incoming mail delivery requests according to the SMTP protocol. For the processing of every mail, the MTA has to decide what to do with the message. There are three possible outcomes:

  1. The message is selected for local processing. This means either delivery into a local inbox or passing it on to a local service.
  2. The message is relayed (forwarded) to another MTA over SMTP.
  3. The message is discarded.
  4. The message is rejected - returned to the sender.

SMTP relay or delivery options

The MTA decision process is complex and highly configurable. The decision process can be based on:

  • The envelope delivery address
  • The network identity of the sending server
  • The email headers and security controls
  • Whether or not the sender is authenticated

Typical MTA architectures are more complex. It is common to have a single MTA at the network boundary accepting all mail for a domain. But rather than delivering the mail to a local inbox, the message is relayed to secondary MTAs. For example: A big organization may distribute incoming mail to MTAs dedicated to departments inside the organization.

Relaying architecture between multiple SMTP
Quilliance
info@quilliance.com

2021 Quilliance. All Rights Reserved. | Legal Notice (Impressum)