Axigen Auto Migration

Axigen Documentation

Prerequisites: 

The Axigen Migration module requires an IMAP connection (SSL or non-SSL) to the remote server.

Both Axigen and the legacy server must allow plain login authentication for the IMAP service.

To allow plain login for the Axigen IMAP service, go to WebAdmin → Services → IMAP, scroll down to "Encryption and Authentication" and apply the configurations shown below:

Auto Migration configuration from Axigen WebAdmin

1. Create the domain that will be migrated from WebAdmin → Domains & Accounts → Manage Domains → +Add Domain.

 

2. Configure auto migration parameters from Webmail → Automatic Migration → from domain list click on "Configure" button for the domain that will be migrated

  •  check the "Enable automatic migration for this domain"    
  • select the account class used to create the accounts during the migration process. By default the "domain default" account class is used
  • configure the connection details for the old server by specifying the  IP/Hostname and port numbers for IMAP and SMTP services.|
  • if your Axigen server uses LDAP Bind authentication type, enable the "Account creation based on LDAP authentication" option.

If LDAP synchronization is enabled for a domain, the automatic migration cannot be enabled for the respective domain. The administrator will be presented with the "Domain migration couldn't be enabled!" error.

  • "Create premium accounts according to license restriction" option  will allow the Automatic migration module to create Premium account when a new user is created in Axigen by migration process. If this option is unchecked all account created created by migration process will be basic (account without access to Calendar, Notes, Tasks and premium add-ons like ActiveSync)
  •  "Enable continuous migration" option enabled will resume the migration process each time the respective user logs in into his Axigen account, fetching the new items from the old server.
  • If you are migrating from Kerio Connect or CommuniGate Pro you may enable the Axigen Migrator external app in oder to migrate PIM Information:

 

 

IMAP Service Configuration

  • Check to see whether there is a binary patch for Axigen Migrator here and apply it in your installation (There is a README file describing the procedure).
  • As of Axigen v10.2.2, the Axigen Migrator only does IMAP Plain Authentication in Axigen. This requires the following configuration change in the Axigen WebAdmin: Services → IMAP → Encryption and Authentication → Enable Normal Login and AUTH PLAIN on UNSECURED connections.

 

3. The account class used for created users (be it the domain default or a specific account class) needs to have the 'Enable automatic migration for this domain' checkbox enabled available in   

  • domain default account class: Webadmin -> Domain & Accounts -> Manage Domains -> edit the domain that will be migrated -> Account Defaults -> General -> Auto Migration section


  • specific account class: Webadmin → Domain & Accounts → Account Classes → General → Auto Migration section

Auto Migration configuration from CLI

Auto migration can be configured from CLI interface using MIGRATIONDATA context at domain level. 

To connect to Axigen command line interface (CLI), you should use the telnet command followed by your CLI Listener IP and port (the default  Axigen settings uses IP 127.0.0.1 and port 7000). 

Assuming that the domain that will be migrated is already created in Axigen and the configuration will be similar with the one presented in "Auto Migration configuration from Webadmin"  we will use the following commands:

# telnet 0 7000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Welcome to AXIGEN's Command Line Interface
You must login first. For a list of available commands, type HELP
<login> user admin
<password> ********
For a list of available commands, type HELP
+OK: Authentication successful
<#> update domain domain.tld
+OK: command successful
<domain#> CONFIG MIGRATIONDATA
+OK: command successful
<domain-migrationdata#> set enable yes
+OK: command successful
<domain-migrationdata#> set createPremiumAccounts yes
+OK: command successful
<domain-migrationdata#> set enableContinuousMigration yes
+OK: command successful
<domain-migrationdata#> set remoteImapHost oldserver.hsotname.tld
+OK: command successful
<domain-migrationdata#> set remoteImapPort 143
+OK: command successful
<domain-migrationdata#> set remoteSmtpHost oldserver.hsotname.tld
+OK: command successful
<domain-migrationdata#> set remoteSmtpPort 25
+OK: command successful
<domain-migrationdata#> set defaultAccountClassName (domainDefault)
+OK: command successful
<domain-migrationdata#> set enableMigrationCommand yes
+OK: command successful
<domain-migrationdata#> set migrationCommand {AXIGEN_MIGRATOR}
+OK: command successful
<domain-migrationdata#> set enableDebugLogging no
+OK: command successful
<domain-migrationdata#> done
saving changes (if applicable) and switching back to previous context.
+OK: command successful
<domain#> commit
committing changes and switching back to previous context.
This operation might take some time. Please wait....
+OK: command successful


Check your auto migration configuration using:

# telnet 0 7000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Welcome to AXIGEN's Command Line Interface
You must login first. For a list of available commands, type HELP
<login> user admin
<password> qwe123
For a list of available commands, type HELP
+OK: Authentication successful
<#> update domain domain.tld
+OK: command successful
<domain#> config MIGRATIONDATA
+OK: command successful
<domain-migrationdata#> show

general parameters for the migrationdata context:
createPremiumAccounts = yes
defaultAccountClassName = "(domainDefault)"
enable = yes
enableContinuousMigration = yes
enableDebugLogging = no
enableMigrationCommand = yes
migrationCommand = "{AXIGEN_MIGRATOR}"
remoteImapHost = "oldserver.hsotname.tld"
remoteImapPort = 143
remoteSmtpHost = "oldserver.hsotname.tld"
remoteSmtpPort = 25
+OK: command successful

