31 Jan
2019
31 Jan
'19
11:54 p.m.
Tamas Hegedus, 29.01.19:
- Configuration uses mail_location = mbox:~/mails
- setup per-user mail location and do for each user individually in a serial manner: -- doveadm sync maildir:~/Maildir; mbox is synced to Maildir, long running time [1] -- doveadm sync maildir:~/Maildir; rerun to do it for new messages (fast) -- add USER to userdb and set extra field to maildir:~/Maildir users not present in the userdb should default to dovcot default; [2] the conditionally optional: doveadm auth cache flush
More or less how I would plan a migration, but to be fanatically safe and avoiding race conditions where a user could be manipulating their mailbox or new having mail delivered, I would put some service mutex between [1] and [2].
By that I mean at [1]
a) tempfail any incoming mail for that user; and
b) kick the user off IMAP/POP and make sure they can't log back
in during the final synching. (Add them to separate deny userdb?)
After the final sync [2], undo these steps.
Joseph Tam <jtam.home@gmail.com>