Re: [exim] ACL filtering

Top Page
Delete this message
Reply to this message
Author: Always Learning
Date:  
To: Exim Users
CC: John Jetmore
New-Topics: Re: [exim] Regexps (was: ACL filtering)
Subject: Re: [exim] ACL filtering

John Jetmore wrote on Fri, 23 Apr 2010 13:39:29 -0400.


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



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


Thank you for clearly explaining my misunderstanding.

Your helpful explanation is very useful. Now I know why the gaps between
the criteria letters (adsl) was not being processed in the way I had
expected. I have changed my test to:

deny    message       = [C06.5]  Msg6 Msg2
        hosts         =
^.*[a](1)[-_.](.?)[d](1)[-_.](.?)[s](1)[-_.](.?)[l](1).*




^ = beginning of string

.* = any quantity, or none, of any characters

[a](1) = match only one 'a'

[-_.](?) = match next character which should be one or nil occurrences
of .-_

[d](1) = match only one 'd'

[-_.](?) = match next character which should be one or nil .-_

[s](1) = match only one 's'

[-_.](?) = match next character which should be one or nil .-_

[l](1) = match only one 'l'

[-_.](?) = match next character which should be one or nil .-_

.* = any quantity, or none, of any characters


You are obviously a good technical programmer.

Thank you again.

Paul.

--