MailScanenr based relay server

Eric Dantan Rzewnicki rzewnickie at RFA.ORG
Thu May 13 01:28:54 IST 2004


On Wed, May 12, 2004 at 12:25:53PM -0700, JD wrote:
> If mailscanner is left alone, will it eventually utilize all of the disk
> space and run out? which areas besides the quarantine does mailscanner use
> disk space?
> -JD
> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> Behalf Of Eric Dantan Rzewnicki
> Sent: Thursday, April 22, 2004 11:43 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: MailScanenr based relay server
> check these out:
> cat /proc/cpuinfo
> w
> free
> uptime
> top
>
> -Eric Rz.

The archive, if you're using it, will eat disk space.

I use a simple script (see below) to manage my archive and quarantine.
It's probably not the best script, but should give the general idea.

You can also keep the size of your quarantine from getting out of hand
by setting "Quarantine Infections = " to a ruleset like this:
# infections.quarantine.rules
Virus:  mydoom      no
Virus:  netsky      no
Virus:  default     yes

So you don't save the most prodigeous mass-mailling viruses. Of course,
this only helps after they've been identified.

-Eric Rz.


#!/bin/bash
#
# /usr/local/sbin/arch-quar-clean.sh
# script to be run nightly by cron
# cleans old MailScanner archive and quarantine
#
# rzewnickie at rfa.org

archive_dir=/var/spool/MailScanner/archive
quarantine_dir=/var/spool/MailScanner/quarantine
date=`date +%Y%m%d`
arch_del_date=`date -d "8 days ago" +%Y%m%d`
quar_del_date=`date -d "22 days ago" +%Y%m%d`

# manage archive
touch $archive_dir/$date
chown postfix.postfix $archive_dir/$date
chmod 600 $archive_dir/$date
rm -f $archive_dir/today
ln -s $archive_dir/$date $archive_dir/today
rm -fr $archive_dir/$arch_del_date
# manage quarantine
rm -fr $quarantine_dir/$quar_del_date

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list