1

---------

The following symbolic constants can be used in $final_spam_destiny:

Disable notification mails for quarantined mails

Does it work if you add two more options inside all '$policy_bank' blocks?

warnbannedrecip = 0,          # 1 enable warnbannedsender =0,       # 1 enable

notification mails for quarantined mails

To avoid sender or recipient warning notifications, you must set

$final_banned_destiny     = D_DISCARD;  #discard mail without notifying anyone

instead of

$final_banned_destiny     = D_REJECT;  #reply to sender and recipient with a warning notification

iiii

Hard sender whitelists and blacklists

amavisd can maintain whitelists and blacklists of message senders. It uses a message's envelope address (the one provided in the SMTP MAIL FROM command) as the sender address. Whitelisting ensures that amavisd will allow mail from a whitelisted sender to continue to its intended recipients; blacklisting ensures that amavisd will treat mail from a blacklisted sender as spam.

As with other amavisd address-matching features, you can specify addresses to globally whitelist:

You can use a similar set of variables for globally blacklisting senders. The array is @blacklist_sender_maps.

The default amavisd.conf defines $blacklist_sender_maps as shown below. Many username patterns typical of spammers are blacklisted, such as investments; many addresses of well-known security and vendor mailing lists are whitelisted.

Default blacklist entries in amavisd.conf

$blacklist_sender_re = new_RE(

   qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou|greatcasino)@'i,

   qr'^(investments|lose_weight_today|market.alert|money2you|MyGreenCard)@'i,

   qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonlsmoking2002k)@'i,

   qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i,

   qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i,

   qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i,

);

Soft sender whitelists and blacklists

Instead of hard black- or whitelisting, a softer approach is to add score points (penalties) to the SpamAssassin score for mail from certain senders. Positive points lean towards blacklisting, negative towards whitelisting. This is much like adding SpamAssassin rules or using its white/blacklisting, except that here only envelope sender addresses are considered (not addresses in a mail header), and that score points can be assigned per-recipient (or globally), and the assigned penalties are customarily much lower than the default SpamAssassin white/blacklisting score.

@score_sender_maps = ({

  '.' => [  # the '.' matches any recipient

   new_RE (

      [qr'.*@akadia.com$'i         => -10.0],

      [qr'.*@swisscom\.com$'i      => -10.0],

      [qr'.*@sicap\.com$'i         => -10.0],

      [qr'.*@glue\.ch$'i           => -10.0],

      [qr'.*@\.*\.admin\.ch$'i     => -10.0]

   )

  ]

});

-----------