Automated purge of deleted email items
Ian Petersen
ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Dec 15 21:07:47 UTC 2006
My personal mail server (qmail) stores all my email in maildir format.
I've set up an IMAP server (binc) on top of that.
In my scenario, deleted messages end up in $HOME/.maildir/Trash/cur if
they've been read, and they might end up in $HOME/.maildir/Trash/new
if they've not been read, but I can't confirm that bit.
Each message is a separate file so, if I wanted to accomplish the same
thing on my home server, I'd create a cronjob that used something like
find /home/*/.maildir/Trash/{new,cur} -type f -delete
possibly with some of the date modifiers to only remove files that are
more than N days old. If your version of find doesn't support -delete
(I think it's fairly new) you can either use
find /home/*/.maildir/Trash/{new,cur} -type f -exec rm \{\} \;
or
find /home/*/.maildir/Trash/{new,cur} -type f | xargs rm
whichever you prefer.
Of course, if your mail store isn't in maildir format, then I have no idea.
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list