1

Topic: Moving domain to a different iRedMail server

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: CentOS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I have multiple iRedMail servers, many of them hosting 3-4 extra domains, and I would like to consolidate them on a single instance of iRedMail (mail.new.com).

I am a bit unsure about one specific server (mail.tricky.com) who only hosts 1 domain and it has hundreds of mailboxes. What is the best way (DNS and iRedmail wise) to make sure that users only have to insert a new password and they can keep using mail.tricky.com even after the migration?

I imagine that the basic steps are:

1. Add tricky.com on the new server
2. Recreate the exact same mailboxes
3. Transfer the folder from the old vmail to the new one (?)
4. Maybe I can also transfer passwords from the old DB?

In regards to the hostname, I doubt that simply configuring mail.tricky.com as a CNAME to mail.new.com would do the trick... right?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Moving domain to a different iRedMail server

Rashef wrote:

2. Recreate the exact same mailboxes
3. Transfer the folder from the old vmail to the new one (?)

You can export mail accounts from SQL/LDAP, then import them on new server. This way the maildir paths are same as old server, then you can copy mailboxes directly.

Rashef wrote:

4. Maybe I can also transfer passwords from the old DB?

Sure.

Rashef wrote:

In regards to the hostname, I doubt that simply configuring mail.tricky.com as a CNAME to mail.new.com would do the trick... right?

Should be fine, but you may extend LetsEncrypt ssl cert to support this new hostname.

3

Re: Moving domain to a different iRedMail server

ZhangHuangbin wrote:

You can export mail accounts from SQL/LDAP, then import them on new server. This way the maildir paths are same as old server, then you can copy mailboxes directly.

What's the best way to export only a specific domain and import it without compromising existing domains that are alreay on the destination server?

Thanks a million!

4

Re: Moving domain to a different iRedMail server

You need to do SQL queries with condition like "WHERE ... domain='<your-domain>'".