Hello again,
Schulz wrote:
You can look at the headers and reject Mails with Headers["auto-submitted"]. Sieve should add them.
Thanks for the pointer! I started playing with it but ran into two problems:
- It's only an option when possible to be configured server-wide (by default) as users will not add it to their sieve redirect rules for sure. So I tried to implement it using a sieve_before script:
if header :contains "Auto-Submitted" "auto-replied" {
discard;
}
This works well but implies a second problem:
- This will result in *all* bounce mail to be discarded, also bounces that didn't result from a sieve redirect.
So I searched for a way to detect that the bounce message is a reply to
a sieve redirect. First the X-Sieve-Redirected-From
header looked
promising, but it is only added by the sieve redirect rule itself, which
means *after* it is applied - and therefore it's not available yet in
the sieve_before
script.
Any idea how to solve this?
Another approach that I thought of was to set the envelope sender to
something distinguishable in sieve_redirect_envelope_from
, like e.g.
<user+sieve@domain.org>
and filter for that recipient in the
sieve_before
script. But I don't think it's supported in Dovecot to
set such a recipient delimiter in sieve_redirect_envelope_from
, does it?
Looking forward to your thoughts.
Kind regards doobry