%general-entities; ]> $LastChangedBy$ $Date$ Postfix-&postfix-version; Introduction to Postfix The Postfix package contains a Mail Transport Agent (MTA). This is useful for sending email to other users of your host machine. It can also be configured to be a central mail server for your domain, a mail relay agent or simply a mail delivery agent to your local Internet Service Provider (ISP). Package information Download (HTTP): Download (FTP): Download size: &postfix-size; Estimated Disk space required: &postfix-buildsize; Estimated build time: &postfix-time; <application>Postfix</application> dependencies Required Optional , , , and Installation of <application>Postfix</application> Before you compile the program, you need to create users and groups that will be expected to be in place when the install script executes. Add the users and groups with the following commands: groupadd postfix && groupadd postdrop && groupadd -g 65534 nogroup && useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix && useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody && chown postfix:postfix /var/mail Install Postfix by running the following commands: make && sh postfix-install daemon_directory=/usr/sbin \ manpage_directory=/usr/share/man \ sample_directory=/usr/share/doc/postfix \ -non-interactive The final installation step is to install the program's documentation with the following commands: install -d /usr/share/doc/postfix && cp -rf html/* /usr/share/doc/postfix Command explanations sh postfix-install ... -non-interactive : This keeps the install script from asking any questions, thereby accepting default destination directories in all but the three cases explicitly mention. : These make variables add MySQL support to Postfix. : These make variables add PostgreSQL support to Postfix. : These make variables add OpenLDAP support to Postfix. : These make variables add Cyrus SASL support to Postfix. Configuring <application>Postfix</application> Config files /etc/aliases, /etc/postfix/main.cf and /etc/postfix/master.cf Configuration Information cat >> /etc/aliases << "EOF" # Begin /etc/aliases MAILER-DAEMON: postmaster postmaster: root root: LOGIN # End /etc/aliases EOF To protect an existing /etc/aliases file, the above command appends these aliases to it if it exists. This file should be checked and duplicate aliases removed, if present. The /etc/aliases file that was just created or appended, the main.cf and the master.cf must be personalized for your system. The aliases file needs your non-root login identity so mail addressed to root can be forwarded to you at the user level. The main.cf file needs your fully qualified hostname. All of these edits can be done with sed commands entered into the console with appropriate substitutions of your non-root login name for [user] and your fully qualified hostname for [localhost.localdomain]. You will find the main.cf file is self documenting, so load it into your editor to make the changes you need for your situation. sed -i "s/LOGIN/[user]/" /etc/aliases && sed -i "s/#myhostname = host.domain.tld/myhostname = \ [localhost.localdomain]/" /etc/postfix/main.cf && /usr/bin/newaliases && /usr/sbin/postfix start Postfix init.d script To automate the running of Postfix at startup, install the /etc/rc.d/init.d/postfix init script included in the package. make install-postfix Contents The Postfix package contains bounce, cleanup, error, flush, lmtp, local, mailq, master, newaliases, nqmgr, pickup, pipe, postalias, postcat, postconf, postdrop, postfix, postkick, postlock, postlog, postmap, postqueue, postsuper, qmgr, qmqpd, sendmail, showq, smtp, smtpd, spawn, trivial-rewrite, and virtual. Description postfix postfix is the program that starts and stops the mail delivery system. master master is the resident process that runs bounce, cleanup, error, flush, lmtp, local, nqmgr, pickup, pipe, qmgr, qmqpd, showq, smtp, smtpd, spawn, trivial-rewrite and virtual on demand. These programs are not designed to work as user commands. postqueue postqueue implements the Postfix user interface for queue management. It implements all the operations that are traditionally available via the sendmail command. sendmail sendmail implements the Postfix to Sendmail compatibility interface. mailq and newaliases are symlinks to sendmail. showq showq will emulate the mailq command when the Postfix mail system is not running. postsuper postsuper does maintenance jobs on the Postfix queue. postalias postalias creates, queries or updates Postfix alias databases. postcat postcat prints the contents of a Postfix queue file in human-readable form. postconf postconf prints or changes the value of configuration parameters. postdrop postdrop creates a file in the maildrop directory and copies its standard input to the file. postkick postkick makes the mail system private IPC accessible for use in shell scripts. postlock postlock locks a file for exclusive access and executes a command on that file. postlog postlog implements a logging interface for use in shell scripts. postmap postmap creates, queries or updates Postfix lookup tables.