24 May
2013
24 May
'13
11:57 a.m.
Op 5/24/2013 10:39 AM, Kiran Reddy schreef:
HiAll,
How to rewrite mail headers from X-Original-To to Delivered-To using sieve script.
I am using Dovecot-2.2 and Pigeonhole 0.4.
Ehmmm.. why do you need to do that? :)
Anyway, something like this:
require "editheader"; require "variables";
# Take value from first header occurrence if header :matches "X-Original-To" "*" { # delete existing headers to prevent creating duplicate (optional) deleteheader "Delivered-To";
# add the new header
addheader "Delivered-To" "${1}";
# delete old header (optional)
deleteheader "X-Original-To";
}
Regards,
Stephan.