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

Etusivu
Poista viesti
Vastaa
Lähettäjä: Marc Perkel
Päiväys:  
Vastaanottaja: Graeme Fowler
Kopio: exim-users
Aihe: 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