Sa-learn-pipe.sh script modification
skyice at openmailbox.org
Sat Nov 1 14:38:48 UTC 2014
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:
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
echo "$$-end" >> /tmp/sa-learn-pipe.log
I want know if this can cause any problem ?
More information about the dovecot