How to migrate emails from a domain to another one

Hello Team,

We have two Axigen servers, the old server1 with domain1.com, and a new server2 with domain2.com, the users are the same in both domains, but domain2 will add new different users in the future. By now we need to migrate the emails from server1 to server2 in the respective users’ mailbox,
There is a way to do that, considering they are different domains in different servers?

Regards

Hello Jonathan,

*** quite a long post - please bear with me ***

You could always use the CLI MIGRATE command (from server2 > update domain domain2 context ) but you have to know the account’s password from the “old” server (server1 in your case).

MIGRATE - migrate command which has the following parameters:
    account <accountName> - the local account to which the content will be migrated
    remoteHost <host> - the address of the remote IMAP server from which the data will be migrated
    remotePort <port> - the IMAP port of the remote server from which the data will be migrated
    remoteUser <imap-user> - the email address for the remote account who's data will be migrated
    remotePass <imap-pass> - the password of the remote account who's data will be migrated
    [ignoreFolders (folders)] - list of folders separated by spaces not to be migrated (you must escape SPACE in a folder name with "\" even in quotes)
    [overrideQuota <yes|no>] - specifies if the mailbox quota should be overridden (default: no)
    [deleteOriginal <yes|no>] - enables/disables deletion of all migrated messages on the remote server (default: no)
    [structureOnly <yes|no>] - enables migration of only the directory structure (default: no)
    [verbose <yes|no>] - specifies if the command should be verbose (default: no)

For example, migrating messages of account john@domain1 from server1 into john@domain2 from server2 you have to connect into Axigen CLI on server2 (usually using telnet 127.0.0.1 7000) and, after authentication, run the following command:

update domain domain2
migrate account john remoteHost server1 remotePort 993 remoteUser john@domain1 remotePass john-secret-password-on-domain1

In case you do not know the passwords (which is the usual situation :innocent:) and the old server is not anymore used you could choose the obvious solution and reset all passwords to random generated ones so you could use those passwords for migration purposes.

If this is not possible and you know that each account have the same password on both old and new servers than you may consider to use automatic migration feature:
1/ by setting the domain1 as the primary domain user on server1
or, if that server is not anymore used,
2/ by adding the domain2 alias for domain1 in server1

Note: when using the automatic migration on server2, the authentication on server1 is done with account@domain2 (hence the alias recommendation) and with account (hence the primary domain recommendation)

All of the above do not take into consideration that both old and new servers are Axigen ones.
This means that the last option to consider depending if these servers have same quite similar Axigen versions (let’s say at least the same major version) and if the size of domain1 storage is not so big you may choose to restore only the messages from a backup obtained from domain1 on server1 but into domain2 on server2.

As usual, please do not hurry and jump on any of the above solutions without checking/asking for any abnormal situations that may occurs and testing previously with 1-2 test accounts.

Also, I’m sure that asking the same question but on the support channel you may receive a better targeted option as they will be able to analyze both Axigen configuration and have a better view of the situation.

HTH,
Ioan

Thanks Ioan, your answer is very clear, I think the options you mentioned are feasible, if not we could contact support as you recommend, but is probably we won’t need it.
Thanks again,
B.R

1 Like