[Dovecot] Deleting messages from MailDir

Bill Cole dovecot-20061108 at billmail.scconsult.com
Wed Feb 13 01:43:21 EET 2008


At 10:45 PM +0100 2/12/08, Rody  imposed structure on a stream of 
electrons, yielding:

>The opinions vary slightly when it comes to using mtime or ctime. I've chosen
>ctime because i believe using mtime will not garantee that there aren't any
>mails left which are actually older than 30 days. I believe there are cases
>where mtime may get changed, where ctime will not. Also, ctime starts
>counting from the moment the mail gets dropped in a certain mailbox.

Yes, but you may also care that ctime is reset when a client has 
Dovecot move a message from one subfolder to another within a 
Maildir. I'm not sure why Dovecot does it, but a look at the messages 
in the non-INBOX parts of my Maildir reveals that the ctime is always 
later than the mtime, and the contents (Received headers) makes it 
clear that Dovecot sets the mtime of messages to the original mtime 
(i.e. original delivery time) when copying them.

Hopefully Timo will speak up on this, but I have a vague recollection 
of him saying that Dovecot never modifies message contents as a 
matter of principle, and it seems to me that the design of Maildir 
assumes that the mailstore server follows that principle rigorously. 
That should make mtime quite static for an individual file, and it 
looks to me like Dovecot even makes an effort to preserve the 
delivery time of a message by replicating the mtime from the original 
file to the new one when copying a message between subfolders.


-- 
Bill Cole
bill at scconsult.com



More information about the dovecot mailing list