plugin antispam sa-learn run program failed with exit code -1

J. Echter j.echter at echter-kuechen-elektro.de
Fri Aug 21 17:37:42 UTC 2015


Am 21.08.2015 um 16:37 schrieb Guillaume Lakano - DOVECOT:
> Le 21/08/2015 16:21, Steffen Kaiser a écrit :
>>
>> - -1 usually means exec() failed, that is:
>>
>> /usr/bin/sa-learn does not exist or the process thinks so at least.
>
> Hello Steffen, thanks for your reply.
>
> I've tried to use an external script sa-learn-pipe.sh :
>
>> #!/bin/bash
>> echo /usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt echo "$$-start
>> ($*)" >> /tmp/sa-learn-pipe.log
>> echo $* > /tmp/sendmail-parms.txt cat<&0 >> /tmp/sendmail-msg-$$.txt
>> /usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt && rm -f
>> /tmp/sendmail-msg-$$.txt &
>> echo "$$-end" >> /tmp/sa-learn-pipe.log
>> exit 0
>
> And to update my configuration like that:
>>
>>   antispam_debug_target = syslog
>>   antispam_verbose_debug = 1
>>
>>   antispam_backend = pipe
>>   antispam_pipe_program_spam_arg = --spam
>>   antispam_pipe_program_notspam_arg = --ham
>>   antispam_pipe_program = /usr/local/bin/sa-learn-pipe.sh
>>   antispam_pipe_program_args = --username=%Lu
>
> Now, this seems better, no error, the email is correctly moved in
> /Junk/ and I have no error
>
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_unsure(Junk): 0
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_trash(INBOX): 0
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_trash(Junk): 0
>> Aug 21 16:31:05 mail imap: antispam: mail copy: from trash: 0, to
>> trash: 0
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_spam(INBOX): 0
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_spam(Junk): 0
>> Aug 21 16:31:05 mail imap: antispam: mailbox_is_unsure(INBOX): 0
>> Aug 21 16:31:05 mail imap: antispam: mail copy: src spam: 0, dst
>> spam: 0, src unsure: 0
>
>
> BUT... the sa-learn-pipe.sh doesn't seems to be called !
> No files created in /tmp/
>
> :-(
>
> I also tried to use the "mailtrain" backend but Dovecot doesn't accept
> it ( I suppose I need to set "antispam_backend" to "mailtrain" but
> this doesn't works ).
>
>
>
>>
>> Do you have SELinux active? http://wiki2.dovecot.org/WhyDoesItNotWork
>> near the end.
>
> sestatus doesn't exists, package not installed ( policycoreutils )
> and no file /var/log/audit*
>
> So I suppose iRedMail doesn't install SELinux components.
>
>
>>
>> If this does not help, add a wrapper script in your config and check
>> if the script is called at least
>>
>
> It's not called at all :-/
imho you can call sa-learn directly, no pipe neccessary.

http://spamassassin.1065346.n5.nabble.com/Piping-to-sa-learn-td105920.html

cheers

juergen


More information about the dovecot mailing list