RE: [Exim] how to rewrite

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Eli
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: RE: [Exim] how to rewrite
Fred Viles wrote:
> If you want to override an existing Reply-To:, if I read the spec
> correctly you can also do it in the router with headers_add and
> headers_remove (untested):
>
>   # If both Reply-to and List-Post exist, copy original Reply-To
>   # (optional)
>   headers_add    = ${if and { \
>         {def:header_reply-to:} {def:header_list-post:}\
>             } {X-was-reply-to: $header_reply-to:} {} }
>   # If List-Post exists, generate Reply-To from it
>   headers_add    = ${if match {$header_list-post:} {\<mailto:(.*)\>} \
>              {reply-to: <$1>} {} }
>   # If both Reply-to and List-Post exist, remove original Reply-To
>   headers_remove = ${if and { \
>             {def:header_reply-to:} {def:header_list-post:}\
>             } {reply-to} fail }

>
> The various headers_add and headers_remove are remembered, and are
> all processed at transport time (removes first).


I'm not sure if this will work or not, because if I remember correctly, all
headers_remove actions are processed first, and then the headers_add. So,
you'll remove the reply-to: header before you can play with it in your
headers_add statements. I could be wrong though - testing will show if it
works or not :)

Eli.