Merging maildirs

Petter Gunnerud pgspm at yahoo.no
Thu Aug 27 14:26:48 UTC 2015


Hi List
How do I merge files from one maildir into another maildir?

Long version:
I've been using dovecot/postfix for a 12 user environment for several years, and today was the first time I ran into an issue I could not solve from reading the documentation.

The server is gentoo running on esxi.
A few times a year I've made a snapshot of the server and copied the files to my home esxi server as a full system backup.

5 days ago the internet connection at the office broke, and I decided to power on the last copy of the server at my home and change public dns so that users could access their new mails via webmail from this spare server. (I didn't allow imap through firewall.)
Now the network at the office is back. DNS is updated so that mails are delivered to the office server again. But all the mails sent / received during those 5 days is only at my house. How can I merge those into the office server?I'd like to do this as a server administrator. I do not want to have each user forward the mails to them self from the temporarily webmail.
I tried to just copy the mail files on my own account - like I did once when I used courier-imap, but that did not work with dovecot.
I hope someone has an idea of how to solve this.


More information about the dovecot mailing list