On Tue, 2010-01-26 at 13:36 +0100, Johannes Grimm wrote:
Hi, this is a snip from the original http://wiki.dovecot.org/MailboxFormat/Maildir
"....with maildir the filename changes every time the message's flags change...."
Only if you "do" something with a mail (like deleting) the filename and modified date will change.
No, file's ctime changes when you change flags. mtime never changes. But mtime can't really be trusted. An IMAP client can save a new messages with INTERNALDATE set to 10 years ago, and the file's mtime will be from 10 years ago. Or just copying a message to another mailbox preserves the mtime.
If you want to delete mails of a certain age you can you use either the Dovecot Xxpunge plugin or a cronjob with a command like:
find /home -mtime +30 -name *,ST -exec rm {} \;
I'd use -ctime.