Order in which UIDs are assigned..

Timo Sirainen tss at iki.fi
Sat Oct 17 08:16:06 UTC 2015


On 17 Oct 2015, at 10:24, Akash <akbwiz+dovecot at gmail.com> wrote:
> 
> Hi,
> 
> I just want some clarification on how Dovecot's IMAP assigns UIDs when it picks files from the "new" directory of a Maildir. What I am observing is that only ctime has a role to play in it. For example if there are two files in "new", a.msg & z.msg. Even when a.msg has lower mtime than z.msg and "a" comes before "z" alphabetically, dovecot will assign z.msg a lower UID if its ctime is lower than a.msg. Is this correct?

Dovecot doesn't look at the new files' mtimes or ctimes, because that would require stat()ing the file, which slows it down. So it's using the timestamp in the Maildir filename itself.

> Secondly, when mails are placed into Maildir through a external mechanism by-passing LDA, by any means is it possible for IMAP to run seive on it when it migrates the files from new to cur and indexes them? I understand that this might not be a valid question as mail is delivered already so there is nothing to filter :-)

Not easily. There is http://wiki2.dovecot.org/HowTo/RefilterMail



More information about the dovecot mailing list