Hello,

I've seen on this wiki page: http://wiki2.dovecot.org/Plugins/Antispam

A script called "sa-learn-pipe.sh". I've tested it but it slow things down because dovecot wait for the script termination.

So, I've made a modification. Now, the task is running in the background and dovecot move the mail without waiting for the script termination:

#!/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

I want know if this can cause any problem ?

Thanks.

--
Best regards,
Pierre Barre.

Reply via email to