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
To: amavis-user@lists.sourceforge.net

Helga,

> 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 = (
{ user.one@example.com => 0,
  user.two@example.com => 0,
  .example.net => 0,
  .example.org => 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(
    User.One@example.com
    User.Two@example.com
    .example.net
    .example.org
   )},
  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.

  Mark

------------------------------------------------------------------------------
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.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot org