Postfix (software)
   HOME

TheInfoList



OR:

Postfix is a free and open-source
mail transfer agent The mail or post is a system for physically transporting postcards, letters, and parcels. A postal service can be private or public, though many governments place restrictions on private systems. Since the mid-19th century, national postal syst ...
(MTA) that routes and delivers
electronic mail Electronic mail (email or e-mail) is a method of exchanging messages ("mail") between people using electronic devices. Email was thus conceived as the electronic (digital) version of, or counterpart to, mail, at a time when "mail" meant ...
. It is released under the
IBM Public License The IBM Public License (IPL) is a free open-source software license written and occasionally used by IBM. It is approved by the Free Software Foundation (FSF) and described as an "open-source license" by the Open Source Initiative. The IPL dif ...
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 2.0 at the user's option. Originally written in 1997 by
Wietse Venema Wietse Zweitze Venema (born 1951) is a Kingdom of the Netherlands, Dutch programmer and physicist best known for writing the Postfix (software), Postfix email system. He also wrote TCP Wrapper and collaborated with Dan Farmer to produce the comp ...
at the IBM
Thomas J. Watson Research Center The Thomas J. Watson Research Center is the headquarters for IBM Research. The center comprises three sites, with its main laboratory in Yorktown Heights, New York, U.S., 38 miles (61 km) north of New York City, Albany, New York and wit ...
in New York, 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 "fix "(which is for other software that inspired Postfix development). In a study published on June 1, 2022 by E-Soft, Inc., approximately 34% of the publicly reachable mail-servers on the Internet ran Postfix, making it the second most popular mail server behind Exim. Note: this survey covers less than 25% of the 4+ million reachable SMTP servers on the Internet.


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 ty ...
server, Postfix implements a first layer of defense against spambots and malware. 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 ty ...
-level access-policies (e.g.
postfwd
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 ty ...
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, BSD, HP-UX,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
,
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, Solaris and, generally speaking, on every
Unix-like A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
operating system that ships with a C
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
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 both the system- and user-level application programming inter ...
development environment. It is the default MTA for the
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, NetBSD, RedHat/ CentOS and
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All ...
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 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 ty ...
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 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 valuabl ...
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 both the system- and user-level application programming inter ...
system
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
. 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 In information security and programming, a buffer overflow, or buffer overrun, is an anomaly whereby a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations. Buffers are areas of memo ...
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 both the system- and user-level application programming inter ...
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 (a vintage-2003 Dell 1850 system with battery-backed MegaRAID controller and two SCSI 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 processor line, and was the first processor which supported the AMD64 instruction set architecture (known generically as x86-64 or AMD64). It was released on April 22, 2003, with the ''Sledg ...
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 replacement for the popular Sendmail program. Originally license-free software, qmail's source code ...
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 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 replacement for the popular Sendmail program. Originally license-free software, qmail's source code ...
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 true delivery rate is primarily determined by the receiver's mail receiving policies and by the sender's reputation.


Base configuration

Th
main.cf
file stores site-specific Postfix configuration parameters whil

defines daemon processes.Postfix-Tutorial.com: Postfix, Courier/POP, SASL & Spamassassin – with MySQL admin
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; support for multiple virtual
domain names A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet. Domain names are often used to identify services provided through the Internet, such as websites, email services and more. As ...
- and use databases such as
MySQL MySQL () is an 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 relational database ...
to control complex configurations.


Release history


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 diffi ...
*
Comparison of mail servers The comparison of mail servers covers mail transfer agents (MTAs), mail delivery agents, and other computer software that provide e-mail services. Unix-based mail servers are built using a number of components because a Unix-style environment i ...
*
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 appl ...


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