Mailbox Rules (User managed)

I am looking to move my family domain to self hosted from gmail.
(google is now converting those with custom domains from free to paid service so there might be a lot more refugees coming).

Looking to check if/how users can setup mailbox rules for themselves (via web interface) that manage their mail (eg if from here then move to this folder etc.).

I haven’t setup a test server/moved yet but wanted to check there was a way to get this functionality (most access their mail via IMAP on mobile) so ideally wanted it server side (same as gmail mail filters etc.)

Also if there are any tips for syncing mail folders/mail when migrating from gmail that would be awesome.

1 Like

MiaB installs Roundcube, a webmail package, which has a filters feature that will apply to all mail for the user, even when not logged in.

The easier way to migrate the messages is using imapsync. It is not a part of MiaB, but it is a mature tool with lots of tutorials if you search for it.


Thanks for the clarification. I could see that roundcube was installed but couldn’t find any notes for it regarding rules.

My gut feeling at the moment is to move the mbox files to the server then convert but happy to also pay for imapsync as I have heard good things about it.

I do have a “spare domain” so was thinking I could set that up first and sync to it then flick dns and shutdown the primary one on gmail.

There are probably paid services, but imapsync is an open source tool. I’ve used it without issue.

Note that MiaB does not use mbox file format. It uses maildir. However, Roundcube does have an import tool that can accept MIME or mbox.

1 Like

Thanks for the link. The last search I did here showed it as a paid service.

That looks like the way to go.

If you do not feel comfortable with imapsync you can try Thunderbird (or any other client). You setup both old and new accounts and use the move/copy function. Easy and safe. Also, consider havind the Remove duplicates addon.

We moved manually one domain with 200GB of emails, 50 accounts in about 4 hours.

After that we discovered imapsync :smiley: :crazy_face: :mask:

1 Like

For people with low upload speeds, this would not be a good option with that large of a transfer. The nice thing about imapsync is it runs using the cloud infrastructure and if you use tmux it should complete without issue even if you end your SSH session.

1 Like

I think I will use imapsync. Quite comfortable with terminal and scripts/configuration.

I will need to test best way to move the actual domain. I am blessed with having a spare ( and with the .au one being in use at present. The actual name is same for both- we got them in a bundle deal and never used the .com.

My plan is to:

  1. setup mailinabox with my .com domain
  2. use imapsync to sync map from to .com for my email accounts.
    (This gives me a time to migrate - also I can give out the info for people to test/setup rules etc.)
  3. Assuming I can use the “remove duplicates” or that it only moves fresh mail then I can sync again once ready to transfer the and then point dns gmail to my host as another alias for (its basically family so if if a few emails get a retry then such is life).

Does this work ok?

In Settings > Filters

It is your basic sieve filtering.

As mentioned by @openletter MiaB does not use mbox, and importing mbox files can be painful, so I highly recommend using IMAPSYNC.

If the mailbox is less than 3gb there is actually an online tool available from the author of imapsync. Mailbox Imapsync Online

As an alternative to purchasing and using one time, I do offer migration services, starting at $10.

1 Like

Not a problem doing a second sync. Imapsync generally does not create duplicates. I always sync the mailboxes, switch DNS, and then do another sync to pick up any emails that may be floating in the wind.

So just to understand, you’ll set up everything on .com and then when ready, use a domain alias to handle ? The only thing I can see to watch out for is that you’ll have to use identities in your mobile client.

This is indeed my plan.
Unfortunately I have a couple of users (wife especially) who have 9gb of mail so I cant use the free one and will need to run iMapSync at least twice. (move the majority of the mail then move whatever got left).

Not sure what you mean by identities on mobile client. I was going to tell people not to touch mail for 24 hours (when we did the final sync/dns cutover) and then update their phone with the new info pointing at the new server (need to test and document the steps)

From your OP you mentioned that:

Which gives me the (mistaken?) impression that you’ll want to set up filters and everything on the .com domain, but when you ‘go live’ you want to use the domain. There are a couple of ways to go about this, but from the quoted part, the emails, and filter rules will be set on the .com domain data, so when you add a ‘domain alias’ the users will need to connect to their mailboxes with, and will be able to reply from their “account”, but to do this an identity will need to be created in the email client, elsewise the emails will appear to come from, not the desired

Its a very good point you make. Still pretty medicated and hadn’t considered that. I need to check out rules/process etc first. Considering we are talking less than 10 users (family not business) the real world answer is probably just to get them to make a note of their rules and then recreate when the migration is finished.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.