[vPostMaster] Possible to use rules to make a reject-all-unless-whitelisted account?

Kristen Shuemaker kristen at tummy.com
Tue Jan 22 11:14:04 MST 2008


On Thu, Jan 17, 2008 at 04:50:35PM -0600, Jonathan Wilson wrote:
>
>Rules are evaluated from highest priority to lowest. Multiple rules can exist 
>at the same precedence. The highest precedence rule determines the action 
>taken.
>
>I think this means that I could:
>
>1. Create a lowest priority rule that "rejects" every email address. 
>I'm no good at regexp, would that simply be   regex:*@*.* ?

In a regular expression, the * matches 0 or more of the preceding
pattern, so it wouldn't make much sense to have a * at the beginning
of the line.  Probaly the simplest regex to use for rejecting all
addresses would be:

        regex:.*

where the '.' matches any single character except newlines.  And with
the '*' after it, it'll match any character before it 0 or more times
no matter what the character.

>2. Create additional higher priority rules that "accept" email from 
>specific addresses.

These would be something like:

  regex:.*@example\.com which will match any string which ends in
  "@example.com"
and
  regex:.*@somethingelse\.net which matches any string which ends in
  "@somethingelse.net"

and so on.

If you're just wanting to whitelist a single email address, it's 
not necessary to use regular expressions.  You could just whitelist 
email from, say, user at example.com

A good place to find more info on regular expressions is:

http://en.wikipedia.org/wiki/Regular_expressions

>And that would give me a perfect whitelist-only system for that 
>specific account. Is this correct or am I looking at it wrong?

It sounds like you've got the idea.

>What is the correct regexp to match all email addresses?

        regex:.*

Thanks,
Kristen

>Thanks,
>
>	JW
>_______________________________________________
>vPostMaster mailing list
>vPostMaster at lists.tummy.com
>http://lists.tummy.com/mailman/listinfo/vpostmaster


More information about the vPostMaster mailing list