Rick Romero wrote:
On Mon, 2006-08-07 at 20:42 +0100, Dave Hatton wrote:
I use dovecot as a backup mail store and would now like to purge all mails over a certain age.
Just your folder? I have a cron job for a user with a Treo that does a broken pop and delete:
00 02 * * * /usr/bin/find
/usr/local/vpopmail/domains/domain/username/Maildir/new -mtime +4
-exec rm -f {} \;
I'm doing something similar, but I'm searching "Maildir/cur" not "Maildir/cur".
From my understanding, the mail "server" (MTA, LDA, ...) is supposed to deliver new mail to "Maildir/new", and once a mail client has seen the mail, it'll get moved to "Maildir/cur".
As such, deleting files from "Maildir/new" will only delete new, unread messages, which sounds dangerous!
Of course, perhaps not all software that manipulates Maildir follows the move-from-new-to-cur rule...