Postfix is a free and open-source mail transfer agent that routes and delivers
electronic mail, intended as an alternative to the widely used Sendmail
MTA. Postfix is released under the IBM Public
License 1.0 which is a free software license.
Originally written in 1997 by Wietse Venema at the IBM Thomas J. Watson
Research Center and first released in December 1998, Postfix continues as of
2015 to be actively developed by its creator and other contributors. The
software is also known by its former names VMailer and IBM Secure Mailer.
In August 2015 in a study performed by E-Soft, Inc., approximately 32% of the
publicly reachable mail-servers on the Internet ran Postfix.
Typical deployment As an SMTP server, Postfix implements a
first layer of defense against spambots and malware. Administrators can combine
Postfix with other software that provides spam/virus filtering,
message-store access, or complex SMTP-level access-policies.
As an SMTP client, Postfix implements a high-performance parallelized
mail-delivery engine. Postfix is often combined with mailing-list software.
Features Postfix implements a limited number of
features in the MTA, and relies on third-party extensions for the rest.
= Main Postfix built-in features = Standards-compliant support for
SMTPUTF8, SMTP, LMTP, STARTTLS encryption including DANE protocol
support and "perfect" forward secrecy, SASL authentication, MIME encapsulation
and transformation, DSN delivery status notifications, IPv4, and IPv6.
Configurable SMTP-level access policy that automatically adapts to overload
"Virtual" domains with distinct address-namespaces.
UNIX-system interfaces for command-line submission, for delivery to command, and
for direct delivery to message stores in mbox and maildir format.
Light-weight content inspection based on regular expressions.
A large number of database lookup mechanisms including Berkeley DB, CDB,
OpenLDAP LMDB, Memcached, LDAP and multiple SQL database implementations.
A sophisticated scheduler that implements parallel deliveries, with
configurable concurrency and back-off strategies.
A scalable zombie blocker that reduces SMTP server load due to botnet spam.
= Typical Postfix extension features = Postfix extensions use the SMTP or
Milter protocols which both give full control over the message envelope and
content, or a simple text-based protocol that enables complex SMTP-level access
control policies. Deep content inspection before or after
a message is accepted into the mail queue;
Mail authentication with DMARC, DKIM, SPF, or other protocols;
SMTP-level access policies such as greylisting or rate control.
Operating systems Postfix runs on AIX, BSD, HP-UX,
GNU/Linux, OS X, Solaris and, generally speaking, on every Unix-like operating
system that ships with a C compiler and delivers a standard POSIX development
environment. It is the default MTA for the OS X, NetBSD and Ubuntu operating
systems. Architecture
Postfix consists of a combination of server programs that run in the
background, and client programs that are invoked by user programs or by system
administrators. The Postfix core consists of several
dozen server programs that run in the background, each handling one specific
aspect of email delivery. Examples are the SMTP server, the scheduler, the
address rewriter, and the local delivery server. For damage-control purposes,
most server programs run with fixed reduced privileges, and terminate
voluntarily after processing a limited number of requests. To conserve system
resources, most server programs terminate when they become idle.
Client programs run outside the Postfix core. They interact with Postfix server
programs through mail delivery instructions in the user's ~/.forward
file, and through small "gate" programs to submit mail or to request queue
status information. Other programs provide administrative
support to start or stop Postfix, query status information, manipulate the
queue, or to examine or update its configuration files.
Yellow ellipses One of Postfix' many daemons serving
exactly one purpose. This split-up into many smaller pieces of software is
considered one of the reasons why Postfix is secure and stable.
Blue boxes The blue boxes represent so-called
lookup tables. A lookup table consists of two columns containing information
used for access control, e-mail routing etc.
Yellow boxes The yellow boxes are either mail queues
or files. In either case, e-mails are stored on persistent media.
White clouds The clouds stand for points at which
e-mails enter or leave Postfix. For example, smtpd receives mail from other
mail servers or users whereas smtp relays mail to other MTAs.
Implementation The Postfix implementation uses safe
subsets of the C language and of the POSIX system API. These subsets are
buried under an abstraction layer that contains about 50% of all Postfix source
code, and that provides the foundation on which all Postfix programs are built.
For example, the "vstring" primitive makes Postfix code resistant to buffer
overflow attacks, and the "safe open" primitive makes Postfix code resistant
to race condition attacks on systems that implement the POSIX file system
API. This abstraction layer does not affect the attack resistance of
non-Postfix code, such as code in system libraries or in third-party libraries.
Robustness Conceptually, Postfix manages pipelines
of processes that pass the responsibility for message delivery and
error notification from one process to the next. All message and notification
"state" information is persisted in the file system. The processes in a pipeline
operate mostly without centralized control; this relative autonomy
simplifies error recovery. When a process fails before completing its part
of a file or protocol transaction, its predecessor in the pipeline backs off
and retries the request later, and its successor in the pipeline discards
unfinished work. Many Postfix daemons can simply "die" when they run into a
problem; they are automatically restarted when the next service request
arrives. This approach makes Postfix highly resilient, as long as the
operating system or hardware don't fail catastrophically.
Performance One single Postfix instance has been
clocked at ~300 message deliveries/second across the Internet,
running on commodity hardware. This delivery rate is an order of magnitude
below the "intrinsic" limit of 2500 message deliveries/second that was
achieved with the mail queue on a RAM disk while delivering to the "discard"
transport. Mail systems such as Postfix and Qmail
achieve high performance by delivering mail in parallel sessions. With mail
systems such as Sendmail and Exim that make one connection at a time, high
performance can be achieved by submitting limited batches of mail in
parallel, so that each batch is delivered by a different process.
Postfix and Qmail require parallel submission into different MTA instances
once they reach their intrinsic performance limit, or the performance
limits of the hardware or operating system.
It should be noted that the delivery rates cited above are largely academic.
With bulk mail delivery, the true delivery rate is primarily determined by
the receiver's mail receiving policies and by the sender's reputation.
Base configuration The main.cf file stores site-specific
Postfix configuration parameters while master.cf defines daemon processes. The
Postfix Basic Configuration tutorial covers the core settings that each site
needs to consider, and the Postfix Standard Configuration Examples document
discusses configuration settings for a few common environments. The Postfix
Address Rewriting document covers address rewriting and mail routing. The
full documentation collection is at Postfix Documentation
More complex Postfix implementations may include: integration with other
applications such as SpamAssassin; support for multiple virtual domain
names - and use databases such as MySQL to control complex configurations.
Release history See also
List of mail servers Comparison of mail servers
Email filtering References
Further reading Kyle D. Dent. Postfix: The Definitive
Guide. O'Reilly Media. ISBN 0-596-00212-2.
Ralf Hildebrandt and Patrick Koetter. The book of Postfix: state-of-the-art
message transport. No Starch Press. ISBN 1-59327-001-1.
External links Official website
Postfix "how to" with configuration examples and explanation
Postfix policy delegation server Postfix policy delegation server
Postfix introduction and analysis for secure environments
#postfix connect on freenode Postfix Architecture Overview