Postfix is a
free and
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
mail transfer agent
Within the Internet email system, a message transfer agent (MTA), mail transfer agent, or mail relay is software that transfers electronic mail messages from one computer to another using the Simple Mail Transfer Protocol. In some contexts, the a ...
(MTA) that routes and delivers
electronic mail
Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
.
It is released under the
IBM Public License 1.0 which is a
free software license
A free-software license is a notice that grants the recipient of a piece of software extensive rights to modify and redistribute that software. These actions are usually prohibited by copyright law, but the rights-holder (usually the author) ...
. Alternatively, starting with version 3.2.5, it is available under the
Eclipse Public License
The Eclipse Public License (EPL) is a free and open source software license most notably used for the Eclipse IDE and other projects by the Eclipse Foundation. It replaces the Common Public License (CPL) and removes certain terms relating t ...
2.0 at the user's option.
Originally written in 1997 by
Wietse Venema at the
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
Thomas J. Watson Research Center
The Thomas J. Watson Research Center is the headquarters for IBM Research. Its main laboratory is in Yorktown Heights, New York, 38 miles (61 km) north of New York City. It also operates facilities in Cambridge, Massachusetts and Albany, ...
in
New York
New York most commonly refers to:
* New York (state), a state in the northeastern United States
* New York City, the most populous city in the United States, located in the state of New York
New York may also refer to:
Places United Kingdom
* ...
, and first released in December 1998, Postfix continues to be actively developed by its creator and other contributors. The software is also known by its former names VMailer and IBM Secure Mailer.
The name Postfix is a compound of "post" (which is another word for "mail") and "
bugfix
A patch is data that is intended to be used to modify an existing software resource such as a program or a file, often to fix bugs and security vulnerabilities. A patch may be created to improve functionality, usability, or performance. A pa ...
" (which is for other software that inspired Postfix development).
Typical deployment
As an
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
server, Postfix implements a first layer of defense against
spambot
A spambot is a computer program designed to assist in the sending of spam. Spambots usually create accounts and send spam messages with them. Web hosts and website operators have responded by banning spammers, leading to an ongoing struggle betwee ...
s and
malware
Malware (a portmanteau of ''malicious software'')Tahir, R. (2018)A study on malware and malware detection techniques . ''International Journal of Education and Management Engineering'', ''8''(2), 20. is any software intentionally designed to caus ...
. Administrators can combine Postfix with other software that provides spam/virus filtering (e.g.,
Amavisd-new), message-store access (e.g.,
Dovecot), or complex
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
-level access-policies (e.g.
postfwdmtpolicyd policyd-weight).
As an
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
client, Postfix implements a high-performance parallelized mail-delivery engine. Postfix is often combined with
mailing-list software (such as
Mailman).
Operating systems
Postfix runs (or has run) on
AIX
Aix or AIX may refer to:
Computing
* AIX, a line of IBM computer operating systems
*Alternate index, for an IBM Virtual Storage Access Method key-sequenced data set
* Athens Internet Exchange, a European Internet exchange point
Places Belg ...
,
BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
,
HP-UX
HP-UX (from "Hewlett Packard Unix") is a proprietary software, proprietary implementation of the Unix operating system developed by Hewlett Packard Enterprise; current versions support HPE Integrity Servers, based on Intel's Itanium architect ...
,
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
,
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
,
Solaris
Solaris is the Latin word for sun.
It may refer to:
Arts and entertainment Literature, television and film
* ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem
** ''Solaris'' (1968 film), directed by Boris Nirenburg
** ''Sol ...
and, generally speaking, on every
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating system that ships with a
C compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
and delivers a standard
POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
development environment. It is the default
MTA for the
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
,
NetBSD
NetBSD is a free and open-source Unix-like operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was fork (software development), forked. It continues to ...
,
RedHat/
CentOS
CentOS (, from Community Enterprise Operating System; also known as CentOS Linux) is a discontinued Linux distribution that provided a free and open-source community-supported computing platform, functionally compatible with its upstream (softw ...
and
Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
operating systems.
Architecture
Postfix consists of a combination of server programs that run in the background, and client programs that are invoked by
user
Ancient Egyptian roles
* User (ancient Egyptian official), an ancient Egyptian nomarch (governor) of the Eighth Dynasty
* Useramen, an ancient Egyptian vizier also called "User"
Other uses
* User (computing), a person (or software) using an ...
programs or by system administrators.
The Postfix core consists of several dozen
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides requested information for other programs or devices, called clients.
Role
* Waiting staff, those who work at a restaurant or a bar attending custome ...
programs that run in the background, each handling one specific aspect of email delivery. Examples are the
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
server, the
scheduler
A schedule (, ) or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things ...
, 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
Client(s) or The Client may refer to:
* Client (business)
* Client (computing), hardware or software that accesses a remote service on another computer
* Customer or client, a recipient of goods or services in return for monetary or other valuable ...
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 (key and value) containing information used for access control, e-mail routing etc.
; Orange boxes: The orange boxes are either mail queues or files. In either case, e-mails are stored on persistent media (e.g., a hard disk).
; 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
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
system
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
. 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
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
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
A pipeline is a system of pipes for long-distance transportation of a liquid or gas, typically to a market area for consumption. The latest data from 2014 gives a total of slightly less than of pipeline in 120 countries around the world. The Un ...
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 (a vintage-2003
Dell
Dell Inc. is an American technology company that develops, sells, repairs, and supports personal computers (PCs), Server (computing), servers, data storage devices, network switches, software, computer peripherals including printers and webcam ...
1850 system with battery-backed MegaRAID controller and two
SCSI
Small Computer System Interface (SCSI, ) is a set of standards for physically connecting and transferring data between computers and peripheral devices, best known for its use with storage devices such as hard disk drives. SCSI was introduced ...
disks). 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 (with a dual-core
Opteron
Opteron is AMD's x86 former server and workstation Microprocessor, processor line, and was the first processor which supported the AMD64 instruction set architecture (known generically as x86-64). It was released on April 22, 2003, with the ''Sl ...
system in 2007).
Mail systems such as Postfix and
Qmail
qmail is a mail transfer agent (MTA) that runs on Unix. It was written, starting December 1995, by Daniel J. Bernstein as a more secure alternative to the popular Sendmail program. Originally license-free software, qmail's source code wa ...
achieve high performance by delivering mail in parallel sessions. With mail systems such as
Sendmail
Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet.
A descendant of t ...
and
Exim that do one delivery 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
qmail is a mail transfer agent (MTA) that runs on Unix. It was written, starting December 1995, by Daniel J. Bernstein as a more secure alternative to the popular Sendmail program. Originally license-free software, qmail's source code wa ...
require parallel submission into different MTA instances once they reach their intrinsic performance limit, or the performance limits of the hardware or operating system.
The delivery rates cited above are largely theoretical. With bulk mail delivery, the actual delivery rate primarily depends on the receiver's mail receiving policies and by the sender's reputation.
Base configuration
Th
main.cffile stores site-specific Postfix configuration parameters whil
defines daemon processes. Th
tutorial covers the core settings that each site needs to consider, and th
document discusses configuration settings for a few common environments. Th
document covers address rewriting and mail routing. The full documentation collection is a
More complex Postfix implementations may include: integration with other applications such as
SpamAssassin
Apache SpamAssassin is a computer program used for e-mail spam filtering. It uses a variety of spam-detection techniques, including DNS and fuzzy checksum techniques, Bayesian filtering, external programs, blacklists and online databases. It ...
; support for multiple virtual
domain names
In the Internet, a domain name is a string that identifies a realm of administrative autonomy, authority, or control. Domain names are often used to identify services provided through the Internet, such as websites, email services, and more. D ...
- and use databases such as
MySQL
MySQL () is an Open-source software, open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A rel ...
to control complex configurations.
Surveys
Large: In
Shodan
SHODAN (), an acronym for Sentient Hyper-Optimized Data Access Network, is the main antagonist of Looking Glass Studios's cyberpunk-horror themed video game ''System Shock (series), System Shock''. An artificial intelligence originally in charg ...
scan results from middle February 2025, Postfix was detected 2.57 million times, Exim 2.56 million times. Some sites block Shodan probes, but it is unclear whether this would materially affect the Postfix to Exim ratio.
Small: In a 10 times smaller study published on February 1, 2025 by E-Soft, Inc.,
0.21 million mail servers ran Postfix, making it a distant second behind
Exim with 0.31 million. The E-Soft survey is often cited, but it reports on a much smaller population than Shodan.
See also
*
List of mail servers
This is a list of mail server software: mail transfer agents, mail delivery agents, and other computer software which provide e-mail.
Product statistics
All such figures are necessarily estimates because data about mail server share is difficul ...
*
Comparison of mail servers
*
Email filtering
Email filtering is the processing of email to organize it according to specified criteria. The term can apply to the intervention of human intelligence, but most often refers to the automatic processing of messages at an SMTP server, possibly ap ...
References
Further reading
*
*
External links
*
Postfix "how to" with configuration examples and explanation
{{Authority control
Message transfer agents
Free email server software
IBM software
Unix network-related software
1997 software
Email server software for Linux