Re: [Exim] how to rewrite

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Fred Viles
Datum:  
To: exim-users
Betreff: Re: [Exim] how to rewrite
On 11 Feb 2004 at 11:10, Fred Viles wrote about
    "Re: [Exim] how to rewrite":


| On 11 Feb 2004 at 13:39, Michael Johnson wrote about
|     "Re: [Exim] how to rewrite":

|
| |...
| | Now, is it possible to combine the first two into a single headers_add
| | to get the function of the three?

|
| Sure, and actually it's more elegant that way. Still untested:

|
|   headers_add    = ${if and { \
|         {def:header_reply-to:} \
|         {match {$header_list-post:} {\<mailto:(.*)\>}} \
|     } {X-was-reply-to: $header_reply-to:\nreply-to: <$1>} {} }


ACK! That won't do it, it won't add the new Reply-To: unless there
already is one. You can't avoid nested conditions. This time I
*did* test first, hopefully avoiding further embarrassment:

  headers_add    = ${if match {$header_list-post:} {\<mailto:(.*)\>} \
             {${if def:header_reply-to: \
            {X-Orig-reply-to: $header_reply-to:\nReply-To: <$1>} \
            {Reply-To: <$1>} }} \
             {} }


- Fred