#!/bin/bash # age_spam_quarantine - Remove quarantined messages older than a specified number of days. # Steve Pellegrin (spellegrin at convoglio dot com) # # History: # 1.0 2005-January-1 Original code # 1.1 2005-February-3 Works with large, domain or standard # # Usage: # age_spam_quarantine DAYS=33 # Messages left in quarantine older # than this many days will be deleted. DATA=~dspam/data # DSpam data directory ARCHIVEMAIL="/usr/bin/archivemail" # Path to utility # For each user mailbox... for mbox in `find ${DATA} -follow -name *mbox` do if [ -s $mbox ]; then # Tell archivemail to remove the messages. ${ARCHIVEMAIL} --days=${DAYS} --delete --include-flagged --quiet $mbox fi; done