Matt Zagrabelny:
> Greetings Postfix Users,
> 
> I have a need to rewrite part of the incoming mail header before local
> delivery.
> 
> The "To:" header looks like:
> 
> To: The default queue via RT <corresp...@example.com>
> 
> and I need to remove the descriptive part of the email address so that it
> looks like:
> 
> To: <corresp...@example.com>
> 
> Sometimes the header will have arbitrary data, so I would need to match
> something like:
> 
> To: .*?<corresp...@example.com>$
> 
> I'm running version 2.9.6.
> 
> Does anyone have any pointers for me for rewriting the headers?

See the REPLACE action in:

$ man header_checks
http://www.postfix.org/header_checks.5.html

For capture syntax with () see:

$ man regexp_table
http://www.postfix.org/regexp_table.5.html

$man pcre_table
http://www.postfix.org/pcre_table.5.html

        Wietse

Reply via email to