On 12/03/2022 00:04 David Arroyo david@aqwari.net wrote:
Hello,
I recently significantly modified my sieve rules for filing mailing list posts in my Fastmail inbox. The rules contain a few rules that file mail like so:
fileinto :create ml.${5}${4}{$3}{$2}{$1}; # reversed list-id
The rules work as expected on delivery to fastmail. Because these rules only run on delivery, and the new folder layout is different from my existing one, I want to apply the rules to my existing mail. I thought dovecot's
sieve-filter
command, together with theimapc
storage backend, would be a good way to do that, so I moved some existing mail into a folder,sieve-test
, and ran the following:sieve-filter -x '+editheader +mailbox' -W -e rules.sieve sieve-test
However, what I see is that sieve-filter fails when the new directory does not exist. Here is some example (redacted) output:
Info: imapc(imap.fastmail.com:993): Connected to x.x.x.x:993 (local x.x.x.x) error: msgid=<xxx>: fileinto action: failed to store into mailbox 'ml.gnu.guix-devel': Mailbox does not exist. sieve-filter(me): Info: sieve: msgid=<xxx>: left message in mailbox 'sieve-test' error: sieve script execution failed for this message; message left in source mailbox. sieve-filter(me): Info: sieve: msgid=<yyy>: fileinto action: stored mail into mailbox 'ml.9fans.9fans'
My config looks like this:
protocols = none mail_location = imapc: namespace { inbox = yes separator = . } imapc_host = imap.fastmail.com imapc_port = 993 imapc_ssl = imaps imapc_user = $username
If this is a bug in sieve-filter I'd be happy to try and fix it, but I'm reaching out here first to see if this is expected behavior or a misconfiguration on my part.
Thanks for any help, David
Hi!
can you provide output of mail_debug=yes logs during delivery?
Aki