MTA (Mail Transfer Agent): role in email delivery
MTA (Mail Transfer Agent) is server software that accepts email messages and forwards them along the delivery chain. It is the central component of any mail infrastructure. Every email passes through at least two MTAs: one on the sender's side accepts the message from the mail client, and another on the recipient's side accepts it for placement in the mailbox.
MTAs communicate with each other over SMTP. In practice, an MTA is both an SMTP server and an SMTP client in one: it accepts inbound connections and opens outbound connections to relay messages onward.
How a message travels through an MTA
When a user clicks Send, the following sequence runs:
- The mail client (MUA) connects to the sender's MTA over SMTP (port 587 or 465) with authentication.
- The sender's MTA extracts the domain from the recipient address (the part after @) and queries that domain's MX record in DNS.
- The MX record resolves to the recipient's MTA address. If multiple records exist, the one with the lowest priority number is tried first.
- The sender's MTA opens an SMTP connection to the recipient's MTA on port 25 and transmits the message. If STARTTLS is available, the connection is encrypted.
- The recipient's MTA runs its checks: SPF, DKIM, DMARC, spam filtering. If the message passes, the MTA hands it off to the MDA (Mail Delivery Agent) for placement in the mailbox.
In the simple case, just two MTAs are involved. In practice the chain is often longer: a message may pass through a relay server, a corporate filtering gateway, or an antivirus proxy. Each intermediate hop adds a Received header, which lets you reconstruct the full route.
Common MTAs
- Postfix. The most widely deployed MTA on Linux. Created by Wietse Venema in the late 1990s as a secure replacement for Sendmail. Its modular architecture runs each task (receiving, queuing, delivery) as a separate process with minimal privileges. Postfix ships as the default MTA on Ubuntu and Debian and is configured via main.cf and master.cf.
- Exim. The dominant MTA in the cPanel ecosystem. Configuration is done through a single file with ACL (Access Control Lists), giving administrators fine-grained control over filtering rules. A large share of shared hosting servers run Exim.
- Sendmail. The original mass-market MTA (1983, Eric Allman). Configuration relies on m4 macros, which are notoriously difficult to work with. Rarely chosen for new deployments, though it still appears on legacy systems at large organizations.
- Microsoft Exchange Transport. The MTA component of Microsoft Exchange Server. It integrates with Active Directory, supports multi-site routing, connectors, and transport rules. In the cloud version (Exchange Online), Microsoft manages the MTA layer.
- Haraka, ZoneMTA, Postal. A newer generation of MTAs written in Node.js, built for high-throughput scenarios: transactional mail, ESPs, bulk sending. Plugin architectures let you add DKIM signing, filtering logic, and throttling directly in code.
The mail queue
When an MTA cannot deliver a message immediately (the receiving server is down, returns a 4xx code, or DNS fails), it queues the message and retries on a schedule: typically after 5 minutes, then 15, 30, 60, with increasing backoff intervals.
A message stays in the queue until one of two things happens: successful delivery, or expiry of the maximum retry window (the bounce timeout, usually 3-5 days). At expiry, the MTA generates a DSN (Delivery Status Notification) and sends it to the envelope sender address.
Watching the queue is a routine admin task. A queue that keeps growing usually means something specific is wrong: the receiving server is blocking your IP, DNS is unreachable, the server is overloaded, or someone is sending spam through a compromised account.
MTA and email authentication
A modern MTA participates in authentication on both sides of the connection:
- Sending MTA. Signs the message with a DKIM signature (adds the DKIM-Signature header). Sets the correct envelope sender for SPF to pass. Supports STARTTLS to encrypt the channel.
- Receiving MTA. Checks SPF (whether the sender's IP matches the DNS record), DKIM (whether the cryptographic signature is valid), and DMARC (domain alignment and policy enforcement). Writes the results into the Authentication-Results header, then decides whether to deliver, move to spam, or reject.
MTA, MDA, and MUA: who does what
A mail system has three functional layers:
- MUA (Mail User Agent): the application a user reads and writes email in. Thunderbird, Apple Mail, Outlook, mobile clients, webmail (Gmail, Outlook.com).
- MTA (Mail Transfer Agent): accepts messages from the MUA or other MTAs and relays them over SMTP. Handles routing and queuing.
- MDA (Mail Delivery Agent): takes the message from the MTA and places it in the user's mailbox. Dovecot, Procmail, maildrop. Also serves the mailbox over IMAP/POP3.
The boundaries are blurry in practice. Postfix can act as an MDA through its built-in local delivery agent. Dovecot is both an MDA and an IMAP server. Cloud services (Gmail, Microsoft 365) merge all three layers into a single platform.
Configuration that affects deliverability
MTA settings directly determine how receiving servers treat your messages. The key points:
- Hostname in EHLO. Must match the PTR record of the sending IP. A mismatch is an immediate red flag for spam filters.
- PTR record. The reverse DNS record for the MTA's IP. Without it, many servers refuse the connection with a 550.
- TLS. STARTTLS with a valid certificate. Without TLS, Gmail, Yahoo, and other major providers flag the message as insecure.
- Rate limiting and throttling. Per-domain send rate caps. Sending too aggressively results in 421 codes and IP blocks.
- Bounce processing. Correct handling of DSN messages. The MTA should recognize hard bounces (5xx) and automatically remove those addresses from future delivery attempts.
Cloud MTAs
Running your own MTA takes real operational work: IP reputation management, blocklist monitoring, IP rotation, feedback loop (FBL) processing. Cloud services (Amazon SES, SendGrid, Mailgun, Postmark) take on that work. You hand them a message over SMTP or API; they deliver it on your behalf, operating MTA infrastructure at scale.
For low volumes (a few thousand messages per day), a well-configured Postfix is perfectly capable. As volume grows, the cost of maintaining your own infrastructure rises, and a cloud MTA starts making economic sense.
uChecker connects to the recipient's MTA over SMTP to verify whether an email address exists. A correctly configured MTA on your side ensures technical deliverability; a clean address list protects your sender reputation from bounces.
