[Dovecot] AntiSpam Plugin

Leander S. leander.schaefer at googlemail.com
Wed Aug 4 00:17:19 EEST 2010


  Am 03.08.10 22:53, schrieb Gregory Finch:
> On 2010-08-03 1:41 PM, Leander S. wrote:
>>   Am 28.07.10 23:43, schrieb Harlan Stenn:
>>> Figure out exactly what script is running and see if it says why it
>>> would return with a status of 9.  If that is because of a SIGKILL, it is
>>> because some process is sending that signal.  You are gonna get to
>>> figure out what debug knobs to crank to figure out why this is going on.
>>>
>>> Can you invoke any of this stuff manually from the command line to see
>>> what messages may come up?
>>>
>>> h
>> Hi,
>>
>> unfortunately I still wasn't able to figure out what's going on. I
>> tried to debug the sa-learn perl script and I wasn't able to find any
>> hint to that code. (I'm not a beginner) But I guess that this is not
>> an issue of sa-learn. Why? Because sa-learn does as I asked it to.
>> sa-learn writes everything into the SQL DB as wanted - but the mail is
>> not being copied to the destination plus the dovecot server returns
>> the old known [SERVERBUG] message to Thunderbird. I obviously also tried:
>>
>>
>> server [~]# sa-learn --username=admin at mydom.com --spam
>> /var/mail/admin/.Spam/
>> Learned tokens from 0 message(s) (2 message(s) examined)
>> server [~]#
>>
>> "Learned tokens from 0" because it has learnd from Dovecot antispam
>> already. If I reset SQL values it would learn again.
>>
>>
>> Here is my debug.log output again.
>>
>> Aug  3 22:16:29 server imap: antispam: plugin initialising (1.2-notgit)
>> Aug  3 22:16:29 server imap: antispam: "Trash" is exact match trash
>> folder
>> Aug  3 22:16:29 server imap: antispam: "Spam" is exact match spam folder
>> Aug  3 22:16:29 server imap: antispam: "Virus" is exact match unsure
>> folder
>> Aug  3 22:16:29 server imap: antispam: mail backend spam address --spam
>> Aug  3 22:16:29 server imap: antispam: mail backend not-spam address
>> --ham
>> Aug  3 22:16:29 server imap: antispam: mail backend sendmail
>> /usr/local/bin/sa-learn
>> Aug  3 22:16:29 server imap: antispam: mail backend sendmail arg
>> --username=admin at mydom.com --debug all
>> Aug  3 22:16:29 server imap: antispam: mail backend tmpdir /tmp
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_unsure(Spam): 0
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_trash(INBOX): 0
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_trash(Spam): 0
>> Aug  3 22:16:34 server imap: antispam: mail copy: from trash: 0, to
>> trash: 0
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_spam(INBOX): 0
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_spam(Spam): 1
>> Aug  3 22:16:34 server imap: antispam: mailbox_is_unsure(INBOX): 0
>> Aug  3 22:16:34 server imap: antispam: mail copy: src spam: 0, dst
>> spam: 1, src unsure: 0
>> Aug  3 22:16:34 server imap: antispam: running mailtrain backend
>> program /usr/local/bin/sa-learn
>> Aug  3 22:16:34 server imap: antispam: running mailtrain backend
>> program /usr/local/bin/sa-learn
>> Aug  3 22:16:38 server imap: antispam: run program failed with exit
>> code 9
>>
>>
>>
>>
>> Those are my Antispam options from dovecot.conf:
>>
>> [...]
>>    ### Dovecot AntiSpam ###
>>     # mail signature (used with any backend requiring a signature)
>>     #antispam_signature = X-Spam-Status
>>     #antispam_signature_missing = move
>>
>>     antispam_mail_sendmail = /usr/local/bin/sa-learn
>>     antispam_mail_sendmail_args = --username=%u --debug all
> anitspam_blah_args is a semicolon separated list, no spaces (I thought
> this odd too), therefore:
> antispam_mail_sendmail_args = --username=;%u;--debug;all
>
> (i think)
>
>>     antispam_mail_spam = --spam
>>     antispam_mail_notspam = --ham
>>     antispam_mail_tmpdir = /tmp
>>     antispam_spam = Spam
>>     antispam_unsure = Virus
>>     antispam_trash = Trash
>> [...]
>>
>> Even --debug all doesn't help a thing ;( I tried my luck enabeling
>> all this Dovecot debug knobs:
>>
>> ##
>> ## Logging
>> ##
>> mail_debug = yes
>> auth_verbose = yes
>> auth_debug = yes
>> auth_debug_passwords = yes
>> log_timestamp = "%b %d %H:%M:%S "
>> syslog_facility = mail
>>
>>
>> ... didn't help ... - dovecot's log didn't tell me anything new - no
>> error nothing after the Serverbug happend ... ;(
>>
>>
>> I really don't know where to debug anymore ;( Therefore, I would
>> _really_ - out of all my frustration - appreaciate your help (cause
>> this issue is now bothering me now for more than two weeks now already
>> - without any little peace of success)
>>
>>
>>
>> Thanks&  Regards
>>
>>
>>
> -Greg
>

Thanks for your reply. I tried that one as well - unfortunately that 
didn't really help a lot. Debug now looks a bit different than before:
(Ofcourse did I try it without the debug option at all as well - but 
with the same result.)


   ### Dovecot AntiSpam ###
    # mail signature (used with any backend requiring a signature)
    #antispam_signature = X-Spam-Status
    #antispam_signature_missing = move

    antispam_mail_sendmail = /usr/local/bin/sa-learn
    antispam_mail_sendmail_args = --username=%u;--debug;all
    antispam_mail_spam = --spam
    antispam_mail_notspam = --ham
    antispam_mail_tmpdir = /tmp
    antispam_spam = Spam
    antispam_unsure = Virus
    antispam_trash = Trash





Aug  3 23:08:38 server imap: antispam: plugin initialising (1.2-notgit)
Aug  3 23:08:38 server imap: antispam: "Trash" is exact match trash folder
Aug  3 23:08:38 server imap: antispam: "Spam" is exact match spam folder
Aug  3 23:08:38 server imap: antispam: "Virus" is exact match unsure folder
Aug  3 23:08:38 server imap: antispam: mail backend spam address --spam
Aug  3 23:08:38 server imap: antispam: mail backend not-spam address --ham

Aug  3 23:08:38 server imap: antispam: mail backend sendmail 
/usr/local/bin/sa-learn
Aug  3 23:08:38 server imap: antispam: mail backend sendmail arg 
--username=admin at mydom.com
Aug  3 23:08:38 server imap: antispam: mail backend sendmail arg --debug
Aug  3 23:08:38 server imap: antispam: mail backend sendmail arg all

Aug  3 23:08:38 server imap: antispam: mail backend tmpdir /tmp
Aug  3 23:08:38 server imap: antispam: mailbox_is_unsure(Spam): 0
Aug  3 23:08:38 server imap: antispam: mailbox_is_trash(INBOX): 0
Aug  3 23:08:38 server imap: antispam: mailbox_is_trash(Spam): 0
Aug  3 23:08:38 server imap: antispam: mail copy: from trash: 0, to trash: 0
Aug  3 23:08:38 server imap: antispam: mailbox_is_spam(INBOX): 0
Aug  3 23:08:38 server imap: antispam: mailbox_is_spam(Spam): 1
Aug  3 23:08:38 server imap: antispam: mailbox_is_unsure(INBOX): 0
Aug  3 23:08:38 server imap: antispam: mail copy: src spam: 0, dst spam: 
1, src unsure: 0
Aug  3 23:08:38 server imap: antispam: running mailtrain backend program 
/usr/local/bin/sa-learn
Aug  3 23:08:38 server imap: antispam: running mailtrain backend program 
/usr/local/bin/sa-learn
Aug  3 23:08:40 server imap: antispam: run program failed with exit code 9



But unfortunately there is no more debug as I was hoping of sa-learn.
I also tried using different Dovecot versons already - but with the same 
result - they all give my MTC a SERVERBUG when I try to move mails with 
the help of the antispam plugin.





Thanks & Regards








More information about the dovecot mailing list