Sieve addheader directive works only partially

Aki Tuomi aki.tuomi at open-xchange.com
Thu May 14 09:08:41 EEST 2020


> On 13/05/2020 21:10 Peter Folta <mail at peterfolta.net> wrote:
> 
>  
> 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

Try 'sieve-test' utility to see what it is doing.

Aki


More information about the dovecot mailing list