Migrating Virtual mail domains to 4.0

From Zentyal Linux Small Business Server
Jump to: navigation, search

Virtual mail domains management has changed in 4.0. You can now deploy a more customizable environment; but this has also brought a drawback when you are upgrading from a previous version. In some old installations users mailboxes were at the "internal domain" and we added a rewriting outgoing domain option.

This is not longer needed. You can now create a user mailbox at any of your virtual mail domains and they will work with both OpenChange capabilities and webmail interface. Thus those users with their mailboxes placed at the "internal domain", should be moved to the "external domain".

This process is not needed for every Zentyal user, so in this case we are writing this guide to help you through it. Firstly, let's assume some scenario considerations:

In this case we want to migrate the following existing user:

  • Username: jshepard
  • Mailbox currently at virtual mail domain: @zentyal-domain.lan
  • Mailbox should be migrated to virtual mail domain: @zentyal-domain.com

So now you have to follow these steps:

  • Both virtual mail domains should exist and no changes pending to be saved at Zentyal administration interface.
  • Backup your user current mailbox. You should copy the following folder: "/var/vmail/zentyal-domain.lan/jshepard"
sudo cp -r /var/vmail/zentyal-domain.lan/jshepard /tmp/.
  • Now you can delete jshepard's mailbox. Go to your Zentyal administration interface and navigate to "Users and computers --> Manage". From the users tree, select the "jshepard" user. Then open the "Mail account settings" option and delete the current inbox.
  • At the same page, after selecting the @zentyal-domain.com domain, you can create the user's mailbox again.
  • At this moment the new mailbox is working, but there would not be any mails there. So you have to restore them from the previously saved backup:
sudo cp -r  /tmp/jshepard /var/vmail/zentyal-domain.com/jshepard
  • This step has changed some file permissions, so you will need one last step:
sudo chown -R ebox:ebox /var/vmail/zentyal-domain.com/jshepard

Now, your user jshepard would be able to send and receive mails using the @zentyal-domain.com domain without any problem. And all his previous data will be there too (you can test it at the webmail interface).

Personal tools


Zentyal Wiki

Zentyal Doc