amavis-user October 2010 archive
Main Archive Page > Month Archives  > amavis-user archives
amavis-user: Re: [AMaViS-user] Bypass spam check for most recipi

Re: [AMaViS-user] Bypass spam check for most recipients

From: Mark Martinec <Mark.Martinec+amavis_at_nospam>
Date: Wed Oct 06 2010 - 14:16:31 GMT


> Is there a way to bypass spam checks for all recipients except those
> who explicitely opt for spam checking ?

Sure, use a catchall of true in bypass_spam_checks, and list
exceptions with a value of false in this same lookup table.
Lookups can be either in SQL, LDAP, or statical.

Here is an example using a hash as a lookup table
(recipients must be in lowercase):

@bypass_spam_checks_maps = @spam_lovers_maps = (
{ => 0, => 0, => 0, => 0,
  . => 1, # everyone else bypasses spam checks

or perhaps more conveniently (entries lowercased by lc() ):

@bypass_spam_checks_maps = @spam_lovers_maps = (
  { map {lc $_ => 0} qw(
  1, # everyone else bypasses spam checks

> I don't think it's a good idea maintaining a whitelist with 10000 members.
> What I'm looking for is something like:
> map { $NO_bypass_spam_checks{lc($_)}=1 } (qw ......

Btw, whitelisting works on sender address,
bypass* and *lovers* works on recipients.


Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
AMaViS-user mailing list
 Please visit regularly
 For administrativa requests please send email to rainer at openantivirus dot org