Adding
Users and Groups
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 &&
useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
-s /bin/false -u 32 postfix &&
chown -v postfix:postfix /var/mail
Configuring the Build
The README files are formatted to be read with a pager like
Less or More. If you want to use a text editor, make
them legible with the following sed:
sed -i 's/.\x08//g' README_FILES/*
Make an adjustment to allow Postfix to compile on Glibc-2.34 and later:
sed -i '/<linux/i #define HAS_CLOSEFROM' src/util/sys_defs.h
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.
For more details read the readme files.
To use Cyrus-SASL with
Postfix, use the following
arguments:
CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
AUXLIBS='-lsasl2'
To use OpenLDAP with
Postfix, use the following
arguments:
CCARGS='-DHAS_LDAP'
AUXLIBS='-lldap -llber'
To use Sqlite with
Postfix, use the following
arguments:
CCARGS='-DHAS_SQLITE'
AUXLIBS='-lsqlite3 -lpthread'
To use MySQL with Postfix, use the following arguments:
CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
AUXLIBS='-lmysqlclient -lz -lm'
To use PostgreSQL with
Postfix, use the following
arguments:
CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
AUXLIBS='-lpq -lz -lm'
To use CDB or TinyCDB with Postfix, use the following arguments:
CCARGS='-DHAS_CDB'
AUXLIBS='</path/to/CDB>
/libcdb.a'
To use OpenSSL with
Postfix, use the following
arguments:
CCARGS='-DUSE_TLS -I/usr/include/openssl/'
AUXLIBS='-lssl -lcrypto'
Installing Postfix
If you have Cyrus SASL and
OpenSSL installed, install
Postfix by running the following
commands:
make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
AUXLIBS="-lssl -lcrypto -lsasl2" \
makefiles &&
make
This package does not come with a useful test suite.
Now, as the root
user:
sh postfix-install -non-interactive \
daemon_directory=/usr/lib/postfix \
manpage_directory=/usr/share/man \
html_directory=/usr/share/doc/postfix-3.6.2/html \
readme_directory=/usr/share/doc/postfix-3.6.2/readme