Re: [Dovecot] Dovecot-antispam does not work
Hi all,
just to say that finally the patch of Marcin worked great. Just my configuration is different from yours to get it work:
antispam_signature = X-DSPAM-Signature
antispam_trash = trash;Trash;Deleted Items
antispam_spam = SPAM;Junk
antispam_dspam_binary = /usr/bin/dspam
antispam_dspam_args = --client;--source=error;--user;%u
antispam_mail_tmpdir = /tmp
The difference here is in the syntax. You write "--user=somemail" though in the manual, it is written "--user somemail". But also you were proposing 2 lines "antispam_dspam_args" though in all my tests, when I was doing such a thing, the second line seemed to override the first (in the launch logs, only the second line was displayed, so I guess...). Are you sure that it works exactly the way you intend to, Marcin? And that the "--source=error" (your first line) is indeed added as a parameter to the call of dspam?
For the patch to the dovecot-antispam, probably it should not be integrated "as is", but I guess that the return code of call_dspam function must probably be checked and fixed if the call can succeed but still give a failure return code. I set Johannes as a main recipient, maybe you will see this email. Bye and thanks all.
Jehan
On Wed, Feb 4, 2009 at 12:45 PM, Jehan Pagès jehan.marmottard@gmail.comwrote:
Hi,
On Wed, Feb 4, 2009 at 12:40 PM, Marcin Rzepecki
wrote:
Wed, Feb 04, 2009 at 12:12:44PM +0100, Jehan Pag?s wrote:
I saw this piece of code and did the same as you in my change of course. Unfortunately, it didn't work (no logged "marked as SPAM", nor change in my stats. I have dovecot 1.1.7-r1 though, so it is probably the reason.
Logging '...markes as SPAM..' lines to syslog is my idea, I can send some dspam patches, to make it work. It's usefull for me.
Ok. Anyway the stats don't change...
Are you using mbox or maildir? If you are using mbox, try to upgrade to Dovecot >=1.1.8 - it contains several mbox bug fixes (e.g 'Next message unexpectedly lost') which are needed to make antispam plugin work.
No maildir... I am doing some stuffs about another way to interact dspam/dovecot/postfix and will go back to this issue soon.
Jehan
Fri, Feb 06, 2009 at 05:50:57PM +0100, Jehan Pag?s wrote:
Hi all,
Hello again, sorry for delay, I was on short holiday ;)
just to say that finally the patch of Marcin worked great. Just my configuration is different from yours to get it work:
antispam_signature = X-DSPAM-Signature antispam_trash = trash;Trash;Deleted Items antispam_spam = SPAM;Junk antispam_dspam_binary = /usr/bin/dspam antispam_dspam_args = --client;--source=error;--user;%u antispam_mail_tmpdir = /tmp
Probably You won't need last line, it's used with mail backend only:
[...] Are you sure that it works exactly the way you intend to, Marcin? And that the "--source=error" (your first line) is indeed added as a parameter to the call of dspam?
Oh my. You've right. I've pasted some config from my test machine, sorry for this. :) And it was work accidentally, I think :) I'm using: antispam_signature = X-DSPAM-Signature antispam_spam = SPAM antispam_dspam_binary = /usr/local/bin/dspam antispam_dspam_args = --user "%u" So I'm not defining '--source error' option, it's hardcoded. I have messages with retrain status, so it's ok for me. And if you apply patch from git sources: http://git.sipsolutions.net/?p=dovecot-antispam.git;a=commit;h=3da16a1c2e0ed... you can add another feature - you can decide what to do if no correct Dspam signature is found (move silently or produce an error) antispam_signature_missing = [move|error]
For the patch to the dovecot-antispam, probably it should not be integrated "as is", but I guess that the return code of call_dspam function must probably be checked and fixed if the call can succeed but still give a failure return code. I set Johannes as a main recipient, maybe you will see this email.
Correct. I realize that is only a workaround, but I don't have too much time for playing with code.
Cheers,
-- Marcin Rzepecki m.rzepecki(at)iem.pw.edu.pl
participants (2)
-
Jehan Pagès
-
Marcin Rzepecki