Bookmarks

MTA — mail transfer agent

A program that accepts email over SMTP and passes it on: to another server or to local delivery. It keeps a queue and retries.

Also: mail server, SMTP server, message transfer agent

checked 9 Nov

All terms

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

TaskHow it is done
Receivinglistens on port 25 and accepts messages from other servers
Routinglooks up the MX records of the recipient’s domain and picks the server with the lowest preference value
Queueingholds the message until it is delivered; retries after a temporary failure
Relayinghands the message to the next MTA or to a mail delivery agent (MDA)
Notificationif 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 pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

In depth in the references

where the topic is covered in detail