1. | Use your favorite Web browser to visit the Postfix download page (www.postfix.org/downloa93). |
2. | Click the link for a mirror that's close to you. You can't choose wrong on the download page. |
3. | Download the latest official release ("2.1 patchlevel 5" as of this writing) and save the file. |
4. | tar -xzf postfix-2.1.5.tar.gzUnpack the Postfix source code. This creates a postfix-2.1.5 directory. |
5. | cd postfix-2.1.5Change to the Postfix source directory. |
6. | makeBuild Postfix from the source code.Code listing 8.3. Installing Postfix on Fedora Core.
[chrish@dhcppc1 ~] tar -xzf postfix-2.1.5.tar.gz [chrish@dhcppc1 ~] cd postfix-2.1.5 [chrish@dhcppc1 postfix-2.1.5] make ... [chrish@dhcppc1 postfix-2.1.5] su - Password: [root@dhcppc1 postfix-2.1.5] groupadd -r postfix [root@dhcppc1 postfix-2.1.5] groupadd -r postdrop [root@dhcppc1 postfix-2.1.5] useradd -g postfix -G mail -M -n -r -s /bin/false postfix [root@dhcppc1 postfix-2.1.5] make install ... [root@dhcppc1 postfix-2.1.5] echo postfix: root >> /etc/aliases [root@dhcppc1 postfix-2.1.5] newaliases [root@dhcppc1 postfix-2.1.5] cd /etc/rc.d/init.d [root@dhcppc1 init.d] ln -s /usr/sbin/postfix postfix [root@dhcppc1 init.d] cd /etc/rc.d/rc5.d [root@dhcppc1 rc5.d] ln -s /etc/rc.d/init.d/postfix S63postfix [root@dhcppc1 rc5.d] service sendmail stop Shutting down sendmail: [OK] [root@dhcppc1 rc5.d] chkconfig --del sendmail [root@dhcppc1 rc5.d] postfix start postfix/postfix-script: starting the Postfix mail system
|
7. | su -The rest of the configuration commands need to be done as root, so we'll use the su command to become root. |
8. | groupadd -r postfixCreate a new system group named postfix for our Postfix installation. |
9. | groupadd -r postdropCreate a new system group named postdrop. |
10. | useradd -g postfix -G mail -M -n -r -s /bin/false postfixUse the useradd command to create a new user named postfix. The -g option puts it in the postfix group, and the-G option puts it in the mail groups, too. The -n option means this user has no home directory, and the -s option specifies /bin/false as a shell. (That stops people from being able to log in as this user.) |
11. | make installInstall our fresh new Postfix.You will be prompted for several Postfix configuration options; press Enter for each one to go with the default. |
12. | echo postfix: root >> /etc/aliasesAdd an alias for the postfix address to the "aliases" file. |
13. | newaliasesRebuild the alias database. |
14. | cd /etc/rc.d/init.dChange to the system-startup-script directory. |
15. | ln -s /usr/sbin/postfix postfixCreate a symbolic link to the postfix control program. |
16. | cd /etc/rc.d/rc5.dChange to the run level 5 startup-script directory. |
17. | ln -s /etc/rc.d/init.d/postfix S63postfixCreate a symbolic link to start Postfix during the boot process. |
18. | service sendmail stopStop the Sendmail service. |
19. | chkconfig --del sendmailRemove Sendmail from the list of services to start at boot time. |
20. | postfix startStart the Postfix daemon. |
1. | Log in as root or use su to become root. |
2. | cd /usr/ports/mail/postfixChange to the Postfix directory in the ports collection. |
3. | make install cleanWe're going to build Postfix, install it, and then clean up.The ports build process displays the "Postfix configuration options" dialog (Figure 8.1).Figure 8.1. The "Postfix configuration options" dialog appears during installion of Postfix on FreeBSD.
 |
4. | None of the options are required for a basic installation; if you're setting up a more complex authentication scheme, refer to the Postfix documentation.Press Tab to move your cursor to the OK button in the "Postfix configuration options" dialog, and then press Enter to continue with the build process. |
5. | During installation, Postfix will create two new groups (postfix and maildrop) and a new user (postfix). You will also be prompted to add the postfix user to the mail group.Press Y, then press Enter to add the postfix user to the mail group. |
6. | When prompted to activate Postfix in /etc/mail/mailer.conf, press Y, then press Enter to continue. This replaces the existing Sendmail with our new Postfix. |
7. | Using your favorite text editor, edit /etc/rc.conf and add the following line: sendmail_enable="NO"
This prevents Sendmail from starting during the boot process. |
8. | cd /usr/local/etc/rc.dChange to the local rc.d directory. |
9. | ln -s /usr/local/sbin/postfix postfix.shCreate a symbolic link from the postfix command to postfix.sh in the local rc.d directory. This lets Postfix start during the boot process. |
10. | Use your favorite text editor to edit (or create) the /etc/periodic.conf file so that it includes the following lines: daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable
="NO" daily_status_include_submit_mailq
="NO" daily_submit_queuerun="NO"
These are all Sendmail-related daily cleanup tasks that aren't necessary with Postfix. |
11. | /etc/rc.d/sendmail stopStop the running Sendmail daemon. |
12. | /usr/local/etc/rc.d/postfix.sh startStart the new Postfix daemon. |