scanner / asimap

Pure python based IMAP server with a MH based file store
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

GH-245-use-tempdir-for-copy-operation #247

Closed scanner closed 4 months ago

scanner commented 4 months ago

basically copy the files to a temp dir before copying them to the destination. Also update the doctext to reflect that we do not nest read locks on both mailboxes.

Also only the write operations to the dest folder lock a mailbox for write, so batch that in batches of 10 messages at a time so other parts of the system can still access the destination mailbox. Previously if we were, say, deleting 1,000 messages we would lock the destination mailbox for write until all 1,000 messages were added to it. This should be a bit nicer.

Fixes GH-245