wildcards in whitelist
mikea
mikea at mikea.ath.cx
Thu Feb 15 18:40:36 CET 2007
On Thu, Feb 15, 2007 at 11:10:35AM -0600, Michael Masse wrote:
> I tried looking in the EXAMPLES file and I'm not quite clear on the best
> way to use wildcards within the spam whitelist. What I'm trying to
> do is whitelist all subdomains of a certain domain. ie.:
>
> sub1.domain.com
> sub2.domain.com
> etc...
>
> Would it be better to have:
> @*.domain.com or
> *.domain.com
>
> or does it make any difference?
I think it does. Typically, I'll use whitelist entries in this form:
FromOrTo: *@domain.com yes
to catch the case in which good mail comes directly from domain.com,
and
FromOrTo: *@*.domain.com yes
for cases in which all subdomains send good mail.
If I know that certain subdomains are good and the rest are bad, I'll
write rules using regular expressions to fail the bad 'uns and pass
the good 'uns:
FromOrTo: *@(bad1|bad2|bad3).domain.com no
FromOrTo: *@*.domain.com yes
for the case where we know all the bad senders, and
FromOrTo: *@(good1|good2|good3).domain.com yes
FromOrTo: *@*.domain.com no
or
FromOrTo: *@good[0-9].domain.com yes
FromOrTo: *@*.domain.com no
for the case in which we know all the good senders.
Obviously you'll need to tailor the regular expressions to fit _your_
situation.
In all the rules above, I've used tabs for whitespace.
--
Mike Andrews, W5EGO
mikea at mikea.ath.cx
Tired old sysadmin
More information about the MailScanner
mailing list