[Dovecot] Deleting messages from MailDir

Rody rody at xs4all.nl
Wed Feb 13 02:10:41 EET 2008


From what i have seen, you're absolutely correct. It looks like the use of 
ctime or mtime depends on wether you want the message removed x days after it 
was moved to say the trash folder (ctime) or will be removed x days after it 
originally arrived in the inbox (mtime). My personal opinion is currently 
that i would like it removed x days after it was placed in a certain folder, 
hence i use ctime.

Rody

Op woensdag 13 februari 2008 00:43, schreef Bill Cole:
> 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.


More information about the dovecot mailing list