Hello,
I'm trying to get Dovecot 2.31, pidgeonhole 0.51 going with imapsieve and rspamd. I'm getting the below in my errorlog:
cat dovecot.log
2018-04-13 17:35:34 imap-login: Info: Login:
user=testuser@domain.com, method=PLAIN, rip=127.0.0.1,
lip=127.0.0.1, mpid=57977, secured, session=
90-plugin.conf excerpt: plugin { sieve_plugins = sieve_imapsieve sieve_extprograms sieve_before = /home/vmail/sieve/global/admin.sieve sieve = file:/home/vmail/sieve/%d/%n/scripts;active=/home/vmail/sieve/%d/%n/active-script.sieve
# Spam learning
# From elsewhere to Spam folder imapsieve_mailbox1_name = Spam imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_before = file:/home/vmail/sieve/global/report-spam.sieve
# From Spam folder to elsewhere imapsieve_mailbox2_name = * imapsieve_mailbox2_from = Spam imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_before = file:/home/vmail/sieve/global/report-ham.sieve sieve_pipe_bin_dir = /home/vmail/sieve sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute +vnd.dovecot.environment
Here are my sieve scripts, they have been compiled, and the shell scripts, all are owned and group of vmail:vmail and the scripts are 775. home/vmail/sieve/global#cat report-spam.sieve require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"]; if environment :matches "imap.user" "*" { set "username" "${1}"; } pipe :copy "sa-learn-spam.sh" [ "${username}" ];
/home/vmail/sieve/global#cat report-ham.sieve require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"]; if environment :matches "imap.mailbox" "*" { set "mailbox" "${1}"; } if string "${mailbox}" "Trash" { stop; } if environment :matches "imap.user" "*" { set "username" "${1}"; } pipe :copy "sa-learn-ham.sh" [ "${username}" ];
/home/vmail/sieve/global#cat sa-learn-spam.sh #!/bin/sh exec /usr/local/bin/rspamc -h /var/run/rspamd/rspamd.sock -P "Password" learn_spam
/home/vmail/sieve/global#cat sa-learn-ham.sh #!/bin/sh exec /usr/local/bin/rspamc -h /var/run/rspamd/rspamd.sock -P "password" learn_ham
I'd appreciate any suggestions.
Thanks. Dave.