What Is a Mail Delivery Agent (MDA)?
A Mail Delivery Agent (MDA) is the software on a receiving mail server that takes a message handed off by the Mail Transfer Agent (MTA) and places it into the correct recipient's mailbox on disk. It is the final local-delivery step, often applying filtering rules before storing the message so it is ready for retrieval by email clients over IMAP or POP3. Dovecot and procmail are common MDA software.
Where the MDA fits in the mail flow
Delivering an email across the internet involves several distinct pieces of software, each with its own job:
| Role | What it does | Example software |
|---|---|---|
| MUA (Mail User Agent) | The email client a person uses to write and read mail | Outlook, Apple Mail, a webmail app |
| MTA (Mail Transfer Agent) | Relays mail between servers over SMTP, hop by hop, toward the recipient's domain | Postfix, Exim, Sendmail |
| MDA (Mail Delivery Agent) | Takes a message that has arrived at the right server and stores it in the recipient's actual mailbox | Dovecot, procmail, maildrop |
In short: the MTA gets the message to the right server, and the MDA puts it in the right mailbox once it's there.
What an MDA actually does, step by step
- The receiving domain's MTA accepts an incoming message over SMTP and determines it is destined for a local mailbox rather than another server.
- The MTA hands the message to the local MDA for final delivery.
- The MDA checks which mailbox the address belongs to and applies any delivery rules, such as filtering spam, sorting into folders, or running a Sieve script.
- The MDA writes the message into the mailbox storage format the server uses, commonly Maildir (one file per message) or mbox (one growing file per mailbox).
- An IMAP or POP3 server, often the same software as the MDA, can now serve that message to the user's email client.
Common MDA software
- Dovecot: widely used as both an IMAP/POP3 server and an MDA, via its
dovecot-ldaor LMTP delivery component, common on cPanel and Plesk servers. - procmail: an older, highly configurable MDA often used for rule-based filtering before a message lands in a mailbox.
- maildrop: a simpler, security-focused alternative to procmail with its own filtering syntax.
- Sieve: not an MDA itself, but a filtering language frequently run by Dovecot's delivery agent to sort mail into folders or discard spam before final storage.
Why the distinction matters for troubleshooting
Separating these roles helps when diagnosing mail problems. If a message never leaves the sender's server, the issue is with the sending MTA or DNS (such as a missing MX record). If it reaches the receiving server but never shows up in the mailbox, the MDA stage, local delivery rules, or a full mail quota is the more likely culprit. Many hosting control panels show MTA logs (/var/log/maillog or similar) and MDA delivery status separately for exactly this reason.
MDA, LMTP and modern mail stacks
On many modern servers, the MTA hands a message to the MDA using LMTP (Local Mail Transfer Protocol), a simplified, local-only variant of SMTP built for exactly this last-hop handoff. This is why software like Postfix is commonly paired with Dovecot: Postfix acts as the MTA accepting and routing mail, while Dovecot's LMTP delivery service acts as the MDA, storing the message and applying any Sieve filters.
Frequently asked questions
What does MDA stand for in email?
MDA stands for Mail Delivery Agent, the software that takes an incoming message and stores it in the correct recipient's mailbox on the receiving mail server.
What is the difference between an MTA and an MDA?
An MTA relays mail between mail servers over SMTP, moving it closer to its destination. An MDA takes over once the message has reached the right server and files it into the actual mailbox for later retrieval.
Is Dovecot an MTA or an MDA?
Dovecot is primarily known as an IMAP and POP3 server, but it also includes a delivery agent component (often used via LMTP) that acts as the MDA, storing incoming mail and applying filtering rules.
Why did my email arrive at the server but never show up in my inbox?
This usually points to a problem at the MDA stage, such as a filtering rule misdirecting the message, a full mailbox quota, or a misconfigured delivery path, rather than a problem with the sending server.
What is the difference between an MDA and an MUA?
An MDA is server-side software that stores incoming mail in a mailbox. An MUA (Mail User Agent) is the email client, such as Outlook or a webmail interface, that a person uses to read and write that mail.
Does every mail server need a separate MDA program?
Not necessarily as a separate program. Some mail server software bundles MTA and MDA functions together, while other setups, like Postfix paired with Dovecot, use distinct programs connected by LMTP for each role.
Related topics
- What Is a Mail Transfer Agent (MTA)? Email Hosting
- What Is an Email Server? Email Hosting
- SMTP vs. IMAP vs. POP3 Email Hosting
- What Is a Mail User Agent (MUA)? Email Hosting
- Webmail vs. Email Client Email Hosting