Re: [exim] ACL filtering

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: John Jetmore
Data:  
Para: Always Learning
CC: Exim Users
Asunto: Re: [exim] ACL filtering
On Fri, Apr 23, 2010 at 1:22 PM, Always Learning
<exim.users@???> wrote:
>
>>> martin@olga:~$ perl -e 'if ("olga.hinterlands.org" =~
>>> m/^.*[a].?[d].?[s].?[l]*/){print "your configuration is broken\n.";}'
>>> your configuration is broken
>
> It seems that Exim is not Perl and that is why there are distinctly
> difference results for the above.


Exim behaves the same way:

$ exim -be '${if
match{olga.hinterlands.org}{\N^.*[a].?[d].?[s].?[l]*\N}{your config is
broken}{}}'
your config is broken

While there's a certain sick fascination in watching this, here's
what's happening:

You've misunderstood your regexp. Here's a quick explanation:

[a] matches any character in the set of (a).
. matches exactly one of any character (+/- some fiddly stuff with line endings)
? is a modifier which means "zero or one of the previous item"
* is a modifier which means "zero or more of the previous item"

the match is on "ands":
"a" matches [a]
"n" matches .?
"d" matches [d]
"" matches .?
"s" matches [s]
"" matches [l]*

--John