[Dovecot] Are Mail files in /Maildir/cur & /Maildir/.Sent read-only ?

Timo Sirainen tss at iki.fi
Tue Jan 26 14:47:10 EET 2010


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100126/77cc7613/attachment.bin 


More information about the dovecot mailing list