Enable the option 'Enable automatic migration for this domain' using the below CLI commands:

  • fort the domain default account class
# telnet 0 7000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Welcome to AXIGEN's Command Line Interface
You must login first. For a list of available commands, type HELP
<login> user admin
<password> qwe123
For a list of available commands, type HELP
+OK: Authentication successful
<#> update domain domain.tld
+OK: command successful
<domain#> CONFIG accountDefaultLimits
+OK: command successful
<domain-accountDefaultLimits#> set enableAutoMigration yes
+OK: command successful
<domain-accountDefaultLimits#> done
saving changes (if applicable) and switching back to previous context.
+OK: command successful
<domain#> commit
committing changes and switching back to previous context.
This operation might take some time. Please wait....
+OK: command successful

  • for a specific account class
# telnet 0 7000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Welcome to AXIGEN's Command Line Interface
You must login first. For a list of available commands, type HELP
<login> user admin
<password> qwe123
For a list of available commands, type HELP
+OK: Authentication successful
<#> update domain domain.tld
+OK: command successful
<domain#> update accountclass specific_ac
+OK: command successful
<domain-accountClass#> CONFIG Limits
+OK: command successful
<domain-accountClass-limits#> set enableAutoMigration yes
+OK: command successful
<domain-accountClass-limits#> done  
saving changes (if applicable) and switching back to previous context.
+OK: command successful
<domain-accountClass#> commit
committing changes and switching back to previous context.
This operation might take some time. Please wait....
+OK: command successful
<domain#> commit
committing changes and switching back to previous context.
This operation might take some time. Please wait....
+OK: command successful

Test the migration configuration

 Login in Webmail using an account to trigger the migration process and check the Axigen log file for the migration status:

2018-12-06 15:18:18 +0200 08 centos WEBMAIL:00000073: [192.168.4.200:80] connection accepted from [192.168.4.29:56101]
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Connected to [192.168.4.4:143]
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * OK Kerio Connect 9.2.6 patch 2 IMAP4rev1 server ready
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen CAPABILITY
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * CAPABILITY IMAP4 IMAP4rev1 IDLE ACL LITERAL+ UIDPLUS QUOTA ID SORT ANNOTATE ANNOTATEMORE STATUS-COUNTERS UNSELECT LISTEXT NAMESPACE XLIST SPECIAL-USE XAPPLEPUSHSERVICE STARTTLS AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << axigen OK CAPABILITY completed
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen ID NIL
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * ID ("name" "Kerio Connect" "version" " 9.2.6 patch 2 ")
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << axigen OK ID completed
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen LOGIN user-source@domain.tld *******
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << axigen OK LOGIN completed
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen NAMESPACE
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * NAMESPACE (("" "/")) NIL (("Public Folders/" "/"))
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << axigen OK NAMESPACE command completed
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen LIST "" * RETURN (SPECIAL-USE)
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Inbox) "/" "INBOX"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Trash) "/" "Deleted Items"
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Remote folder: "Deleted Items" will be remapped to Axigen folder: Trash because it is a special folder
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Deleted Items/glp"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Drafts) "/" "Drafts"
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Remote folder: "Drafts" will be remapped to Axigen folder: Drafts because it is a special folder
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Folder foarte vechi"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Folder nou"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Folder vechi"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Junk) "/" "Junk E-mail"
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Remote folder: "Junk E-mail" will be remapped to Axigen folder: Spam because it is a special folder
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "New Folder"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Outbox"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "RSS Feeds"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Sent) "/" "Sent Items"
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Remote folder: "Sent Items" will be remapped to Axigen folder: Sent because it is a special folder
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST (\Noselect) "/" "Public Folders"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * LIST () "/" "Public Folders/My Kerio Email PF"
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << axigen OK LIST completed
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: No obsoleted last UID record found for user-source+INBOX@domain.tld; start from 0
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: >> axigen SELECT "INBOX"
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: Migrating INBOX
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * FLAGS (\Deleted \Seen \Answered \Draft \Flagged $MDNSent $Forwarded $AutoJunk $AutoNotJunk $Junk $NotJunk)
2018-12-06 15:18:18 +0200 16 centos MIGRATION:00000073: << * 16 EXISTS
2018-12-06 15:18:18 +0200 08 centos MIGRATION:00000073: 16 to migrate
...
2018-12-06 15:18:19 +0200 08 centos MIGRATION:00000073: Started migration command '/opt/axigen/bin/axigen-migrator -q -w /var/opt/axigen/aximigrator/ -u user-source@domain.tld -p *** --continuous yes -s imap://[192.168.4.4]:143 -d imap://127.0.0.1:143 -l INFO' (pid=27891) for 'user-source@domain.tld'
2018-12-06 15:18:19 +0200 08 centos MIGRATION:00000073: Connected to [192.168.4.4:143]
...
2018-12-06 15:18:20 +0200 08 centos MIGRATION:00000073: closing session with [192.168.4.4:143] (migration has finished successfully)
2018-12-06 15:18:20 +0200 08 centos MIGRATION:00000073: user 'user-source@domain.tld' has been successfully migrated from '[192.168.4.4]:143'
2018-12-06 15:18:20 +0200 08 centos MIGRATION:00000073: Successfully executed migration command '/opt/axigen/bin/axigen-migrator' (pid=27891) for 'user-source@domain.tld'