Mail Server
What is Mail Server?
• A mail server (sometimes called an email server) is a software
program that sends and receives email.
• Often, it is used as a term for both mail transfer agents (MTA) and
mail delivery agents (MDA), each of which perform a slightly
different function.
• Mail servers play a crucial role in the email delivery process.
• Without them, users would have no way of transferring those
messages to and from other mail clients.
What is a mail client?
• Mail servers send messages from one mail client to another.
• A mail client (also called an *email client* or *message user agent*) is
a web-based or desktop application that receives and stores email
messages.
• Some of the most widely-used mail clients include Microsoft Outlook,
Gmail, and Apple Mail.
How do mail servers deliver email messages?
✉ 1. User Sends an Email
• A user composes an email in a Mail User Agent (MUA) like Outlook,
Thunderbird, or Gmail.
• The MUA sends the email to an Outgoing Mail Server using SMTP
(Simple Mail Transfer Protocol).
📤 2. Outgoing Mail Server (SMTP Server)
The Mail Transfer Agent (MTA) (e.g., Postfix, Sendmail, Exim) on the
sender's server:
• Looks at the recipient's domain (e.g.,
[email protected])
• Uses DNS to find the MX (Mail Exchange) record for example.com
• Connects to the recipient's mail server via SMTP
• Transfers the email.
•).
📨 3. Incoming Mail Server Receives the
Message
• The recipient's mail server stores the message using a Mail Delivery
Agent (MDA) (e.g., Dovecot, procmail, or maildrop).
• The email is stored in the recipient's mailbox.
📥 4. Recipient Reads the Email
The recipient's MUA (e.g., Thunderbird or a mobile app) connects to
the incoming mail server using:
• IMAP (Internet Message Access Protocol) – syncs and views mail
without downloading
• POP3 (Post Office Protocol v3) – downloads mail and usually deletes
it from the server.