Re: [exim] This should be simple but ...

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
A: Graeme Fowler
CC: exim-users
Assumpte: Re: [exim] This should be simple but ...


Graeme Fowler wrote:

> On Fri 16 Sep 2005 05:07:45 BST , Marc Perkel <marc@???> wrote:
>
>> I want to add this header only if it's not already there. This code
>> should work - but it doesn't. :(
>>
>> warn    message    = X-Mail-from: $sender_address
>>        condition = ${if eq{$h_X-Mail-from:}{}}

>
>
> ...because it's testing for the existence of an empty header, not
> whether the header exists or not.
>
> I think you probably want something like:
>
> condition = ${if def:h_X-Mail-from:{$h_X-Mail-from}{fail}}
>
> In other words, if it exists then the condition will return the
> contents or it will return the word "fail". You may need to strap
> another test around that to check for the word "fail" to make the
> condition test fail.
>
> Graeme
>
>

Whoops - no that didn't work.

--
Marc Perkel - marc@???

Spam Filter: http://www.junkemailfilter.com
    My Blog: http://marc.perkel.com