Sieve rewrite headers?

@lbutlr kremels at kreme.com
Thu Jun 13 19:25:25 EEST 2019


I’ve bene looking for examples on how to do this, but so far am coming up short.

I want to check certain messages for a reply-ro header and if it is present, rewrite it to X-Reply-To: and then add my own reply-to header.

I don’t see anything in the various sieve examples I’ve found on altering the actual message.

There is the editheader extension, but I failed to find documentation or examples on how to use it.

It appears that I can add a header and delete a header (addheader deleteheader?) but not rewrite one.

So something like

if header “Reply-to: foo at bar.tld” {
        addheader "X-Reply-To: foo at bar.tld”
        deleteheader “Reply-To:”
        addheader "X-Reply-To: bar at foo.tld”
    }

??

Do I need to delete the header or will the add header overwrite the one that is there?

Also, how do people manage different sieve files? Just cat them all into the active one, or is there a mechanism to import/switch/load other files?



More information about the dovecot mailing list