Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

Regular expression in acl

Regular expression in acl

2012-05-04 by Denis Solovyov

Hello,

Please explain to me if I need to use ^ and $ symbols to match the
beginning and the end of the string in regexps in acls. Examples in
milter-greylist doc don't use them at all, but won't

racl greylist rcpt /.*@example\.net/

match "test@..." as well?

With the best regards,
Denis Solovyov

Re: [milter-greylist] Regular expression in acl

2012-05-04 by manu@netbsd.org

Denis Solovyov <elk@...> wrote:

> Please explain to me if I need to use ^ and $ symbols to match the
> beginning and the end of the string in regexps in acls.

If you want to match boundaries, yes. For instance:
/whatever@example\.com$/

But note that ^.* here is useless and inefficient:
/^.*whatever@example\.com$/

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re[2]: [milter-greylist] Regular expression in acl

2012-05-04 by Denis Solovyov

>> Please explain to me if I need to use ^ and $ symbols to match the
>> beginning and the end of the string in regexps in acls.
> If you want to match boundaries, yes. For instance:
> /whatever@example\.com$/
> But note that ^.* here is useless and inefficient:
> /^.*whatever@example\.com$/

Thank you.  I believe, then, the example from the doc

racl greylist rcpt /.*@example\.net/

probably should be replaced with

racl greylist rcpt /@example\.net$/

to avoid misunderstanding?  It is not clear now that /.*@example\.net/
actually matches much more than whatever@....

Denis Solovyov

Re: [milter-greylist] Regular expression in acl

2012-05-04 by manu@netbsd.org

Denis Solovyov <elk@...> wrote:

> Thank you.  I believe, then, the example from the doc
> 
> racl greylist rcpt /.*@example\.net/
> 
> probably should be replaced with
> 
> racl greylist rcpt /@example\.net$/

Sure, please send a patch.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.