O'Reilly logo

Postfix: The Definitive Guide by Kyle D. Dent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrapping Things Up

You can mix and match any of the options or add on libraries described in this appendix to build Postfix for your environment. If your command line for building the Postfix Makefile is getting a little complicated, you should probably create a simple shell script that invokes the options and additional libraries you need. Creating a build script has the added advantage of documenting the options you used when you last built Postfix. Feel free to include plenty of comments to yourself to explain the reasons you are including an option or not, and how you came to that decision. The following is an example of a shell script you might use, although you will certainly need to customize it for your own environment. This example includes all of the add-on libraries we've discussed. You should exclude the ones you don't need:

#
# Simple script to create a Makefile to build Postfix.
#

#
# Remember to start by cleaning up or uncomment this line
# to have this script do it every time.
#
#make tidy

#
# Specify all of our options and supporting libraries
#
make makefiles \
 CCARGS='-DUSE_SASL_AUTH -DHAS_SSL -DHAS_MYSQL -DHAS_LDAP \
  -I/usr/local/include/sasl -I/usr/local/ssl/include \
  -I/usr/local/include/mysql -I/usr/local/include' \
 AUXLIBS='-L/usr/local/lib -L/usr/local/ssl/lib \
  -L/usr/local/lib/mysql -L/usr/local/lib \
  -lsasl2 -lcrypto -lssl -lmysqlclient -lz -lm -lldap -llber \
  -rpath /usr/local/lib/mysql -rpath /usr/local/lib \
  -rpath /usr/local/ssl/lib'

To build Postfix, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required