Re: [exim] filter question

Pàgina inicial
Delete this message
Reply to this message
Autor: Graeme Fowler
Data:  
A: exim-users
Assumpte: Re: [exim] filter question
On Mon, 2007-09-24 at 11:46 -0400, John Jetmore wrote:
> I have very limited experience with Exim filters. I've mostly use
> procmail and the times I've used filters it's Just Worked. But now I'm
> feeling a little confused. According to my reading all of these should be
> equal:
>
>        if $h_To: matches "(proj|updates)-[^@\\\\s]+@jetmore\\\\." then
>        if $h_To: matches (proj|updates)-[^@\\s]+@jetmore\\. then
>        if $h_To: matches \N(proj|updates)-[^@\s]+@jetmore\.\N then

>
> But in my filter only the first one works. The other two actually result
> in a filter processing error:


The bracket is parsed as a condition aggregator, like this:

if ($h_To: contains "graeme" and not personal)
then
seen finish
endif

I'm guessing, because you want to use the bracket as part of a regular
expression, that the brackets need to be escaped - which the quotes do
automagically.

See http://www.exim.org/exim-html-current/doc/html/filter.html#SECTif

Graeme