So, this is what I did instead of default_sieve: sieve_before = file:/usr/lib/dovecot/sieve/bcc.sieve sieve_before2 = file:/usr/lib/dovecot/sieve/filespam.sieve # cat /usr/lib/dovecot/sieve/bcc.sieve require ["variables", "copy"]; if address :matches ["To", "Cc"] ["*@*."] { redirect :copy "backup+295.${1}.${2}@. . ."; } # cat /usr/lib/dovecot/sieve/filespam.sieve require ["fileinto", "imap4flags"]; if header :contains "X-spam-flag" "YES" { fileinto :flags "\Seen" "Junk"; } The bcc.sieve file is generated each day with a little script to put in the day of the year, so that for the backup user the folder structure for backups for my list mail is, for example: 295 kremels kreme <messages> otheruser kreme <messages> And tomorrow new folders for 296 will be created. So far, I think it's working. ? -- C code. C code run. Run, code, run.
On 21 Oct 2020, at 13:08, @lbutlr <kremels at kreme.com> wrote:> # cat /usr/lib/dovecot/sieve/bcc.sieve > require ["variables", "copy"]; > > if address :matches ["To", "Cc"] ["*@*."] { > redirect :copy "backup+295.${1}.${2}@. . ."; > }?> So far, I think it's working. ?Welp, spoke to soon. I rebooted because of an update to FreeBSD p10 and now the bcc.sieve doesn?t appear to be doing anything, but I am not seeing any errors logged either. I am wondering about doing something like If header :matches ["received"] ["for <*@*>"] To account for list mail properly, but until I know why this is now failing, I feel like I can't do that. I have trace logs enabled for user scripts, but I think only error get logged for upper level, and only along the lines of "could not compile <name of sieve>". -- "Some cause happiness wherever they go; others, whenever they go.." - Oscar Wilde
On 10/21/20 1:10 PM, @lbutlr wrote:> I have trace logs enabled for user scripts, but I think only error get logged for upper level, and only along the lines of "could not compile <name of sieve>".verify that you can compile the scripts manually, even as root then double-check your perms on your sieve/ dir, making sure that the write perms are correct for your dovecot (other?) sieve processes
On 21 Oct 2020, at 14:10, @lbutlr <kremels at kreme.com> wrote:> I have trace logs enabled for user scripts, but I think only error get logged for upper level, and only along the lines of "could not compile <name of sieve>".Any ideas? Is there a way to force the default and sieve_before scripts to log to syslog? -- The real world was far too real to leave neat little hints. It was full of too many things. It wasn't by eliminating the impossible that you got at the truth, however improbable; it was by the much harder process of eliminating the possibilities. --Feet of Clay