Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] Blacklisting syntax

2006-08-08 by Jack L. Stone

At 11:58 AM 8.8.2006 -0400, you wrote:
>Emmanuel Dreyfus wrote:
>> On Tue, Aug 08, 2006 at 07:18:57AM -0500, Jack L. Stone wrote:
>>> list "known spammers" rcpt { /.*@.../ /.*@.../ /bad1@*/
>>> /bad2@*/ }
>> 
>> IMO, you want /.*@example1\.com/ and /bad1@.*/
>> 
>
>Side note:
>
>why /.*@example\.com/ instead of /@example\.com/ ?
>
>In general, because regexes match sub-strings, any wild-cards at the
beginning
>or end of a regex are redundant and reduce efficiency.
>
>/foo/ is equivalent to /.*foo.*/, but the later takes longer to run and uses
>more memory. Both will match "foo" "foobar"  "somefoo" and "somefoobar".
>
>
>You can abuse perl's regex debugger to compare the two. Admittedly,
>milter-greylist doesn't use perl's regex engine, but it's a quick-and-easy
tool

Thanks, Matt. I'll modify my lines for this.

BTW: I thought there was also a website that allowed one to check regex
statements at least to see if they work okay -- maybe not an optimizer, but
quick check for someone like me who has to be a "Jack of all (many?) trades
-- master of some".

(^_^)
Happy trails,
Jack L. Stone

System Admin
Sage-american

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.