[Dovecot] Dovecot-antispam does not work

Marcin Rzepecki m.rzepecki at iem.pw.edu.pl
Wed Feb 4 01:45:08 EET 2009


Tue, Feb 03, 2009 at 10:36:12PM +0100, Jehan Pag?s wrote:
> 
> and that the dspam training is indeed called? Because if I read well this
> piece of code, it looks like it was checking if the dspam training was
> successful. We commented out this check, so now maybe it fails and we copy
> the messages anyway to Junk/ even though no training really occurred.
> And when I check the logs or the dspam_stats, I don't see any change, even
> though I guess this retraining should be seen as a change in the stats, no?

Yes, it checks if dspam was called correctly, but it didn't worked
with dovecot >=1.1
I've comment out checking call_dspam exit status, but:
---
+               call_dspam(item->sig, item->wanted);
                item = item->next; 
---
it calls dspam anyway and it works for me fine. 
I've patched dspam a little bit to make it log better, so when I move 
message to SPAM folder I'm getting:

dspam_stats mr:
mr                TP:     0 TN:   340 FP:    21 FN:    33 SC:     0 NC:	4

dspam.log:
Feb  3 21:20:31 freebsd dspam[549]: Message from <None Specified> marked
as SPAM (signature=4988a7065441870592463, user=mr, status=Retrained,
time=0.016614s) 
and so on.

dspam_stats mr:
mr                TP:     0 TN:   339 FP:    21 FN:    34 SC:     0 NC: 4
So, you should see changes.

> I have the header on every emails.
> By the way, when one has the item "X-DSPAM-Result: Innocent" in the header,
> it means the email is not a spam, does'nt it (right now I am focusing on
> having this plugin working for training purpose, but currently not much is
> working perfectly as expected in my email spam system)?

Yes. It was classified as not spam. You can get X-DSPAM-Result:
Whitelisted, when dspam auto-whitelists some sender
 
> Me I have:
> Feb  3 22:10:39 ks34186 dovecot: IMAP(jehan at zemarmot.net): antispam: plugin
> initialising (unknown)
> [...]
> Feb  3 22:10:39 ks34186 dovecot: IMAP(jehan at zemarmot.net): antispam: dspam
> binary set to /usr/bin/dspam

Seems to be well configured. Check if messages are going to correct
dspam user. You are using jehan at zemarmot.net as imap user, so dspam user
have to be exactly the same. (i'm using hash driver, so all is in
$DSPAM_HOME/data directory). 


-- 
Marcin Rzepecki
m.rzepecki(at)iem.pw.edu.pl 


More information about the dovecot mailing list