Inconsistent filtering with debugging
Christian Wolf
account+dovecot at christian-wolf.click
Fri Feb 24 13:03:09 UTC 2023
Hello,
I have the problem, that I have a Postfix/Dovecot combination running
with Sieve activated. The sieve script is running in general as some
messages get filtered and moved to the appropriate folders.
Now, I see that for the envelope filter, the behavior differs depending
if I am debugging the rules or if the mails are received in a regular way.
I have something like this:
require "envelope";
# ...
if envelope :is "to" "foo at subdaomin.example.com" {
fileinto "INBOX.bar";
stop;
}
# ...
The thing is if I call sieve-filter on the INBOX, I get the information
that the mail is to be moved to the appropriate folder. However during
delivery the mail is not moved there. Other rules in the script are
working so it is installed in general.
Of course, I could send mails to the mail address for testing but I have
no clue on where to look for issues, especially as the "main debugging
tool" for the rules (sieve-filter) is strangely behaving differently.
The reason, I wanted to use the envelope was because the mails are
delivered to foo at subdomain.example.com. From there, some virtual aliases
are forwarded to a cental account bar at example.net using postfix virtual
aliases. Thus, the Delivered-To header is always showing the value
bar at example.net which is not suited for filtering.
I could filter the Received headers but hoped for a more "high level"
solution.
Can you give me any advice?
Christian
More information about the dovecot
mailing list