Postfix (software)
| Company type | Open-source software |
|---|---|
| Industry | Email / Mail transfer agent |
| Founded | 1997 |
| Founder | Wietse Venema |
| Headquarters | New York , United States |
| Products | Mail transfer agent (MTA) software |
| Website | https://www.postfix.org/ |
Postfix is a cost-free, open-source mail transfer agent (MTA) designed for routing and delivering electronic mail messages.
Distributed under the IBM Public License version 1.0, starting with release 3.2.5, users have the option to adopt the Eclipse Public License 2.0 instead.
Developed initially in 1997 by Wietse Venema at IBM’s Thomas J. Watson Research Center located in New York, Postfix was first made publicly available in December 1998. As of 2024, Venema along with other contributors continues its active development. The software was previously named VMailer and IBM Secure Mailer. Its name merges "post" referring to mail and "fix" indicating bug correction, highlighting its origins in software maintenance.
Typical deployment
In its role as an SMTP server, Postfix acts as a frontline defense mechanism against threats such as spambots and malware. It is commonly paired with spam and virus filtering solutions like Amavisd-new, mail storage systems including Dovecot, and SMTP-level access control utilities such as postfwd, mtpolicyd, milter-regex, and policyd-weight.
When functioning as an SMTP client, Postfix delivers a highly efficient, parallelized mail dispatch engine frequently integrated with mailing list management platforms like Mailman.
Operating systems
Postfix supports operation on numerous platforms including AIX, BSD, HP-UX, Linux, macOS, Solaris, and nearly all Unix-like environments equipped with a C compiler and standard POSIX compliance. It serves as the default MTA on systems such as macOS, NetBSD, RedHat/CentOS, and Ubuntu.
Architecture
The architecture of Postfix consists of several background daemon processes, each assigned to distinct email handling functions—examples include the SMTP server, scheduler, address rewriting component, and local delivery agent. To enhance security, these daemons operate with limited privileges and terminate either after processing a fixed number of requests or when idle to optimize resource usage.
External client programs communicate with Postfix daemons through user mail delivery directives (for instance, ~/.forward) or small gatekeeper programs responsible for submitting mail and querying queue statuses. Administrative utilities facilitate tasks such as starting or stopping Postfix services, monitoring system status, managing queues, and updating configurations.
- Yellow ellipses
- Each modular daemon within Postfix performs unique roles that collectively contribute to its secure and stable operation.
- Blue boxes
- Lookup tables containing key-value mappings assist in access control and directing mail flow.
- Orange boxes
- Persistent mail queues or files store email data on disk.
- White clouds
- Points where emails enter or exit the system; e.g., smtpd handles incoming messages while smtp forwards them to other MTAs.
Implementation
Postfix is implemented using secure subsets of the C language alongside the POSIX system programming interface. Approximately half of its source code consists of an abstraction layer that underlies all Postfix components. This layer enhances security by incorporating features such as the "vstring" primitive to prevent buffer overflow vulnerabilities and the "safe open" primitive to avoid race conditions on POSIX-compliant file systems. This design choice strengthens Postfix’s reliability without impacting compatibility with external or third-party software.
Robustness
Postfix operates through a series of processing pipelines responsible for message delivery and error reporting, with all state data stored on the file system. These components function with a degree of independence, which facilitates straightforward error handling: if a process fails during a transaction, the preceding process will attempt a retry later, while the following process discards any partial work. Numerous daemons are designed to exit upon encountering errors and are automatically relaunched when new service requests arrive, contributing to Postfix’s strong fault tolerance except in cases of severe operating system or hardware failures.
Performance
On standard hardware (a 2003 Dell 1850 equipped with battery-backed MegaRAID and SCSI drives), a single Postfix instance has been recorded delivering about 300 messages per second, significantly below its theoretical maximum of 2,500 messages per second achieved using a RAM disk and the "discard" transport on a dual-core Opteron platform.
Postfix and Qmail sustain high throughput by managing multiple simultaneous delivery sessions. This contrasts with Sendmail and Exim, which improve performance by processing limited parallel batches. To exceed Postfix's inherent or hardware-imposed limits, scaling is accomplished by distributing mail submissions across several MTA instances.
It is important to note that these delivery figures represent theoretical peaks; actual bulk mailing speeds are heavily influenced by recipient server restrictions and the sender’s reputation.
Base configuration
The main.cf file contains the site-specific configuration settings for Postfix, while daemon processes are defined in master.cf. The Basic Configuration tutorial provides fundamental setup instructions necessary for any installation, and the Standard Configuration Examples document offers configuration templates tailored to typical environments. Guidance on address rewriting and mail routing is available in the Address Rewriting manual. Extensive documentation can be accessed at [1].
More sophisticated Postfix configurations frequently incorporate integration with tools such as SpamAssassin and support multiple virtual domain names, often utilizing databases like MySQL to handle complex setups.
Surveys
A comprehensive Shodan scan conducted in February 2025 identified Postfix running on approximately 2.57 million servers, closely matching Exim’s presence at 2.56 million servers. Although some networks restrict Shodan scans, this likely does not substantially affect the comparative ratio between Postfix and Exim.
In contrast, a smaller-scale February 2025 survey by E-Soft, Inc. reported about 210,000 servers using Postfix compared to 310,000 running Exim. While commonly referenced, this survey covers a considerably smaller sample size than the Shodan dataset.
See also
Further reading
- Kyle D. Dent, Postfix: The Definitive Guide, O'Reilly Media, 2003
- Ralf Hildebrandt and Patrick Koetter, The Book of Postfix: State-of-the-Art Message Transport, No Starch Press, 2005