[Dovecot] Dovecot-antispam does not work

Marcin Rzepecki m.rzepecki at iem.pw.edu.pl
Tue Feb 3 18:28:10 EET 2009


Tue, Feb 03, 2009 at 03:29:40PM +0100, Jehan Pag?s wrote:
> Hi,
> 
> I have installed dovecot-antispam and configured it this way (as in the doc)
> [...] 
> But it does not work and really I cannot figure it out for two days, because
> I can find no log wherever, where it writes it does (or try to do)
> something, nor in the dovecot logs, nor in the dspam logs. But I know
> something is happening because when I try to move a spam from my inbox to
> the Junk folder, it fails with an error telling it could not move the email.
> At the opposite, when I deactivate the antispam plugin, I can move normally
> the emails.
> So what could I do to fix my issue or at least diagnose it (where would I
> find logs of what is happening?)?

Hi, 
did you get 'Failed to call dspam' [1]  or 'Antispam signature not
found' [2] error? The second should not appear for dovecot >=1.1.7 (thanks Timo!
;)
I was getting [1] - don't know why this error shows, cause my log
said, that dspam was already called with correct parameters

I had to patch dovecot-antispam sources to make it work.
Apply the following patch and compile dovecot-antispam again:
--- dspam-exec.c.orig   2008-11-11 16:02:20.000000000 +0100
+++ dspam-exec.c        2008-11-11 16:02:30.000000000 +0100
@@ -178,13 +178,14 @@
        int ret = 0;

        while (item) {
-               if (call_dspam(item->sig, item->wanted)) {
+       /*      if (call_dspam(item->sig, item->wanted)) {
                        ret = -1;
                        mail_storage_set_error(ctx->box->storage,
                                               ME(NOTPOSSIBLE)
                                               "Failed to call dspam");
                        break;
-               }
+               } */
+               call_dspam(item->sig, item->wanted);
                item = item->next;
        }

It works for me now (dovecot-1.1.10, dovecot-antispam-1.1, FreeBSD
Current) with this entries in dovecot.conf:
antispam_dspam_binary = "/usr/local/bin/dspam"
antispam_dspam_args = --source=error
antispam_dspam_args = --user=%u

Hope it helps.

Cheers,

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



More information about the dovecot mailing list