Commit 6dd6353d authored by Joshua Tauberer's avatar Joshua Tauberer

move sa-learn-pipe.sh from /usr to /usr/local

parent d06bfa6c
...@@ -35,13 +35,14 @@ sudo sed -i "s/#mail_plugins = .*/mail_plugins = \$mail_plugins antispam/" /etc/ ...@@ -35,13 +35,14 @@ sudo sed -i "s/#mail_plugins = .*/mail_plugins = \$mail_plugins antispam/" /etc/
# When mail is moved in or out of the Dovecot Spam folder, re-train using this script # When mail is moved in or out of the Dovecot Spam folder, re-train using this script
# that sends the mail to spamassassin. # that sends the mail to spamassassin.
# from http://wiki2.dovecot.org/Plugins/Antispam # from http://wiki2.dovecot.org/Plugins/Antispam
cat > /usr/bin/sa-learn-pipe.sh << EOF; rm -f /usr/bin/sa-learn-pipe.sh # legacy location
cat > /usr/local/bin/sa-learn-pipe.sh << EOF;
cat<&0 >> /tmp/sendmail-msg-\$\$.txt cat<&0 >> /tmp/sendmail-msg-\$\$.txt
/usr/bin/sa-learn \$* /tmp/sendmail-msg-\$\$.txt > /dev/null /usr/bin/sa-learn \$* /tmp/sendmail-msg-\$\$.txt > /dev/null
rm -f /tmp/sendmail-msg-\$\$.txt rm -f /tmp/sendmail-msg-\$\$.txt
exit 0 exit 0
EOF EOF
chmod a+x /usr/bin/sa-learn-pipe.sh chmod a+x /usr/local/bin/sa-learn-pipe.sh
# Configure the antispam plugin to call sa-learn-pipe.sh. # Configure the antispam plugin to call sa-learn-pipe.sh.
cat > /etc/dovecot/conf.d/99-local-spampd.conf << EOF; cat > /etc/dovecot/conf.d/99-local-spampd.conf << EOF;
...@@ -49,8 +50,8 @@ plugin { ...@@ -49,8 +50,8 @@ plugin {
antispam_backend = pipe antispam_backend = pipe
antispam_spam_pattern_ignorecase = SPAM antispam_spam_pattern_ignorecase = SPAM
antispam_allow_append_to_spam = yes antispam_allow_append_to_spam = yes
antispam_pipe_program_spam_args = /usr/bin/sa-learn-pipe.sh;--spam antispam_pipe_program_spam_args = /usr/local/bin/sa-learn-pipe.sh;--spam
antispam_pipe_program_notspam_args = /usr/bin/sa-learn-pipe.sh;--ham antispam_pipe_program_notspam_args = /usr/local/bin/sa-learn-pipe.sh;--ham
antispam_pipe_program = /bin/bash antispam_pipe_program = /bin/bash
} }
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment