HOME

TheInfoList



OR:

Postfix is a
free Free may refer to: Concept * Freedom, having the ability to do something, without having to obey anyone/anything * Freethought, a position that beliefs should be formed only on the basis of logic, reason, and empiricism * Emancipate, to procur ...
and
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
mail transfer agent (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" mean ...
. 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 diff ...
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 software distribution, redistribute that software. These actions are usually prohibited by copyright law, but the rights-holde ...
. 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 to ...
2.0 at the user's option. Originally written in 1997 by Wietse Venema at the IBM Thomas J. Watson Research Center in
New York New York most commonly refers to: * New York City, the most populous city in the United States, located in the state of New York * New York (state), a state in the northeastern United States New York may also refer to: Film and television * '' ...
, 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 typic ...
server, Postfix implements a first layer of defense against spambots and
malware Malware (a portmanteau for ''malicious software'') is any software intentionally designed to cause disruption to a computer, server, client, or computer network, leak private information, gain unauthorized access to information or systems, de ...
. 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 typic ...
-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 typic ...
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 HP-UX (from "Hewlett Packard Unix") is Hewlett Packard Enterprise's proprietary implementation of the Unix operating system, based on Unix System V (initially System III) and first released in 1984. Current versions support HPE Integrit ...
,
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, which i ...
,
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 (computer), Mac computers. Within the market of ...
, 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 that ...
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 inte ...
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 (computer), Mac computers. Within the market of ...
,
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
, RedHat/ CentOS 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 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 typic ...
server, the scheduler, the address rewriter, and the local delivery server. For damage-control purposes, most server programs run with fixed reduced
privileges Privilege may refer to: Arts and entertainment * ''Privilege'' (film), a 1967 film directed by Peter Watkins * ''Privilege'' (Ivor Cutler album), 1983 * ''Privilege'' (Television Personalities album), 1990 * ''Privilege (Abridged)'', an alb ...
, 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 inte ...
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 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 memor ...
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 inte ...
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 Dell is an American based technology company. It develops, sells, repairs, and supports computers and related products and services. Dell is owned by its parent company, Dell Technologies. Dell sells personal computers (PCs), servers, data ...
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. The SCSI standards define commands, protocols, electrical, optical and logical interface ...
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 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 - 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 *
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 ...
* Email filtering


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