"John T. Settino" <[EMAIL PROTECTED]> writes:

> Any advice as to how to access this motherload of spam and/or how to
> delete it would be most appreciated. Also advice on filtering.

I use the following cron job to clean my Spam and other unimportant mail
folders periodically.

Attachment: pgpxA1GqhXt11.pgp
Description: PGP signature

#!/bin/bash

# Clean spam articles and comments from my email that are more 14 days
# old.

PREFIX=/afs/hcoop.net/common/email/m/mw/mwolson

BOTH_FOLDERS=".Archive .Spam.Definitely"
CUR_FOLDERS=".Comments .Lists.Admin .Spam.Probably .Test .Work.Boring"
SIXMONTHS="$PREFIX/.Local*"

# Set to "y" to debug
DEBUG=

function clean () {
    test -n "$DEBUG" && echo Cleaning $1 ...
    find $PREFIX/$1 -mindepth 1 -maxdepth 1 -type f -ctime +14 -delete
}

function clean_sixmonths () {
    test -n "$DEBUG" && echo Cleaning $1 ...
    find $1 -mindepth 1 -maxdepth 1 -type f -ctime +180 -delete
}

for i in $BOTH_FOLDERS; do
    clean $i/cur
    clean $i/new
done

for i in $CUR_FOLDERS; do
    clean $i/cur
done

for i in $SIXMONTHS; do
    clean_sixmonths $i/cur
done

test -n "$DEBUG" && echo Done.
-- 
Michael Olson
HCoop System Administrator
http://hcoop.net/
_______________________________________________
HCoop-Help mailing list
[email protected]
https://lists.hcoop.net/listinfo/hcoop-help

Reply via email to