From f20f411182d1bc585122be559b56be65c35df1a7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 24 Aug 2003 09:31:35 +0300 Subject: [PATCH] comment update --HG-- branch : HEAD --- src/lib-index/maildir/maildir-sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib-index/maildir/maildir-sync.c b/src/lib-index/maildir/maildir-sync.c index 0bcc30b5bb..b454fba7c8 100644 --- a/src/lib-index/maildir/maildir-sync.c +++ b/src/lib-index/maildir/maildir-sync.c @@ -132,12 +132,14 @@ for example include microseconds in it which Dovecot does. There's a simple way to prevent this from happening in some cases: - Don't move the mail from new/ to cur/ if it's mtime (it's included - in beginning of file name, so stat() isn't needed) is >= time() - + Don't move the mail from new/ to cur/ if it's mtime is >= time() - MAILDIR_SYNC_SECS. The second delivery's link() call then fails because the file is already in new/, and it will then use a different filename. There's a few problems with this however: + - while it's usually possible to read the mtime from beginning of + the file name, it is against the Maildir specs. stat()ing the + file then makes syncing slower. - another MUA might still move the mail to cur/ - if first file's flags are modified by either Dovecot or another MUA, it's moved to cur/ (you _could_ just do the dirty-flagging -- 2.47.3