Hello I have a problem with migrating dovecot from 2.2.36 to 2.3.8 - everything works fine, but a problem with migrating anti-spam plugins
New dovecot 2.3.x has implemented own antispam-plugin like:
---- new from dovecot 2.3.8 ----- # From elsewhere to Spam folder imapsieve_mailbox1_name = Spam imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_before = file:/usr/lib64/dovecot/sieve/report-spam.sieve
# From Spam folder to elsewhere imapsieve_mailbox2_name = * imapsieve_mailbox2_from = Spam imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_before = file:/usr/lib64/dovecot/sieve/report-ham.sieve
sieve_pipe_bin_dir = /usr/lib64/dovecot/sieve
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
#setting_name = value sieve_global_dir = /etc/sieve_global sieve_max_redirects = 20 sieve_vacation_use_original_recipient = yes
expire = SPAM #expire_dict = proxy::expire expire_dict = redis:host=127.0.0.1:prefix=expire/
In older version dovecot I use antispam_plugin + simple script:
---------------- old from 2.2.36.4 + antispam plugin ---------- ... antispam_backend = MAILTRAIN antispam_mail_spam = --spam antispam_mail_notspam = --ham antispam_mail_sendmail = /usr/local/bin/spam-learn.sh antispam_pipe_tmpdir = /tmp
antispam_spam_pattern_ignorecase = spam;inbox.spam;Unwanted antispam_trash_pattern_ignorecase = trash;Deleted *;Junk*;kosz
antispam_debug_target = syslog antispam_verbose_debug = 1
How do I change the bash file to make it work like on the old system (I use pyzor) like:
cat /usr/local/bin/spam-learn.sh
#!/bin/sh date >> /tmp/spam.txt echo $@ >> /tmp/spam.txt
if [ "x$1" = "x--spam" ]; then /usr/bin/pyzor report >> /tmp/spam.txt 2>&1 fi if [ "x$1" = "x--ham" ]; then /usr/bin/pyzor whitelist >> /tmp/ham.txt 2>&1 fi