Hello,
I am planning to migrate all users from mbox to maildir.
I am trying to do it with minimum downtime. (~100GB data)
All users are currently using POP3.
Dovecot version is 2.2.10 (latest). Command used is: dsync -u username mirror maildir:~/Maildir
Process I plan is: (omitting steps related to sendmail / procmail)
keep dovecot running (with mail_location as mbox)
dsync for all users (this may take 3-4 hours or more)
(downtime starts) stop dovecot and sendmail (to stop new e-mails)
block pop3, imap ports on firewall (so users can not connect)
start dovecot (still with mbox)
dsync again to sync e-mails arrived between step 2 and 3
dsync again (just to make sure!)
(downtime ends) restart dovecot (with mail_location as maildir)
Now, here is my problem.
Lets say there is user joe, who has 50 NEW e-mails in mbox (INBOX).
Step 2 perfectly syncs his 50 e-mails to 'new' folder of maildir.
Now in the mean time, before step 3, he connected via POP3 and downloaded and deleted 50 e-mails.
Now when we reach step 6 (re-sync), what I expected was dsync will detect that 50 e-mails are deleted and it will delete 50 e-mails from 'new' directory of maildir.
But that is not happening. 50 e-mails are still there.
I fear that these e-mails will be re-downloaded on his Outlook once I switch dovecot to maildir.
This will happen for each and every user which will cause huge mess.
So how to tell, dsync to delete non-existent e-mails which are no more there in mbox (INBOX)?
Thanks in advance,
Regards,
A M