Get the latest source code from, check the blog for the latest checked version we used. I’m compiling Postfix with several options to help me achieve the flexibility and the security needed. We require the MySQL support for mail box maintenance, SASL for authentication and the SSL options to enable TLS support. Please note that this is the 64 bit mode installation which requires a 64 bit MySQL installation otherwise you will get compiler errors.

First you need to install the PCRE library (Perl Compatible Regular Expressions), to enable fancy filtering in Postfix. Download the source code from the site. You can compile and install it by running the following commands:

For Intel use:
CFLAGS="-arch x86_64" \
CXXFLAGS="-arch x86_64"

For PowerPC use
CFLAGS="-arch ppc64" \
CXXFLAGS="-arch ppc64"

Follow for both with:
sudo make install

Unpack the Postfix source into a directory, use the Terminal and ‘cd’ into the directory where you unpacked it. Issue the following commands as a normal user:

make -f Makefile.init makefiles \
-I/usr/include/sasl -DHAS_PCRE -I/usr/local/include \
-DHAS_SSL -I/usr/include/openssl \
-DHAS_MYSQL -I/usr/local/mysql/include/mysql' \
AUXLIBS='-L/usr/lib -lldap -lsasl2 -L/usr/lib -llber -L/usr/local/lib \
-L/usr/local/lib -lpcre -lssl -L/usr/local/mysql/lib/mysql \
-lmysqlclient -lz -lm'

To compile and install Postfix run:

sudo make install

For the questions that are asked at the end of the compilation accept the default values.

Please note that for the dependencies on directories I’m assuming you’ve got MySQL installed from my previous instructions. If not please check the location of the MySQL files mentioned in the configuration. You can find out which configuration on your system is active by running the command ‘mysql_config’.

Next step: Building the Courier Auth library in 64 bits on Leopard