[Dovecot] Same filenames on different servers?

Alexander Chekalin achekalin at lazurit.com
Mon Jan 11 14:18:07 EET 2010


Oh, I finally find out the problem. If Dovecot see in the IMAP mailbox 
two message files named equally (say in cur/ and new/ dirs) it renames 
one of them into new name dispute this is the same message.

I'm not sure if this is intended behaviour. It is quite easy to see such 
situation when doing periodical rsync (SMTP put message to new/ dir, 
then rsync copy it to second server, then message on the first server 
move to cur/, and second rsync results in two files on second server).

It there any workaround?

Yours,
   Alexander Chekalin

04.01.2010 18:41, Timo Sirainen wrote:
> On 4.1.2010, at 15.32, Alexander Chekalin wrote:
>
>> The problem is that files in Maildirs on First server are named like that:
>>
>> 1262610335.H798006P5447.first.domain.my,S=1962:2,
>> 1262610402.H529761P5596.first.domain.my,S=2975:2,
>> 1262610410.H787724P5657.first.domain.my,S=75691:2,
>> ...
>>
>> and the files on Second server should be named like
>>
>> 1262610335.H798006P5447.second.domain.my,S=1962:2,
>> 1262610402.H529761P5596.second.domain.my,S=2975:2,
>> 1262610410.H787724P5657.second.domain.my,S=75691:2,
>
> No, they shouldn't. The maildir filename must be globally unique. Otherwise it doesn't matter what it is. Just keep them as they are.
>
> The main problem with rsync is going to be if two servers have the same filename, but one has renamed its flags. So there are two identical base filenames but with different flags. Then Dovecot will log a warning about duplicate message and rename one of the files.
>



More information about the dovecot mailing list