Amavis-new Quarantine Release

Mostly notes for myself on how to release mail from the Amavis Mail Quarantine. To do this you need to know the layout of your quarantine, have AM.PDP enabled by Unix Socket in the Amavis-new deamon and have the mail id.

Enable AM.PDP, is quite simple, use the following code in amavisd.conf:

$policy_bank{'AM.PDP-SOCK'} = {
  protocol => 'AM.PDP',  # Amavis policy delegation protocol
  auth_required_release => 0,  # don't require secret_id for amavisd-release
};

Note auth_required_release is 0 (False) for me, because my mail server is not accessible by normal users, not only that buy my amavis socket is walled of by regular unix file permissions for any user but the mail admin user. Once you have added this code run

amavisd reload

To restart amavis-new.

Using amavisd-release requires knowledge of the amavis quarantine directories. These are customizable, so check first. If you don’t have the format right, amavis may return a cryptic error:

450 4.5.0 Failure: SQL quarantine code not enabled at (eval 63) line 340,  line 4.

Example:
If you break up quarantine types into buckets as I have:

$QUARANTINEDIR = "$MYHOME/quarantine";
$spam_quarantine_method           = 'local:spam/%m.gz';
$banned_files_quarantine_method   = 'local:banned/%m';

You have to pass the bucket (directory) name to amavisd-release:

amavisd-release spam/kAiuhY2-fB7x.gz
amavisd-release banned/UctrJo0mH2Wf

If other formats are used like ‘local:spam-%m’ use the name of your format. Look at your $*quarantine_method variables in amavisd.conf. Also don’t forget that cron job for removing quarantined mail after it is over a given age, find -ctime will do nicely.

NONE, NADA, ZIP, ZILCH

Why don't you pony up and be the first to add your comment?

Add your own comment...

plants