0

Script – Purge spam folder

Posted by admin on Jun 18, 2009 in Scripts

#!/bin/bash
#This example is for a linux server using the following directory stucture to store email
#/home/unix-username/mail/domain/email-username/Maildir/.INBOX.spam/(cur | new)
#the following command will find all spam messages system wide overĀ 14 days old and remove them
/usr/bin/find /home/*/mail/*/*/Maildir/.INBOX.spam/*/ -type f -ctime +14 | xargs /bin/rm -f
#-ctime n*24 hours
#-cmin n minutes
#-ctime +7 = > 1 week

Tags: , , , ,

Copyright © 2012 BenMcGrail.com All rights reserved.
Hosted by: VitexOnline.com