[milters] Archive

Lists Index Date Thread Search

Article: 1205
From: Anthony Howe
Date: 2006-10-23 16:00:49 -0400
Subject: Re: Wild Card White-listing?

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Errol Neal wrote:
> Is it possible to whitelist all senders that have have 'noreply' (case
> insensitve) in the sender address? 

On my server I blacklist any sender that has "noreply" in the local part 
of the sender's address; automated systems still should have a 
caretaker. Regardless of my views on such things, you can do as you ask 
in several ways depending on the form of the local part:

If the local part is always constant (most efficient form):

	milter-NAME-from:noreply@	OK

If the local part is variable, like "noreply-munged-user@example.com":

	milter-NAME-from:		/^noreply/OK NEXT

or "munge-user-noreply-whatever@bad.idea.com":

	milter-NAME-from:		/noreply[^@]*@/OK NEXT

or you can use the simpler pattern matching:

	milter-NAME-from:		!*noreply*@*!OK NEXT

Or if you want to only white list noreply for a specific domain:

	milter-NAME-from:your.domain	/noreply/OK

This is more efficient than using the default case since it matches 
earlier in the lookup sequence.

See the access-db description of the milter in question for the 
supported formats available to you and a brief outline of the lookup 
sequence.

The NEXT action resumes the access.db lookups if there was no matching 
pattern, otherwise the result would be an implicit SKIP, ie.

	milter-NAME-from:		/noreply[^@]*@/OK

is equivalent to

	milter-NAME-from:		/noreply[^@]*@/OK SKIP

Understanding the differences between SKIP and NEXT (think "break" or 
"continue" in C) will alter your B/W lookups accordingly.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         AIM: SirWumpus    Sendmail Milter Solutions
http://www.snert.com/     ICQ: 7116561
     http://www.snertsoft.com/

Lists Index Date Thread Search