[dspam-users] Problem with training when Dspam used as a Postfix content_filter

From: Adorjáni Gábor <adi@adi.priv.hu>
Date: Mon Oct 24 2005 - 10:19:55 EDT

Hello List,

I'm currently deploying our new mailserver (we're a small hosting shop
in Hungary) and everything works fine, except for Dspam's training.

We use Debian Sarge's stock Postfix 2.1.5, ClamAV 0.87.0 from Debian
Volatile and a hand-compiled Cyrus IMAPD 2.2.12. MySQL 4.1.11 from Sarge
is used as authentication backend (through SASL auxprop plugin).

I also compiled Dspam 3.6.0 with the MySQL storage driver, here are the
configure options:

./configure \
         --enable-static=no \
         --sysconfdir=/etc/dspam \
         --libdir=/usr/local/lib \
         --with-storage-driver=mysql_drv \
         --with-mysql-includes=/usr/include/mysql \
         --with-dspam-home=/var/local/dspam \
         --with-dspam-home-owner=dspam \
         --with-dspam-home-group=dspam \
         --with-logdir=/var/log/dspam \
         --enable-domain-scale \
         --enable-daemon \
         --enable-preferences-extension \
         --enable-clamav \
         --enable-long-usernames \
         --enable-virtual-users \
         --with-dspam-mode=2510 \
         --with-dspam-group=dspam \
         --enable-mysql4-initialization \
         --enable-debug \
         --enable-verbose-debug \

Dspam is used in daemon mode, started and supervised by DJB's
daemontools. Postfix uses Dspam as an external content filter via LMTP
as described in doc/postfix.txt. Spam, and virus scanning with ClamAV
both works, but of course I got all the spam labelled as innocent. :)
Dspam only tags messages, we do not (yet) use quarantine. Dspam database
in MySQL is initialized from the mysql_objects-4.1.sql and
virtual_users.sql files.

The problem is, that I cannot train Dspam. I switched on
MySQLUIDInSignature in dspam.conf and created 2 aliases as described in
the README, at 5. ALIASES, The Simple Way. After some fighting with
Postfix' filter configuration these aliases got the forwarded messages
without further filtering.

I set up the aliases exactly like in the docs:

spam:"|/usr/local/bin/dspam --user root --class=spam --source=error"
notspam:"|/usr/local/bin/dspam --user root --class=innocent --source=error"

(The second entry is one line, of course.)

However, when I try to forward a spam to the spam trainer address, I got
this message in syslog:

Oct 24 15:13:29 xxxx dspam[19361]: Signature retrieval for
'25,435cddcc193481557774444' failed
Oct 24 15:13:29 xxxx dspam[19361]: Unable to find a valid signature.
Aborting.
Oct 24 15:13:29 xxxx dspam[19361]: process_message returned error -5.
dropping message.

But the signature is there in MySQL! I switched on verbose debugging
messages and inspected /var/log/dspam/dspam.debug. As I can see, the
automatic user switching which is mentioned in the README, didn't occur,
dspam still searches for the root user:

19361: [10/24/2005 15:13:29] _ds_get_signature: unable to
_mysql_drv_getpwnam(root)
19361: [10/24/2005 15:13:29] _mysql_drv_get_spamtotals: unable to
_mysql_drv_getpwnam(root)
19361: [10/24/2005 15:13:29] DSPAM Instance Shutdown. Exit Code: 0

Does someone have any ideas what have I done wrong?

If further configuration or log details are needed, I could send more of
course. :)

Regards,

Gabor
Received on Mon Oct 24 10:21:30 2005

This archive was generated by hypermail 2.1.8 : Tue Oct 25 2005 - 00:00:01 EDT