Dspam 3.8.0 with postfix

- Add user and group
groupadd dspam
useradd -g dspam -s/bin/false -c"DSPAM" dspam

( setenv CFLAGS '-O6 -march=i686' ;./configure \
 --with-dspam-home=/var/dspam \
 --with-dspam-home-mode=770 \
 --with-dspam-home-owner=dspam \
 --with-dspam-home-group=postdrop \
 --with-dspam-mode=2510 \
 --with-dspam-owner=dspam \
 --with-dspam-group=postfix \
 --with-delivery-agent=/usr/sbin/sendmail \
 --with-storage-driver=mysql_drv \
 --with-mysql-includes=/usr/local/include/mysql \
 --with-mysql-libraries=/usr/local/lib/mysql \
 --enable-preferences-extension \
 --enable-virtual-users \
 --enable-daemon \
 --enable-large-scale )


make install

- DSPAM.CONF /usr/local/etc/dspam.conf
Home /var/dspam
StorageDriver /usr/local/lib/libmysql_drv.so
TrustedDeliveryAgent "/usr/sbin/sendmail"
DeliveryPort        10026
DeliveryIdent       localhost
DeliveryProto       SMTP
OnFail error
Trust root
Trust httpd
Trust dspam
Trust postfix
Trust mail
Trust mailnull
Trust smmsp
Trust daemon
TrainingMode teft
TestConditionalTraining on
Feature chained
Feature whitelist
Algorithm graham burton
PValue graham
Preference "spamAction=quarantine"
Preference "signatureLocation=headers"  # 'message' or 'headers'
Preference "showFactors=on"
AllowOverride localStore
AllowOverride trainingMode
AllowOverride spamAction spamSubject
AllowOverride statisticalSedation
AllowOverride enableBNR
AllowOverride enableWhitelist
AllowOverride signatureLocation
AllowOverride showFactors
AllowOverride optIn optOut
AllowOverride whitelistThreshold
MySQLServer     /tmp/mysql.sock
MySQLPort       3306
MySQLUser               dspam
MySQLPass               ******
MySQLDb                 dspam
MySQLCompress           true
MySQLVirtualTable          dspam_virtual_uids
MySQLVirtualUIDField       uid
MySQLVirtualUsernameField  username
MySQLUIDInSignature    on

-Modify master.cf
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#smtp      inet  n       -       n       -       40       smtpd  -o content_filter=filter:dummy
#smtp      inet  n       -       n       -       30       smtpd   -o content_filter=clamav:clamav
smtp      inet  n       -       n       -       30       smtpd  -o content_filter=lmtp:unix:/tmp/dspam.sock
localhost:10026 inet  n -       n       -       50        smtpd
#  -o cleanup_service_name=pre-cleanup
  -o content_filter=clamav:clamav
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
  -o smtpd_helo_restrictions=
  -o smtpd_client_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=
  -o smtpd_authorized_xforward_hosts=
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: