Alan Munday wrote:

Tried posting a variation of this to the amavis list earlier, as I had no response I thought I'd try here.

I'm currently configuring my 1st install of amavisd-new, and while I'm setting up and testing I would like to be able to send a copy of all mail that is scanned by SA to be saved into a local mbox or quarantine directory.
I wish to check what is being passed as clear, marked as spam as well as checking what is canned and put into the quarantine dir.


I'm not sure if this is exactly what you want, but you can ask amavisd to 1) tag all emails as spam, 2) put a copy of the emails into a particular directory, and 3) pass the emails on. The reason for (1) is that amavisd has no option to save a copy of email that is not considered spam. You would then be able to look through the quarantine and see what the SA score is for each email.

For (1), use the line:
$sa_kill_level_deflt = -999;

For (2), use:
$QUARANTINEDIR = '/path/to/spamquarantine/';
$spam_quarantine_method         = 'local:spam-%b-%i-%n';

And for (3), use
$final_spam_destiny       = D_PASS;

You will also want to comment out the line that starts "$sa_mail_body_size_limit" if you want SA to scan large emails as well, otherwise they will not be tagged and quarantined.

The expected results of this, as I say, is that ALL emails will be tagged as spam; will have SA headers inserts; will have a copy placed into the the quarantine folder; and finally will be passed on back to the MTA for delivery. This should suffice for the type of testing you want to do. Anything more complicated and you will need to use your MTA to help sort things out.

Kevin


Reply via email to