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. There are several reasons that Postfix proponents give for using Postfix instead of sendmail for their mail service:

  • Postfix is designed to be easier to administer. Instead of using m4 syntax in the sendmail.mc file, Postfix uses the same types of directives used in the Apache Web server.

  • Postfix has multiple layers of security built in, including the ability to run in a chroot jail. It also filters any sender-provided information before exporting that information into the Postfix environment.

Although some of the configuration files and other components are different from those in Sendmail, many are meant to replace Sendmail components (such as aliases, access , and .forward files, as well as the /var/mail directory structure). To help you make the transition to Postfix from Sendmail, Fedora and RHEL have 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/main.cf ) - 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 hostname 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/main.cf file, you can see many more available options in the main.cf.default file in the same directory. Based on the default configuration in the main.cf file, here is how Postfix will handle outbound and incoming mail:

  • Outbound Mail - The local hostname 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 hostname 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 www.postfix.org/docs.html .




Fedora 6 and Red Hat Enterprise Linux Bible
Fedora 6 and Red Hat Enterprise Linux Bible
ISBN: 047008278X
EAN: 2147483647
Year: 2007
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net