This is a Mac OS X specific setup so that Server Admin doesn’t trample your configs if you ever make any changes (the cyrus part anyway, even though we’re not really using a cyrus delivery from postfix…)

Dspam only setup with postfix:

  1. Grab dspam and expand the tarball, create your db, etc

  2. ./configure –with-storage-driver=mysql_drv –with-mysql-includes=/usr/include/mysql –with-mysql-libraries=/usr/lib/mysql –enable-alternative-bayesian –enable-shared=NO –with-delivery-agent=/usr/bin/cyrus/bin/deliver –enable-signature-headers (–enable-debug is optional as well) (–enable-shared=NO is for compatibility in Mac OS X – won’t compile otherwise…)

  3. make && make install

  4. Postfix setup:

add the following in master.cf:

#next cyrus is for dspam delivery compiled with LDA of ‘/usr/bin/cyrus/bin/deliver’

cyrus unix – n n – – pipe

flags=R user=cyrus argv=/usr/local/bin/dspam –user ${user} -e -a ${user} -r ${sender} -m user/${user}

add the following in main.cf:

mailbox_transport = cyrus

Dspam setup with postfix that passes off to procmail after dspam finishes up (if you’re using spamassassin via procmail, etc…):

  1. Grab dspam and expand the tarball, create your db, etc

  2. ./configure –with-storage-driver=mysql_drv –with-mysql-includes=/usr/include/mysql –with-mysql-libraries=/usr/lib/mysql –enable-alternative-bayesian –enable-shared=NO –with-delivery-agent=/usr/bin/procmail –enable-signature-headers (–enable-debug is optional as well) (–enable-shared=NO is for compatibility in Mac OS X – won’t compile otherwise…)

  3. make && make install

  4. Postfix setup:

add the following in master.cf:

#next cyrus is for dspam delivery compiled with LDA of ‘/usr/bin/procmail’

cyrus unix – n n – – pipe

flags=R user=cyrus argv=/usr/local/bin/dspam –user ${user} -t -m USER=${user} EXTENSION=${extension} /etc/procmailrc

add the following in main.cf:

mailbox_transport = cyrus