Problem syncing mail - crash

Vincent Beffara vbeffara at
Tue Aug 9 10:11:30 BST 2011

cc> I mentioned keeping the local copy because we don't have a
cc> lock/mutex on the remote mailbox-- it's being accessed
cc> non-exclusively, so this allows a race condition to take place.
cc> Another concurrent user of the mailbox could delete the message
cc> between the time we APPENDed the message, and tried to get the UID
cc> (and received a 0... indicating UID missing/not found).

Sound a bit unlucky, but sure, it could happen ...

cc> So the assumption about the message absolutely existing on the
cc> server and to ignore the 0 UID, could be incorrect... right?

... except, this delete would be synced the next time anyway, so we
would have to delete the message in any case. We can probably assume
that offlineimap is by default intended to be run many times in a row,
if someone wants to use it as a one-time sync tool (where indeed the
race condition could hurt), they will typically make sure that no other
client is accessing their mailbox, won't they ?


|                 |   UMPA - ENS Lyon   | Mél: vbeffara at |
| Vincent Beffara |  46 allée d'Italie  | Tél: (+33) 4 72 72 85 25  |
|                 | 69364 Lyon Cedex 07 | Fax: (+33) 4 72 72 84 80  |

More information about the OfflineIMAP-project mailing list