6. Installing PigeonDeliver with Postfix

Some Linux distributions, usually Debian based, compile postfix package with a smart patch from La Mont Jones that separates postfix from its own libraries.

If this patch has been used on your system, you can use a simplified procedure to install PigeonDeliver with Postfix. Otherwise, you will need to recompile postfix and compile PigeonDeliver to use the Postfix libraries you just recompiled.

Ok, so, if you find the files libpostfix-master.so, libpostfix-global.so and libpostfix-users.so in /usr/lib or in /lib, you can follow the procedure indicated to install PigeonDeliver on "Debian systems" %%TODO%%. Otherwise, or if you are unusure, follow the instructions provided to compile PigeonDeliver on non-Debian systems.

6.1. Non Debian systems

Well, now that the OpenLDAP database is working, we can move on and configure PigeonDeliver with Postfix. Note that at time of writing there is no way to compile PigeonDeliver with postfix without having Postfix sources at hand. First of all, download the latest sources of Postfix from http://www.postfix.org/, and unpack them, with:


$ cd /usr/src
$ zcat postfix-x.y.z.tar.gz |tar xvf -

Now, follow the installation instructions provided with Postfix and PigeonDeliver to prepare the postfix compilation. Something like:


$ cd postfix-x.y.z
$ make -f Makefile.init makefiles CCARGS="-fpic -DPIC"
$ make update DIRS='src/util src/global src/master src/postconf'
worked for me. Don't forget to add all the other needed options, as indicated by the various README files. As an example, if you want PCRE support, don't forget to compile the Postfix sources with something like:

$ cd postfix-x.y.z
$ make makefiles \
  CCARGS="-fpic -DPIC -DHAS_PCRE -I/usr/local/include"
  AUXLIBS="-L/usr/local/lib -lpcre"
$ make update DIRS='src/util src/global src/master src/postconf'

Now that postfix is almost completely compiled, you can go on configuring, compiling and installing PigeonDeliver. I run something like:


$ cd /usr/src/pigeondeliver-x.y.z
$ mkdir build
$ cd build
$ sources="/usr/src/postfix-x.y.z" \
  sh ../examples/configure/configure.linux.postfix.src
$ make
$ su
# make install

Note that if you want to change some configuration parameters you can edit and modify the file pigeondeliver-x.y.z/examples/configure/configure.linux.postfix.src. To complete the Postfix installation, with support for PigeonDeliver, run:


$ cd /usr/src/postfix-x.y.z
$ make 
$ su
# make install
as usual. You should now have a working installation of Postfix and PigeonDeliver.

6.2. Debian based systems

On debian systems, you can follow a simpler procedure, and you don't need to compile and install Postfix by yourself.

In order to configure and install PigeonDeliver with postfix, you just need to:


# apt-get install postfix postfix-dev
$ cd /usr/src/pigeondeliver-x.y.z
$ mkdir build
$ cd build
$ sh ../examples/configure/configure.linux.postfix.lib
$ make
$ su
# make install
without worries. The above may have been used on other distributions as well (like ubuntu, or even non debian based ones). To know if your distribution has separated postfix from its own libraries and if you can use this simplified procedure, you just need to search for libpostfix-utils.so, libpostfix-global.so and libpostfix-master.so. If you have those files on your system, you can probably use this procedure.