Garry,
To answer the second part first, the package from Layer1 should have created ajob in your root crontab to run a check on whether MailScanner is running, and if not start it. It should look something like:
Code:
*/10 * * * * /usr/mailscanner/bin/check_mailscanner > /dev/null 2<&1
For the first part. If you'd done the install of MailScanner from source it would have created the following file that cleans your quarantine directory for you. You should create this, as root, in /etc/cron.daily/clean.quarantine
Code:
#!/usr/bin/perl
#
# IMPORTANT NOTE:
#
# Change the next line to 0 instead of 1 to enable this script.
# By default it will be disabled and will not do anything.
#
$disabled = 0;
$quarantine_dir = '/var/spool/MailScanner/quarantine';
$days_to_keep = 30;
exit if $disabled;
# Standardise the format of the directory name
die 'Path for quarantine_dir must be absolute' unless $quarantine_dir =~ /^\//;
$quarantine_dir =~ s/\/$//; # Delete trailing slash
# Now get the content list for the directory.
opendir(QDIR, $quarantine_dir) or die "Couldn't read directory $quarantine_dir";
# Loop through this list looking for any *directory* which hasn't been
# modified in the last $days_to_keep days.
# Unfortunately this will do nothing if the filesystem is backed up using tar.
while($entry = readdir(QDIR)) {
next if $entry =~ /^\./;
$entry = $quarantine_dir . '/' . $entry;
system("rm -rf $entry") if -d $entry &&
-M $entry > $days_to_keep;
}
closedir(QDIR);