Introducing Postfix

Introducing Postfix

Postfix is a mail-transfer agent that you can use in place of Sendmail to handle mail service on your Red Hat Linux system. Postfix is meant to be easier to administer and be more secure.

Although many of the configuration files and other components are different from those in Sendmail, some are meant to replace Sendmail components. To help you make the transition from Postfix to Sendmail, Red Hat Linux has configured the two packages to use the alternatives system. Chapter 10 describes how to use the Mail Transport Agent Switcher to change from one transport to the other.

When you switch to Postfix and start the Postfix daemon, as described in Chapter 10, Postfix takes over as the MTA, replaces Sendmail components with Postfix components, and uses some of the same locations for mailboxes and log files. Postfix takes over mail transport based on configuration files set in the /etc/postfix directory. The following is an overview of the default locations used by the Postfix service:

  • Mail configuration (/etc/postfix/ — The primary configuration file for Postfix. Identifies the locations of Postfix queues, commands, and aliases, as well as defining the host and domain names that Postfix is serving. If you do not add a fully-qualified domain name to this file, Postfix will use your local host name as the name of the mail service it represents.

  • Mailboxes (/var/spool/mail) — Directory containing incoming mail files, with each user's mailbox represented by a file of the user's name. (This is the same default spool directory used by Sendmail.)

  • Mail Queue (/var/spool/postfix) — Location of directories where mail messages are queued for delivery.

  • Mail Log (/var/log/maillog) — Location of mail-log files.

Although most options you need for Postfix are described in the /etc/postfix/ file, you can see many more available options in the file in the same directory. Based on the default configuration in the file, here is how Postfix will handle outbound and incoming mail:

  • Outbound Mail — The local host name is added as the sending host for the mail posted from this computer. You might want to change it to the local domain name (set myorigin = $mydomain).

  • Incoming Mail — Only mail destined for the local host name is kept on the local server by default. Other mail is forwarded. To have all mail for your domain kept on the local server, add $mydomain to the mydestination line.

For complete information on configuring Postfix, refer to

Part IV: Red Hat Linux Network and Server Setup