New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 4 Nov 2026

What is an MTA (mail transfer agent)? Postfix, Exim, Sendmail and KumoMTA compared

What a mail transfer agent does, how queues, routing, retries and bounces work, and how Postfix, Exim, Sendmail and KumoMTA differ in design, configuration and typical use, so you can choose or understand the right one.

VR
Written by Valentina Reyes
E-commerce Email Specialist
Reviewed by Daniel Whitfield
  • Published6 Aug 2023
  • Read time7 min
  • Length1,345 words
Share this guide

A mail transfer agent (MTA) is the server software that moves email from one machine to another using SMTP. It accepts a message, stores it in a queue, looks up where the recipient's domain receives mail, connects to that server, hands the message over and retries if the remote side is unavailable. If delivery fails permanently, it generates a bounce. Postfix, Exim, Sendmail and KumoMTA are four well-known examples.

They solve the same core problem but with different priorities. Postfix emphasises security and simple configuration, Exim emphasises flexibility, Sendmail is the historic original and KumoMTA is a newer, scriptable engine aimed at high-volume sending. Choosing between them depends on whether you are running a general mail server, a relay for applications or a bulk sending platform.

Core jobAccept, queue, route, deliver, retry and bounce messages over SMTP
General purposePostfix and Exim are common choices for mail servers and relays
LegacySendmail is the long-established original, still found on older systems
High volumeKumoMTA is built for large-scale outbound sending with policy written in Lua

What an MTA does, step by step

  1. Accepts a message from a client or another server over SMTP, applying authentication and policy checks.
  2. Queues it on disk so that it survives restarts and temporary failures. See the mail queue.
  3. Routes it by looking up the MX records of the recipient domain, or by applying a rule such as sending everything to a smarthost.
  4. Connects to the destination, negotiates TLS if offered and transfers the message.
  5. Handles the response. A 2xx reply completes delivery, a 4xx reply schedules a retry and a 5xx reply produces a bounce. See retry schedules.
  6. Hands over locally to a mail delivery agent when the recipient is on the same system.
  7. Logs every step so that you can trace what happened.

An MTA is not a mail client and not a mailbox store. The roles are described in MTA, MDA and MUA explained, and the concept is covered in what an MTA is and how it works.

The four MTAs compared

AspectPostfixEximSendmailKumoMTA
Origin and characterWritten as a secure, modular alternative to SendmailDeveloped at the University of Cambridge, very flexibleOne of the earliest MTAs, dating from the 1980sNewer open-source MTA written in Rust, aimed at high-volume senders
DesignSeveral cooperating processes with small responsibilitiesOne main program with powerful routers and transportsLarge monolithic daemonAsynchronous engine with queues per destination and policy scripts
ConfigurationPlain text files such as main.cf and master.cfOne configuration file with a rich string expansion languageMacro files compiled to sendmail.cfLua scripts and structured configuration
StrengthPredictable, well documented, common choice for relaysComplex routing and per-message logicUbiquity on older systems, long track recordThroughput, traffic shaping and programmable policy
Typical useGeneral mail servers, relays and smarthostsHosting providers and sites needing custom routingLegacy systems and environments that already depend on itBulk and transactional sending platforms
Learning curveModerateSteeper because of its expansion languageSteep, config is hard to readNeeds scripting skills and operational care

Treat the table as a summary of design intent. Details change between versions, so confirm features in each project's current documentation. Defaults also differ between Linux distributions, and several distributions ship one of these MTAs as the default.

Postfix

Postfix is a popular choice for mail servers and application relays. Its structure splits work among small processes, which limits the damage from a flaw in any one component, and its configuration is easy to read. A common role is a relay that forwards all mail through a smarthost with authentication, as described in configuring Postfix as an SMTP relay. Useful commands for inspection are shown below.

postconf -n          # show non-default configuration
postfix check        # check configuration and permissions
postqueue -p         # list the queue
postqueue -f         # flush the queue
tail -f /var/log/mail.log   # path varies by distribution

Exim

Exim is known for flexible routing. Its routers and transports let administrators decide on a per-message basis how to deliver, and its string expansion language can make decisions based on almost any property of the message. That power suits hosting platforms with complex requirements, but it also makes configuration harder to read and audit. Many distributions, including Debian historically, have packaged Exim as a default; check your system. Inspection commands include the following.

exim -bp                       # list the queue
exim -bt [email protected]      # test how an address would be routed
exim -Mvl <message-id>         # view the log for a message
exim -qff                      # attempt delivery of everything, including frozen

