QMail Email Server

qmailQMail is an Open Source Internet Mail Transfer Agent (MTA) for UNIX-like operating systems.

It is a drop-in replacement for the Sendmail system provided with UNIX operating systems. qmail uses the Simple Mail Transfer Protocol (SMTP) to exchange messages with MTA’s on other systems.

Qmail is a secure, reliable, efficient, simple message transfer agent. It is designed for typical Internet-connected UNIX hosts. As of October 2001, qmail is the second most common SMTP server on the Internet, and has by far the fastest growth of any SMTP server.

Secure: Security isn’t just a goal, but an absolute requirement. Mail delivery is critical for users; it cannot be turned off, so it must be completely secure.

Reliable: qmail’s straight-paper-path philosophy guarantees that a message, once accepted into the system, will never be lost. qmail supports maildir, a super-reliable user mailbox format.

Efficient: On a Pentium under BSD/OS, qmail can easily sustain 200000 local messages per day—that’s separate messages injected and delivered to mailboxes in a real test! Although remote deliveries are inherently limited by the slowness of DNS and SMTP, qmail overlaps 20 simultaneous deliveries by default, so it zooms quickly through mailing lists.

Simple: qmail is vastly smaller than any other Internet MTA. Some reasons why: (1) Other MTAs have separate forwarding, aliasing, and mailing list mechanisms. qmail has one simple forwarding mechanism that lets users handle their own mailing lists. (2) Other MTAs offer a spectrum of delivery modes, from fast+unsafe to slow+queued. qmail-send is instantly triggered by new items in the queue, so the qmail system has just one delivery mode: fast+queued. (3) Other MTAs include, in effect, a specialized version of inetd that watches the load average. qmail’s design inherently limits the machine load, so qmail-smtpd can safely run from your system’s inetd.

Replacement for sendmail: qmail supports host and user masquerading, full host hiding, virtual domains, null clients, list-owner rewriting, relay control, double-bounce recording, arbitrary RFC 822 address lists, cross-host mailing list loop detection, per-recipient checkpointing, downed host backoffs, independent message retry schedules, etc. qmail also includes a drop-in “sendmail” wrapper so that it will be used transparently by your current UAs

Feature list


* automatic adaptation to your UNIX variant—no porting needed
* AIX, BSD/OS, FreeBSD, HP/UX, Irix, Linux, OSF/1, SunOS, Solaris, and more
* automatic per-host configuration (config, config-fast)
* quick installation—no big list of decisions to make


* clear separation between addresses, files, and programs
* minimization of setuid code (qmail-queue)
* minimization of root code (qmail-start, qmail-lspawn)
* five-way trust partitioning—security in depth
* optional logging of one-way hashes, entire contents, etc. (QUEUE_EXTRA)

Message construction (qmail-inject):

* RFC 822, RFC 1123
* full support for address groups
* automatic conversion of old-style address lists to RFC 822 format
* sendmail hook for compatibility with current user agents
* header line length limited only by memory
* host masquerading (control/defaulthost)
* user masquerading ($MAILUSER, $MAILHOST)
* automatic Mail-Followup-To creation ($QMAILMFTFILE)

SMTP service (qmail-smtpd):

* RFC 821, RFC 1123, RFC 1651, RFC 1652, RFC 1854
* 8-bit clean
* 931/1413/ident/TAP callback (tcp-env)
* relay control—stop unauthorized relaying by outsiders (control/rcpthosts)
* no interference between relay control and aliases
* automatic recognition of local IP addresses
* per-buffer timeouts
* hop counting
* parallelism limit (ucspi-tcp/tcpserver, available separately)
* refusal of connections from known abusers (tcpserver)
* relaying and message rewriting for authorized clients
* optional RBL/ORBS support (ucspi-tcp/rblsmtpd, available separately)

Queue management (qmail-send):

* instant handling of messages added to queue
* parallelism limit (control/concurrencyremote, control/concurrencylocal)
* split queue directory—no slowdown when queue gets big
* quadratic retry schedule—old messages tried less often
* independent message retry schedules
* automatic safe queueing—no loss of mail if system crashes
* automatic per-recipient checkpointing
* automatic queue cleanups (qmail-clean)
* queue viewing (qmail-qread)
* detailed delivery statistics (qmailanalog, available separately)

Bounces (qmail-send):

* QSBMF bounce messages—both machine-readable and human-readable
* HCMSSC support—language-independent RFC 1893 error codes
* double bounces sent to postmaster

Routing by domain (qmail-send):

* any number of names for local host (control/locals)
* any number of virtual domains (control/virtualdomains)
* domain wildcards (control/virtualdomains)
* configurable percent hack support (control/percenthack)
* UUCP hook

SMTP delivery (qmail-remote):

* RFC 821, RFC 974, RFC 1123
* 8-bit clean
* automatic downed host backoffs
* artificial routing—smarthost, localnet, mailertable (control/smtproutes)
* per-buffer timeouts
* passive SMTP queue—perfect for SLIP/PPP (serialmail, available separately)
* AutoTURN support (serialmail)

Forwarding and mailing lists (qmail-local):

* sendmail .forward compatibility (dot-forward, available separately)
* hashed forwarding databases (fastforward, available separately)
* sendmail /etc/aliases compatibility (fastforward/newaliases)
* address wildcards (.qmail-default, .qmail-foo-default, etc.)
* mailing list owners—automatically divert bounces and vacation messages
* VERPs—automatic recipient identification for mailing list bounces
* Delivered-To—automatic loop prevention, even across hosts
* automatic subscription management (ezmlm, available separately)

Local delivery (qmail-local):

* user-controlled address hierarchy—fred controls fred-anything
* mbox delivery
* reliable NFS delivery (maildir)
* user-controlled program delivery: procmail etc. (qmail-command)
* optional new-mail notification (qbiff)
* optional NRUDT return receipts (qreceipt)
* conditional filtering (condredirect, bouncesaying)

POP3 service (qmail-popup, qmail-pop3d):

* RFC 1939
* UIDL support
* TOP support
* APOP hook
* modular password checking (checkpassword, available separately)