ZoneMTA for bulk email: routing and queue boundaries
Decide when ZoneMTA fits bulk sending, configure sending zones, and handle queue acknowledgement, duplicates, and per-domain delivery limits.
Reviewed
ZoneMTA is an outbound mail transfer agent built on Node.js, MongoDB, and Redis. Choose it when different message streams need different routing, sending IPs, or connection policies, and when you want to own the outbound queue. It is not a campaign manager and not an inbox: audience selection, templates, unsubscribe state, and replies belong in other systems.
This guide covers the decision and the bulk-sending contract. Installation, restricted submission, sending zones, and queue recovery have dedicated ZoneMTA server guides.
Prerequisites and operational shape
- A maintained Node.js runtime, MongoDB, and Redis.
- Sending IPs and DNS you control, including PTR, SPF, DKIM, and DMARC.
- Outbound port 25 connectivity, or a provider that permits it.
- A durable store for message bodies and per-recipient queue state.
- Monitoring for queue age, deferrals, storage, and dependency health.
The project is licensed under EUPL 1.2-or-later. The upstream README describes the application template, submission interfaces, and sending zones.
Use sending zones for policy, not authorization
A sending zone groups routing, sending IPs, and connection settings. ZoneMTA can select a zone by explicit zone headers, other headers, sender domain, or recipient domain. That is useful when transactional and marketing streams need separate outbound handling.
The zone must be chosen by a trusted application or plugin, not by an arbitrary field in a public request. If a caller can request a higher-trust zone or claim another tenant’s sender domain, zoning has become a privilege escalation path. Define the mapping from authenticated application or tenant to zone and source identity before exposing submission.
Do not assume that separating a stream into its own zone guarantees reputation isolation or inbox placement. It reduces coupling; it does not create a clean IP reputation.
Submit through one deliberate interface
ZoneMTA accepts messages over SMTP or its enabled HTTP interface. The HTTP interface distinguishes JSON /send from raw /send-raw; use one form consistently and validate the envelope and content before submission. MongoDB stores message bodies and per-recipient queue entries, while Redis supplies locking and counters.
For bulk work, the application should:
- Persist its own send intent and a stable idempotency key before submission.
- Submit messages in bounded batches and control concurrency independently of batch size.
- Record the returned queue or message correlation.
- Treat a submission acknowledgement as queue acceptance, not delivery.
The restricted submission guide covers keeping SMTP, HTTP injection, and internal data services off public unauthenticated interfaces.
Handle acknowledgement and duplicate risk
ZoneMTA retains queued work until the destination acknowledges it. Its documentation also notes that a lost acknowledgement can produce a duplicate. That means an application-level resend after a timeout can create two copies even though the first is still queued.
Before retrying, inspect the existing queue and message state. Use the supported operator tools rather than deleting MongoDB records or blobs as a generic cleanup step; that can lose outstanding mail or break reference assumptions. The queue recovery guide explains the evidence to collect.
ZoneMTA’s documented connection limits do not establish a global per-domain message-rate ceiling. If you need one, enforce it upstream or in your own plugin layer. Per-destination deferrals are the signal to slow down, not a reason to raise concurrency.
Where MailKite fits
MailKite, which we build, is a hosted sending and receiving API. It replaces the delivery layer, not a campaign application. It supports broadcasts and personalized batches but prohibits unsolicited bulk or commercial mail, sending without consent, and sending after opt-out.
A move from ZoneMTA to MailKite is a transport change: queue identity, zone policy, and duplicate-prevention state do not transfer. Keep one path for a given message rather than running both during cutover. See the bulk email guide and MailKite sending documentation.
Next steps
- Configure routing with sending zones.
- Harden submission with the restricted deployment guide.
- Compare transport choices in the bulk email API guide.
Sources reviewed 2026-11-07: ZoneMTA repository, license, and the open-source bulk email comparison.