MUAs, MTAs, and MDAs

There are three main parts of the Unix E-mail system:

Part What It Does Examples
Mail User Agent (MUA) The MUA is the program which the user uses to read and send e-mail. It reads incoming messages that have been delivered to the user's mailbox, and passes outgoing messages to an MTA for sending. elm, pine, mutt
Mail Transfer Agent (MTA) The MTA basicly acts as a "mail router". It accepts a message passed to it by either an MUA or another MTA, decides based upon the message header which delivery method it should use, and then passes the message to the appropriate MDA for that delivery method. sendmail, postfix, qmail
Mail Delivery Agent (MDA) The MDA accepts a piece of mail from an MTA and performs the actual delivery. mail.local, procmail

The MTA is the most important one of these. It is responsible for doing all the "intelligent" work of e-mail transfer. While it does not actually perform any of the delivery itself, it is the part which tells the other parts how to interact and what to do. In a sense, the MTA is the glue which holds the whole process together.

To illustrate how the three parts of the email system work together, here's a very general example. This is what happens when the user sends e-mail to

  1. jsmith's MUA (pine, elm, etc) on passes the message to the MTA (sendmail) on the local host.
  2. The MTA (sendmail) notices that the message is addressed to a user at Since it is configured to know that it can reach via SMTP, it passes the message to the SMTP MDA (the SMTP MDA is actually builtin to sendmail, but all other MDAs are external programs).
  3. The SMTP MDA connects to the MTA on (sendmail) and sends it the message.
  4. The MTA on (sendmail) notices that the message is addressed to a user on the local host, so it passes the message to the local MDA.
  5. The local MDA saves the message in user johndoe's mailbox.
  6. The next time johndoe logs in to and runs his MUA, the message is there waiting for him to read.
As you can see, none of this would be possible without the MTA!

Mark D. Roth <>