Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] RE: Regex matching and gmail

2005-12-15 by Matt Kettler

manu@... wrote:
> Mike Loiterman <mike@...> wrote:
> 
> 
>>If I wanted to white list ANYONE@... would this be the correct regex:
>>acl whitelist domain /.*domain\.com/
> 
> 
> I'd do 
> acl whitelist domain /.*@domain\.com/
> 

Why start off with the .*?

In a regex it's irrelevant as regexes are always substring matches unless
anchored with ^ or $. /@domain\.com/ matches the same as /.*@domain\.com/ but
uses less memory.

Personally, I'd do acl whitelist domain /domain\.com$/ or /@domain\.com$/. The
difference being the first one will match sub-domains (ie user@...),
but the second will not.

Attachments

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.