Before we start there are some preliminaries to take care of. DSPAM needs a user account to run, but instead of creating a full user account using the preference pane we will create a simple user via the Terminal:

sudo dscl . -create /Users/_dspam
sudo dscl . -create /Users/_dspam UserShell /usr/bin/false
sudo dscl . -create /Users/_dspam UniqueID 101
sudo dscl . -create /Users/_dspam PrimaryGroupID 101
sudo dscl . -create /Users/_dspam NFSHomeDirectory /usr/local/var/dspam
sudo dscl . -passwd /Users/_dspam ”

Get the source code from the DSPAM site and extract the archive and you can start compiling:

./configure --enable-daemon \
  --with-storage-driver=mysql_drv \
  --with-mysql-includes=/usr/local/mysql/include \
  --with-mysql-libraries=/usr/local/mysql/lib/mysql \
  --enable-preferences-extension \
  --with-dspam-home-owner=_dspam \
  --with-dspam-home-group=_postfix \
  --with-dspam-home=/usr/local/var/dspam \
  --enable-long-usernames \
  --with-dspam-group=postfix \
  --enable-mysql4-initialization \
  --enable-domain-scale \
  --enable-virtual-users \
  --enable-debug \
  --enable-verbose-debug

This configure, if everything went allright, can be followed by:

make
 
sudo make install

Next step: Creating the database for DSPAM on Leopard