Quarantine Directory

Jim Holland mailscanner at mango.zw
Fri May 5 17:40:07 IST 2006


On Fri, 5 May 2006, Kaplan, Andrew H. wrote:
 
> > Date: Fri, 5 May 2006 08:43:25 -0400
> > From: "Kaplan, Andrew H." <AHKAPLAN at PARTNERS.ORG>
> > Reply-To: MailScanner discussion <mailscanner at lists.mailscanner.info>
> > To: mailscanner at lists.mailscanner.info
> > Subject: Quarantine Directory
> > 
> > Hi there -
> >
> > I want to investigate the contents of the quarantine directory, and I need to
> > know what is the best way to do so. Any suggestions
> > will be welcome. Thanks.

It depends what you are looking for.

If you just want to know what messages have been stored there and why, 
start with the mail log:

	grep for: "Spam Actions:.*actions are store"
	extract the msgids, by using awk to extract the relevant field
	grep for the msgids in the log

If you want to examine particular messages, use your favourite viewer - 
mine is Midnight Commander.

If you want to browse the spam messages, then why not convert the mail
files into a dummy mailbox and then browse that:

cd <quarantine directory>
for file in *; do sed "s/^Return-Path:.*/From junk at junk.com Fri May  5 \
00:00 2006/" < $file >> mailbox ; echo >> mailbox; done

The above assumes that the quarantined messages all start with:

	Return-Path: <.g>

and then you can browse the mailbox with any mail utility you want, eg:

	mutt -f mailbox

Regards

Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service



More information about the MailScanner mailing list