An MTA is the heart of a mail server: it accepts a message, decides where to send it and hands it to the next node over SMTP. If the recipient is unreachable, the message waits in the queue and the MTA retries.
What an MTA does
| Task | How it is done |
|---|---|
| Receiving | listens on port 25 and accepts messages from other servers |
| Routing | looks up the MX records of the recipient’s domain and picks the server with the lowest preference value |
| Queueing | holds the message until it is delivered; retries after a temporary failure |
| Relaying | hands the message to the next MTA or to a mail delivery agent (MDA) |
| Notification | if delivery is impossible, returns a bounce message to the sender |
The SMTP standard (RFC 5321) requires configurable retries: the time after which the sender gives up is usually at least 4–5 days. A message passes through a chain of several MTAs, and each adds a Received line to the header.
Common implementations
The most widespread open-source MTAs are Postfix and Exim. An MTA has no mailboxes and no interface for reading mail: storing and serving messages is handled by the MDA and an IMAP server. User logins are usually handled by a separate submission service (MSA) on ports 587 and 465, although in Postfix one set of processes plays both roles.
The roles of MUA, MSA, MTA and MDA were described by Dave Crocker in RFC 5598, “Internet Mail Architecture” (July 2009).
Sources
the term is written from these pagesVerified 9 Nov