I'm trying to setup dspam a little differently than richard5, but not
so different that this shouldn't work.
I don't need/want virtual users. I DO want the dspam signature in
the message (so I can do forwarding for training).
In compiling dspam, I used the following parameters:
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-dspam_home=/var/dspam \
--with-storage-driver=mysql_drv \
--with-mysql-includes=/usr/local/mysql/include \
--with-mysql-libraries=/usr/local/mysql/lib \
--with-dspam-home-owner=dspam \
--with-dspam-home-group=postdrop \
--with-dspam-group=postdrop \
--with-dspam-mode=6755 \
--enable-preferences-extension \
--enable-signature-headers \
--enable-long-usernames \
--enable-daemon \
--enable-domain-scale
From the standard /etc/dspam.conf I've changed:
DeliveryHost 127.0.0.1
DeliveryPort 10026
DeliveryIdent localhost
DeliveryProto SMTP
Trust dspam
Trust postfix
Trust www
Preference "spamAction=quarantine"
Preference "signatureLocation=message" # 'message' or 'headers'
Preference "showFactors=on"
Preference "spamAction=tag"
Preference "spamSubject=[SPAM]"
MySQLServer /tmp/mysql.sock
MySQLPort
MySQLUser dspam
MySQLPass booo
MySQLDb dspam
MySQLCompress true
MySQLUIDInSignature on
#since I'm working after spamassassin elsewhere
IgnoreHeader X-Spam-Status
IgnoreHeader X-Spam-Scanned
IgnoreHeader X-Virus-Scanner-Result
#not sure if I need these off, since I do my own training transports
ParseToHeaders on
ChangeModeOnParse on
ChangeUserOnParse on
ServerMode standard
ServerParameters "--deliver=innocent, spam"
ServerIdent "localhost.local"
/etc/postfix/dspam_regexp (and built the db)
/^spam-(.*)/ dspam-add:${1}
/^ham-(.*)/ dspam-del:${1}
/^(.*)/ dspam:${1}
/etc/postfix/main.cf:
transport_maps = regexp:/etc/postfix/dspam_regexp
dspam_destination_recipient_limit =1
dspam-add_destination_recipient_limit = 1
dspam-fp_destination_recipient_limit = 1
/etc/postfix.master.cf:
dspam-add unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/bin/dspam --user [EMAIL PROTECTED]
{nexthop} --class=spam --source=error
dspam-del unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/bin/dspam --user [EMAIL PROTECTED]
{nexthop} --class=innocent --source=error
dspam unix - n n - 10 pipe
flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent --
user ${recipient} -i -f $sender -- $recipient
localhost:10026 inet n - n - - smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
The result gives me what looks like some recursive loop ....
/var/log/system.log:
.....
Jan 26 09:38:48 gamura dspam[12534]: bailing on error -2
Jan 26 09:38:48 gamura dspam[12534]: received invalid result (!
DSR_ISSPAM || DSR_INNOCENT) : -2
Jan 26 09:38:48 gamura dspam[12534]: process_message returned error
-2. delivering.
Jan 26 09:38:48 gamura dspam[12534]: Got error 554 in response to
message data: 554 Error: too many hops^M\n