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
>
>

condition = ${if def:h_X-Mail-from:{$h_X-Mail-from:}{fail}}

That seems to have worked. Added a colon though after the header. Thank
you very much.

I've een working with Exim for 4 years now and I still don't get the
scripting languages. And I say languages because the filter languahe,
the router language, and the ACL language are highly inconsistent with
each other yet close enough that it gives you the illusion that it's
going to work.

--
Marc Perkel - marc@???

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