[Dovecot] Struggling with antispam

Alan Chandler alan at chandlerfamily.org.uk
Wed Mar 12 21:35:13 UTC 2014


On 06/03/14 07:59, Alan Chandler wrote:
> On 06/03/14 07:48, Alan Chandler wrote:
>>
>> However, when I try to make this work with anitspam, I keep getting 
>> failure, and I can't work out what is causing it.  Maybe its again 
>> because I am running with uid 10001 when calling sendmail but I don't 
>> know.
>>
>> antispam config is
>>
>> plugin {
>> ...
>
>>    antispam_pipe_program=/usr/bin/sendmail
>
>
> Arrg:
>
> I have been struggling with this all yesterday evening.  Two minutes 
> after posting this I realise it is /usr/sbin/sendmail, not 
> /usr/bin/sendmail
>
> Sorry for the noise  (Although I would prefer to use the dspam backend 
> if I could).
>
> It is not working yet - postfix has rejected the mail because it came 
> from an unknown sender (dspam at chandlerfamily.org.uk) I could use %u on 
> the sender address - but then my sieve script to save outgoing mail 
> would have to change to ignore mail aimed at the spam addresses.


Well I am STILL struggling with this.

here is my (revised) plugin parameters (and also a temp change to call a 
script rather than sendmail)

     antispam_debug_target = syslog
     antispam_verbose_debug = 1
     antispam_backend = pipe
     antispam_signature = X-DSPAM-Signature
     antispam_signature_missing = error
     antispam_trash = Trash
     antispam_spam = Junk
     antispam_allow_append_to_spam = yes
     antispam_pipe_program=/home/pi/callsendmail
     antispam_pipe_program_args=-f;dspam at chandlerfamily.org.uk
     antispam_pipe_program_spam_args=%u at spam.spam
     antispam_pipe_program_notspam_args=%u at ham.ham

To try and find out what is going wrong.

the /home/pi/callsendmail script has the following in it

#!/bin/sh
echo "$$-start ($*)" >> /tmp/dspam-train.log
cat<&0 >> tmp/dspam-train.log
echo "$$-end" >> /tmp/dspam-train.log

exit 0

So I was hoping to see my training message in the log.  Instead I just 
get this

21536-start (-f dspam at chandlerfamily.org.uk alan at spam.spam)
21536-end

Is it my shell script that is wrong or antispam - why is nothing written 
in my log file?






-- 
Alan Chandler
http://www.chandlerfamily.org.uk



More information about the dovecot mailing list