Nikolai Lusan <nikolai@lusan.id.au> writes:
Reading over David's and various schemes, the tricky part is consistency: avoiding race conditions where you have the user manipulating their mailboxes and your MTA/LDA delivering mail, while simultaneously doing mbox->Maildir conversion.
To guarantee consistency, it's necessary to lock out other avenues of mbox changes while the conversion takes place. Otherwise, you'll have the situation where mail can get duplicated, or worse, deleted. For example, think of this sequence: convert B, user moves message A->B, convert A.
I think the safest is method is
1) Deny the user access to IMAP/POP: deny
userdb/passdb, or lock their password
and flush their auth cache entry.
2) TEMPFAIL MTA delivery to user during conversion
3) Kick the user
4) Do the conversion
5) Undo 1+2
If you have a smart conversion script (one that recognizes changes and only do delta updates) you can greatly speed up step 4 and minimize outage time.
0) Do an initial conversion that will do the bulk of the work
but does not guranatee consistency.
Joseph Tam <jtam.home@gmail.com>
participants (1)
-
Joseph Tam