On Tue, 25 Feb 2003, Jesper Toft wrote:
>On Tuesday 25 February 2003 11:42, Andreas Aardal Hanssen wrote:
>> On Tue, 25 Feb 2003, Jesper Toft wrote:
>> >When copying mails from one folder to an other, they become unread, even
>> > if marked as read in the source folder.
>> The messages must be copied to the new/ folder of the destination mailbox,
>> and the only way to safely set the \Seen flag (or any other flags) is to
>> move the message into cur/ after one whole second has lapsed. It's not
>> impossible, quite doable, that COPY waits for one second after completion
>> to be able to move the messages into place. But it messes up the code so
>> much that I'm likely to keep it that way.
>And there is no way to set flags in new/ or simply copy "seen" mails into cur/
>?

1) flags in new - no, if Binc did that then mails would disappear.
2) every message that is delivered to a Maildir _must_ live in new/ for
   one whole second first, or mails would disappear.

>> >A quick test ( copying 2000 emails ) showed that my mailsetup was able to
>> > copy at least 200 emails pr. sec. couldnt this be a problem on a bigger
>> > setup?
>> Yes, you're right. Does anyone have any good suggestions here?
>I was about to send a patch with INT_MAX.

I think we should extend the unique middle section of the file name with
some of the suggestions from the latest maildir(5), then check very
closely that we catch all error conditions, then loop as you say to
INT_MAX. The counter that we use should persist through consecutive COPY
commands, to increase the probability to find a unique name fast.

I think adding microseconds to the unique part will help a lot to reduce
the number of iterations. :-)

Andy

-- 
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP    | Nil desperandum

Reply via email to