Sendmail

Sendmail is the historic MTA that much of the internet used for decades. It is still found on older systems and some commercial Unix environments, and its command line interface (sendmail -t) survives as a compatibility interface in other MTAs, so scripts written for it still work. Its configuration is built with m4 macros that produce a dense file, which many administrators find difficult. New deployments generally choose Postfix, Exim or another modern MTA, but you may need to maintain Sendmail where it already runs.

mailq                      # show the queue
sendmail -bp               # same, on most installations
echo "Test" | sendmail -v [email protected]

KumoMTA

KumoMTA is an open-source MTA designed for senders who deliver large volumes and need fine control. Rather than a static configuration file, it uses Lua scripts for policy, so traffic shaping, routing, DKIM signing and queue behaviour per destination can be written as code. It offers an HTTP API for injection and events and is built to manage per-provider rate limits and retries. The sample below is only an illustration of the shape of an init script; consult the project documentation for the current API before using any of it.

-- init.lua (illustrative only)
local kumo = require 'kumo'

kumo.on('init', function()
  kumo.start_esmtp_listener {
    listen = '0.0.0.0:25',
    relay_hosts = { '127.0.0.1' },
  }
  kumo.define_spool { name = 'data', path = '/var/spool/kumomta/data' }
  kumo.define_spool { name = 'meta', path = '/var/spool/kumomta/meta' }
  kumo.configure_local_logs { log_dir = '/var/log/kumomta' }
end)

Running a high-volume MTA is more than installing software. You also need IP reputation management, warm-up, authentication, bounce processing, feedback loop handling and monitoring. See build versus buy for email infrastructure before committing to run your own.

How to choose

NeedReasonable starting point
Send system mail from a serverA minimal Postfix or Exim set up as a null client that forwards to a smarthost
Run mail for a company or hosting platformPostfix or Exim with a separate delivery agent and access server
Maintain an existing legacy systemSendmail, and plan a migration when practical
Run a high-volume sending platformKumoMTA or another engine built for outbound scale, plus deliverability operations
Send application mail without operating serversUse an SMTP relay or API service instead of an MTA of your own

Security basics for any MTA

  • Never run an open relay. Restrict relaying to authenticated users and trusted networks. See open relays.
  • Enable TLS for inbound and outbound connections, with valid certificates.
  • Authenticate the domain: publish SPF, DKIM and DMARC and set a matching reverse DNS record.
  • Keep software updated and restrict who can administer the host.
  • Monitor the queue and logs and alert on growth or unusual traffic.
  • Rate limit outbound mail per user and per destination so that one compromised account cannot burn your reputation.

Troubleshooting

SymptomLikely causeWhat to do
Queue grows steadilyRemote deferrals, DNS failure or blocked outbound port 25Read the deferral text in the logs and test connectivity
Relay access deniedClient not authenticated or not in the trusted listFix authentication or relay rules, not by opening relay for all
Mail rejected at the receiverMissing reverse DNS, SPF or DKIM, or blocklisted IPCheck authentication and listings
Messages stuck as frozen (Exim)Delivery failed in a way that needs attentionInspect the message log and thaw or remove as appropriate
TLS errors on connectionCertificate or protocol mismatchVerify certificate chain, names and supported protocol versions

An MTA is the engine at the centre of email delivery. Postfix and Exim cover most general needs, Sendmail remains where it was installed long ago and KumoMTA addresses high-volume outbound sending. If you only need to send application mail, a managed relay removes the operational burden while leaving you in control of your messages.

Send without running your own MTA Use a managed SMTP relay with authentication, TLS and event webhooks.

Explore the SMTP relay

References and further reading

Frequently asked questions

What is an MTA?

A mail transfer agent is software that accepts email, queues it, routes it to the recipient server over SMTP, retries on temporary failure and generates bounces.

Which MTA should I choose?

Postfix or Exim suit most general needs, Sendmail is mainly for existing systems and KumoMTA targets high-volume outbound sending.

Is Sendmail still used?

Yes, mostly on older systems. Its command line interface is also kept for compatibility by other MTAs.

What makes KumoMTA different?

It is built for high-volume outbound mail and uses Lua scripts for policy such as routing, traffic shaping and signing.

Do I need my own MTA to send application email?

No. A managed SMTP relay or email API handles queuing, retries and bounces, so you only submit messages.

Topics#mta#postfix#exim#sendmail#kumomta#mail server
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales