> On 17 Oct 2015, at 11:44, Akash <akbwiz+dove...@gmail.com> wrote:
> 
>> 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.
> 
> Thanks Timo for the clarification. Whats Dovecot's strategy when the 
> file-name does not contain a time-stamp and its just a sequential long number 
> such as 1494829006737776656.

If it's less than 64 bits number and Dovecot is compiled as 64bit binary, I 
guess it should work. Otherwise it gets more or less random:

http://hg.dovecot.org/dovecot-2.2/file/17aac21b303d/src/lib-storage/index/maildir/maildir-filename.c#l117

> My problem is that I am manually copying a lot of mail into the "new" 
> directory of a Maildir. The file names range from: 1280369043768241070 - 
> 1514890738113019895 but Dovecot is always assigning first UID to the mail in 
> the file 1494829006737776656. And I am failing to understand why. I tried 
> this 3-4 times using different ways. First by simply hard linking the files 
> into "new" dir, second by copying them over, third by copying and then 
> touching the file in a way that lower in sequence has a lower mtime, fourth 
> by copying them into "new" in proper ascending sequence (according to file 
> name) and then giving them appropriate mtime related to their sequence. But 
> no matter what i do, Dovecot assigns first UID to file 1494829006737776656 
> only.

I guess you have 32bit Dovecot.

Reply via email to