[Dovecot] dsync mbox to maildir migration does not delete, deleted e-mails
A M
ammdispose-dovecot at yahoo.com
Wed Jan 15 07:08:25 EET 2014
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)
1) keep dovecot running (with mail_location as mbox)
2) dsync for all users (this may take 3-4 hours or more)
3) (downtime starts) stop dovecot and sendmail (to stop new e-mails)
4) block pop3, imap ports on firewall (so users can not connect)
5) start dovecot (still with mbox)
6) dsync again to sync e-mails arrived between step 2 and 3
7) dsync again (just to make sure!)
8) (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
More information about the dovecot
mailing list