Liu Shuai wrote:
Hi all,
I want to set up a system wide cron job that deletes old (2 weeks maybe) tagged spam from each user's spam folder, but I am not sure how.
Does anybody here has a script that does similar job that I can use as a reference? If not, can some one give me some direction? I assume I need a parser that will parse each user's spam folder so that I can retrieve the date of each message?
Any suggestion will be appreciated.
Hi,
I don't have one in use right now but something similar to
find . -path "*Maildir/.SPAM*" -ctime +14 -type f | xargs rm
would be a good place to start. Be warned that the above will also catch things like Maildir/.SPAM/maildirfolder, Maildir/.SPAM/courierimapuiddb.lock, /Maildir/.SPAM/sqwebmail-curcnt etc so it would probably need to be tuned to ignore files not in a cur or new directory.
Regards,
Rick
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk