[Dovecot] Maildir files with mtime in the future

Holger Weiss holger at CIS.FU-Berlin.DE
Fri Apr 3 02:14:47 EEST 2009


* Timo Sirainen <tss at iki.fi> [2009-04-02 18:44]:
> On Thu, 2009-04-02 at 19:36 +0200, Holger Weiss wrote:
> > | If a date-time is specified, the internal date SHOULD be set in the
> > | resulting message; otherwise, the internal date of the resulting
> > | message is set to the current date and time by default.
> > 
> > [ ftp://ftp.fu-berlin.de/doc/rfc/rfc3501.txt (6.3.11. APPEND Command) ]
> > 
> > However, if the client does so, Dovecot will set the mtime of the
> > Maildir file in question to the date specified by the client even if
> > it's in the future.  Since files with an mtime in the future can cause
> > all sorts of trouble (e.g., they might get backed up repeatedly by
> > incremental backups), it would be nice if Dovecot would (optionally?)
> > use the current time if the client specifies a time in the future.  
> 
> Hmm. I don't really like violating a SHOULD.

Maybe the reason why this is not defined as a MUST is that the server
needn't accept obviously incorrect dates :-)

> I wonder how big of a problem this actually is. Are people often backing
> up based on mtime?

I'd guess most backup software will include files with an mtime newer
than the time of the previous backup in incremental backups.  At least,
Bacula[*] and Veritas NetBackup do it that way.

> > For example, we use the following patch:
> 
> This is a problem only with Maildir, so if the code is added it should
> go to maildir-save.c.

The mtime-problem is Maildir-specific, but an INTERNALDATE in the future
is obviously incorrect in any case.

Holger

[*] See: http://www.bacula.org/manuals/en/install/install/Configuring_Director.html


More information about the dovecot mailing list