Migrating email accounts from ajenti to vestacp

Date Posted: 23-07-2017

Migrating emails between two control panel is tedious task because of mail format, permission issues, folder sync. Here this post explains on how to migrate email account from ajenti to vestacp panel.

Assumption:

  1. Source server (Ajenti Control panel ) – Exim mail directory=> /var/vmail
  2. Destination Server(VestaCp Control Panel) – Exim Mail direcory => /home/admin/mail/

How to migrate email accounts:

First create all the email accounts on destination vestacp control panel

Vestacp > Mai l > Select <Domain>  > Click on +

Add all the source email address on destination server.

Now, its time to migrate email account from backend.

Execute the below command on source ajenti server.

rsync -avz --exclude "courier*" -e ssh /var/vmail/domain.tld/ root@xx.xx.xx.xx.xx:/home/admin/mail/domain.tld/

Execute the below command on destination vestacp control panel server.

chmod 770 /home/admin/mail/domain.tld

Change the ownership of the directory.

chown -R admin.mail /home/admin/mail/domain.tld

Repeat the same process for other domains if we have multiple domains.

 

Leave a Reply