Thanks Mark, it works fine!
----- Original Message -----
From: "Mark Martinec" <[EMAIL PROTECTED]>
To: <users@spamassassin.apache.org>
Sent: Thursday, November 22, 2007 11:56 PM
Subject: Re: quarantine and junkmailbox configuration
Morvan Daniel,
I use amavisd-new with spamassassin loaded as a perl module.
My actual config: /etc/amavisd/amavisd.conf:
$sa_tag_level_deflt = 2.0; # 2+ put X-Spam-Status headers only
$sa_tag2_level_deflt = 5.0; # 5+ put X-Spam-Flag = YES
$sa_kill_level_deflt = 8; # 8+ send to quarantine
$sa_quarantine_cutoff_level = 20; # 20+ send to /dev/null
I would like that messages classified from level 8 to 13 goes to a junk
mailbox ([EMAIL PROTECTED]) and only above goes to the quarantine!
What I need to add to my config to do that!
You actually want two levels of a quarantine, the first level to be
delivered to a mailbox, and the second level to a normal quarantine.
There is currently only one level of quarantining, but it is possible
to achieve the desired effect by putting a tag3_level to good use,
along with appending address extensions and a little help from a MTA:
$sa_tag_level_deflt = 2; # insert spam headers
$sa_tag2_level_deflt = 5; # let spam headers say YES, spam
$sa_tag3_level_deflt = 8; # by default no effect, but see below
$sa_kill_level_deflt = 13; # block mail and quarantine
$sa_quarantine_cutoff_level = 20; # suppress quarantine above that level
$recipient_delimiter = '+';
# here is a little tricky part: turn on address extensions at tag3_level
$addr_extension_maps_by_ccat{CC_SPAMMY.',1'} = ['junk'];
So in addition to your previous behaviour, the range of spam scores
between 8 and 13 will still pass on (with spam headers added), but will
also have recipient addresses modified to include a '+junk' at the
end of a local part, e.g.: [EMAIL PROTECTED] -> [EMAIL PROTECTED]
Note that only recipients in local domains receive this treatment
(i.e. inbound and internal mail), so make sure to have local_domains
configured correctly.
The rest is up to a MTA to decide what to do with an address extension
'+junk' - to ignore it, or to deliver it to a user's dedicated mailbox,
or to rewrite it to some common junk mailbox such as
[EMAIL PROTECTED]
To achieve the later with Postfix, tell it the extensions delimiter is a
'+'
and add a virtual map which will rewrite [EMAIL PROTECTED]
into [EMAIL PROTECTED] For example:
main.cf:
recipient_delimiter = +
virtual_alias_maps =
cdb:/etc/postfix/virtual
pcre:/etc/postfix/virtual_mapping_pcre
/etc/postfix/virtual_mapping_pcre :
/^(.*)\+junk@(example\.com)$/ [EMAIL PROTECTED]
Followups (if any) to amavis-user mailing list please.
Mark