Bulk Import/Export?

I’m considering switching to Mail-in-a-Box from Google. I have an mbox file containing all my emails, an iCalendar file containing all my calendars, and a vCard file containing all my contacts.

Does Mail-in-a-Box support bulk importing and exporting of these files?

Also, does it support accessing email and calendars from an Android app?

  1. Export Calendar(s) in Google Calendar Web App
  2. Export Contacts in Google Contacts Web App (make sure to choose CSV OR vCard here)
  3. Setup a MIAB instance, make sure it’s IMAP port is accessible via the internet.
  4. Use ImapSync to sync your new MIAB mailbox with your google one (this is EMAIL only.) Folder creation is hit or miss but I’ve never had big issues.

Make sure perl is installed and use this: https://github.com/imapsync/imapsync

If you are not too technically savvy, you can try to use the web version of the tool:https://imapsync.lamiral.info/X/

Can this also be accomplished with doveadm sync?

I’d say yes, but I never used that tool before so test test test.

I have a friend who is working on setting up an MiaB failover server, and we were trying to figure out ways to synchronize the servers. After quite a bit of searching, I found doveadm is actually fairly well documented and can also be used for migrating mail servers, toos. We haven’t tested it yet, so I’m not comfortable providing any recommendations.

If you are using a second server as a legitimate failover (and not just something you are splitting users across) use rsync instead to sync two remote filesystems:

Here is an article on doing that, just change the variables etc for your environment:

The folder to sync here is /home/user-data.

So essentially, install miab on the new server (MAKE SURE ITS THE SAME VERSION) and then rsync the userdata folder something like:

  1. Install MIAB on new server, set up a BS domain with 1 email account (admin account)
  2. run systemctl stop mailinabox && mv /home/user-data /home/user-data-backup
  3. run the rsync command so that the new and old server user-data folder MATCHES EXACTLY
  4. restart the new server so all services can be restarted properly.
  5. on the old server, setup a cron job to run the rsync command ever x minutes (1,5,10,or 15 are good numbers) (Example crontab line for a 5 minute sync window: */5 * * * * rsync <some_shit_here>
  6. Let it do it’s thing.

Edit make sure to check logs, you may also need to add a few folders from /etc/ notably, possibly nginx, letsencrypt, hosts, resolv.conf, nsd, and maybe even more