Re: [Exim] Condition line in a director

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: jhenders
Data:  
Para: Philip Hazel
CC: exim-users
Assunto: Re: [Exim] Condition line in a director
On Tue, Dec 11/01, Philip Hazel <ph10@???> wrote:

> > However if I then try to actually test on the subject header with the
> > following
> >
> > condition = "${if eq{$header_subject:}{test}{yes}{no}}"
>
> That should work. However, the contents of the header are likely to be
> "test\n", so maybe that's the problem. Have you tried
>
> ${if match{$header_subject:}{test}{yes}{no}}


Yes, that works, but opened up the possibility of the keyword I wanted
to match being a substring. However, as I couldn't figure out how to put
a /n into the if eq string, I did notice that if match can be a regex so
I ended up using the following, which basically seems to give the
equivalent of equals.

${if match{$header_subject:}{^test\\$}{yes}{no}}

This appears to do what I want and not match the keyword I'm looking for
if it appears as part of a sentance.

--
  Artificial Intelligence stands no chance against Natural Stupidity.
            GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                 b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*