HowTos/Run Scalix with old mail server side by side for migration testing

From Scalix Wiki
Jump to: navigation, search

Scalix Wiki -> How-Tos -> Run Scalix with old mail server side by side for migration testing

Overview

Ever wonder how the heck you are going to get a lot of people to test the new Scalix mail server while still using the old server. That was the question that I faced as we are migrating from our old mail server to a Scalix. We used imapsync to migrate the data over (slow, but it works well). Before we do the last sync, my boss asked me to figure out a way to run the servers side by side so we could have the early adopters try the new mail server. The kicker is that both servers are set up to serve the same domain and we need to be able to have the early adopters get to their mail from either server. This solution works for us, but I am not sure if this is the best solution and would love to hear your ideas.

Details

  1. Set up a NewMailForwarder server (I used postfix, but any MTA will work) that has an alias file which contains local users for all accounts that are pointed to the domain (e.g. user1: user1.example.com). This server justs forwards mail from the Scalix to the old mail server.
  2. Set up an OldMailForwarder server with the same alias file. Also set up dnsmasq on it as a local dns server and have its MX record for the domain point to the Scalix. This server will then forward all email to the new mail server. Because it uses a local DNS server, it gets Scalix as the mail server for your domain.
  3. Set up rules on Scalix on each account such that any incoming message is redirected to @NewMailForwarder if not "X-archive: TEST" (pick your own header here). I did this with:
omshowu -m all -i | while read USER; do echo $USER; sxaa --user $USER 
--redirect $USER@NewMailFowarder --header "X-archived: SCALIX" --not; done
This will cause any email to Scalix to get forwarded unless the header "X-archive: SCALIX" is true. This is needed to stop mail loops between the old mail server and Scalix.
  1. Finally for any user that needs to test Scalix, on the old mail server set up a rule that adds "X-archive: SCALIX" and mirrors all their incoming email to @OldMailForwarder. I mirror the email so the test user can easily switch back to the old mail server an see their email.

Scenarios

So a test user has the following scenarios:

  • Outside email to the test user goes to the old mail server and is forwarded to the new mail server via the OldMailForwarder server with the "X-Archive: TEST" set so it is not forwarded any more.
  • Inside email from users on the old mail server to the test user are forwarded to the new mail server via the OldMailForwarder server with the "X-Archive: TEST" set so it is not forwarded any mor
  • Mail from the test user on the new mail server to outside users is delivered directly.
  • Mail from the test user on the new mail server to inside users on the old mail server is forwarded to the old mail server via the NewMailForwarder server.
  • Mail from the test user on the new mail server to inside users on the new mail server is forwarded to the old mail server via the NewMailForwarder server which is then forwarded to the new mail server via the OldMailForwarder server with the "X-Archive: TEST" set so it is not forwarded any more.

The only downside is that any server side rules on the old mail server are not on Scalix so the test user may see mail in their inbox that would have normally been transferred directly into other folders.