Sieve editheader should support adding Received and Auto-Submitted headers
In order to simplify auto-response suppression and other filtering, I want to synthesise an Auto-Submitted header on notification mails that should have them but do not.
In a sieve file I add the following:
if anyof ( header :contains ["From","Sender"] “info@example.com" ) { if header :contains "Subject" [" just joined "," just left "] { if not exists "Auto-Submitted" { addheader "Auto-Submitted" "auto-generated (via sieve)"; } }
However this doesn’t work and results in the following error
main script: line 205: warning: addheader action: specified header field `Auto-Submitted' is protected; modification denied.
(Workaround for this specific issue would probably be to use a List-* header instead.)
Looking at http://hg.rename-it.nl/dovecot-2.2-pigeonhole/file/c8edece267cd/src/lib-siev... I can see that "Auto-Submitted” and “Received” are hardcoded to be blocked without reference to whether they are to be added or removed.
However, the hard restriction in RFC 5293 on Auto-Submitted and Received only applies to the use of deleteheader and not addheader.
https://tools.ietf.org/html/rfc5293#section-6
Using Dovecot version 2.1.7 but I assume it’s not version specific issue.
On 3/5/2015 12:05 AM, Lee Maguire wrote:
Oh, looks like I missed that part.
Fixed: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/c13471f102be
I've split up the configuration to allow separate configuration of addheader/deleteheader.
Updated documentation: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/raw-file/c13471f102be/doc/exte...
Regards,
Stephan.
participants (2)
-
Lee Maguire
-
Stephan Bosch