Hello,
I'm trying to achieve the following scenario with dovecot + sieve + procmail.
Dovecot is set as LDA in postfix (if this makes any difference) I need to set sieve that after it has executed all it's scripts (including before, ~/.sieve etc) and if keep is in still in effect to call procmail to also execute the custom user filters and then return (if it is not forwarded elsewhere or some) to dovecot for normal delivery.
If you ask this I need this for backward compatibility. I now use procmail for local delivery,spam/virus filtering, and users have set a lot of custom filters/redirects.
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
I want to migrate to dovecot as lda and sieve for filtering but to keep procmail working for a while.
I have tried to follow (partially) this guide https://www.enricozini.org/blog/2022/debian/migrating-from-procmail-to-sieve... but procmail fails to execute
##########################
Aug 30 15:22:26 uk7 dovecot[112151]:
lda(test-uk7.teststring567.tk)<112151>
here some relative (on my opinion) configs: ################################ #/etc/dovecot/conf.d/90-sieve.conf plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_plugins = sieve_extprograms sieve_extensions = +vnd.dovecot.pipe sieve_pipe_bin_dir = /var/lib/dovecot/sieve-pipe sieve_after = /var/lib/dovecot/sieve_after sieve_trace_dir = ~/.sieve-trace sieve_trace_level = matching sieve_trace_debug = yes } #################################### #/var/lib/dovecot/sieve-pipe/procmail
#!/bin/sh exec /usr/bin/procmail ##################################### #/var/lib/dovecot/sieve_after/procmail.sieve require "vnd.dovecot.pipe";
pipe "procmail"; #####################################
#cat /etc/procmailrc
SHELL="/bin/bash" SENDMAIL="/usr/sbin/sendmail" SENDMAILFLAGS="-oi -t"" LOGFILE="/var/log/procmail.log" # fully define here so user .procmailrc can use it too DELIVER="/usr/libexec/dovecot/deliver -d $LOGNAME" # fallback: DEFAULT="$HOME/Maildir/" MAILDIR="$HOME/Maildir/"
# deliver spam to spam folder :0 w
- ^X-Spam-Status: Yes | $DELIVER -m spam
uncomment next line to support user .procmailrc files
INCLUDERC=$HOME/.procmailrc
# deliver to INBOX and stop :0 w | $DELIVER #########################################
Thank you in advance