On 05/08/10 10:37 AM, Leander S. wrote:
Am 28.07.2010 21:34, schrieb Daryl Richards:
I've also had this problem in the past. I wrote a wrapper script to
try to log what is happening. Funny thing is, when run through this
script it works fine. Without the script it fails. Not sure where to
look next, I've just kept the script.
#!/usr/local/bin/bash
(
id -a
echo $@
/usr/local/bin/sa-learn $@
rc=$?
echo "exit code $rc"
exit $rc
) > /tmp/antispam.out.$$ 2> /tmp/antispam.err.$$
On 7/28/2010 3:12 PM, Leander S. wrote:
On 07/28/2010 07:24 PM Leander S. wrote:
…
Jul 28 18:51:40 server imap: antispam: running mailtrain backend
program
/usr/local/bin/sa-learn
Jul 28 18:51:40 server imap: antispam: running mailtrain backend
program
/usr/local/bin/sa-learn
Jul 28 18:51:41 server imap: antispam: run program failed with exit
code 9
> > "run program failed with exit code 9" --> unfortunately is
nothing
mentioned in the dovecot antspam man.
Antispam
manual:http://johannes.sipsolutions.net/files/antispam.html#lbAL
> > > > Could anybody give me a hint where to look up this exit
code? Or is
there a general meaning for exit codes?
i.e.: 0 means normal ; 5 internal error ; and 9 maybe means syntax
issue
... or whatever ?!
/usr/local/bin/sa-learn returned exit code 9. So, check the fine
spamassassin documentation.
^^ I did - there is nothing mentioned about exit codes at all - except
in the spamc manual. But the spamc manual doesn't represent exit code 9.
Do you guys maybe have any idea what this could mean? How does your
config for antispam looks like - but I doubt there could be anything
wrong in mine.
... very weired ...
Regards,
Leander
Regards,
Pascal
-- The trapper recommends today: f007ba11.1020919@localdomain.org
Thanks for the script hint - exactly the same on my side - I also use a
script now - but mine is more simple than yours:
server [~]# cat /script.sh
#!/usr/local/bin/bash
/usr/local/bin/sa-learn $1 $2 $3 $4 &> /DoveDamnAntispam.log
exit 0 ;
server [~]#
Antispam part of 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 = /script.sh
#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
Works fine for me now - but it's really weired ...
Anyway - lots of thx, hey! ;)
regards
I added the extra debugging to show exactly what was happening - what
user was calling sa-learn, what the exit code was, etc... But, as I
said, it didn't help as it runs perfectly through that script!
--
Daryl Richards
Isle Technical Services Inc.