On Tue, Aug 10, 2010 at 10:11:35AM +0100, Chris G wrote:
There is a sort of logic to what python does, one *might* be deleting or adding a message into the middle of the mbox in which case the copy, rename sequence is the only sensible way to do it. However the documentation might have told me that and I'd not have wasted lots of my (and the list's) time trying to work out what was wrong.
When Mutt needs to delete a message out of the middle of a mbox, it does not replace the file at all. Instead, all the messages after the deleted one are first copied to a temporary file, then mutt truncates the file at the start of the deleted message, then copies the remaining messages from the temporary file back into the same open file. Another open Mutt will still get the "flags may be wrong" error in this case, because mbox has no easy way of matching up messages (message-ids may not be unique).
me
