Sieve addheader directive works only partially

Peter Folta mail at peterfolta.net
Wed May 13 21:10:30 EEST 2020


Hi all,

I want to add a custom header to incoming emails from a particular sender. This is what my user Sieve script looks like:

require “editheader”;

if address :is "From” “special-sender at example.com” {
    addheader “X-My-Custom-Header” “Header Value";
}

I have enabled the editheader extension in my Dovecot configuration:

plugin {
    …
    sieve_extensions = +editheader
}

This doesn’t seem to work and no header is added to the email.
However, if I also move the email to a different folder in the same if-block, the header gets added just fine:

require “editheader”;
require “fileinto”;

if address :is "From” “special-sender at example.com” {
    addheader “X-My-Custom-Header” “Header Value”;
    fileinto “MyFolder”;
}

Am I missing something?

Thanks
Peter


More information about the dovecot mailing list