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).
Download (HTTP): http://www.mirrorspace.org/postfix/official/postfix-2.2.5.tar.gz
Download (FTP): ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.2.5.tar.gz
Download MD5 sum: f164b701c3e97b950d4cc64aff4de3c0
Download size: 2.3 MB
Estimated disk space required: 81 MB
Estimated build time: 0.3 SBU
PCRE-6.1, MySQL-4.1.12, PostgreSQL-8.0.3, OpenLDAP-2.2.24, OpenSSL-0.9.7g, Cyrus SASL-2.1.21 and cdb or TinyCDB
The Postfix source tree does not contain a configure script, rather the makefile in the top-level directory contains a makefiles target that regenerates all the other makefiles in the build tree. If you wish to use additional software such as a database back-end for virtual users, or TLS/SSL authentication, you will need to regenerate the makefiles using one or more of the appropriate CCARGS and AUXLIBS settings listed below.
Here is an example that combines the TLS and Cyrus-SASL arguments:
make makefiles \ CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DDEF_DAEMON_DIR=\"/usr/lib/postfix\" \ -DDEF_MANPAGE_DIR=\"/usr/share/man\" -I/usr/include/openssl \ -I/usr/include/sasl' \ AUXLIBS='-L/usr/lib -lssl -lcrypto -lsasl2'
To use TLS authentication with postfix you will need to pass the following values to the make makefiles command:
CCARGS='-DUSE_TLS -I/usr/include/openssl' AUXLIBS='-L/usr/lib -lssl -lcrypto'
To use TLS you will also need Cyrus SASL-2.1.21.
To use Cyrus-SASL with Postfix, use the following arguments:
CCARGS='-DUSE_SASL_AUTH -I/usr/include/sasl' AUXLIBS='-L/usr/lib -lsasl2'
To use OpenLDAP with Postfix, use the following arguments:
CCARGS='-I/usr/include -DHAS_LDAP' AUXLIBS='-L/usr/lib -lldap -llber'
To use MySQL with Postfix, use the following arguments:
CCARGS='-DHAS_MYSQL -I/usr/include/mysql' AUXLIBS='-L/usr/lib -lmysqlclient -lz -lm'
To use PostgreSQL with Postfix, use the following arguments:
CCARGS='-DHAS_PGSQL -I/usr/include/postgresql' AUXLIBS='-L/usr/lib -lpq -lz -lm'
Before you compile the program, you need to create users and groups that will be expected to be in place during the installation. Add the users and groups with the following commands issued by the root user:
groupadd -g 32 postfix && groupadd -g 33 postdrop && groupadd -g 99 nogroup && useradd -c "Postfix Daemon User" -d /dev/null -g postfix \ -s /bin/false -u 32 postfix && useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \ -s /bin/false -u 99 nobody && chown -v postfix:postfix /var/mail
Install Postfix by running the following commands:
make makefiles CCARGS='-DDEF_DAEMON_DIR=\"/usr/lib/postfix\" \ -DDEF_MANPAGE_DIR=\"/usr/share/man\" [additional args]' \ [AUXLIBS='additonal args'] && make
This package does not come with a test suite.
Now, as the root user:
sh postfix-install -non-interactive
The final installation step is to install the program's documentation with the following commands (again, as the root user):
install -v -d /usr/share/doc/postfix && cp -v -rf html/* /usr/share/doc/postfix
make makefiles: This command rebuilds the makefiles throughout the source tree to use the options contained in the CCARGS and AUXLIBS variables.
sh postfix-install -non-interactive : This keeps the install script from asking any questions, thereby accepting default destination directories in all but the two cases mentioned in the 'make makefiles' command.
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
To automate the running of Postfix at startup, install the /etc/rc.d/init.d/postfix init script included in the blfs-bootscripts-6.1 package.
make install-postfix
Last updated on 2005-08-01 13:29:19 -0600