1

Topic: Best way to move email to new domain/user (change domain for user)

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

Hi there, what best way would be to transfer user@old-domain.com emails, curent/sent/ etc.  to user@new-domain.com in same iredmail server?

user is changing domain, but wants to have all emails from old account.

I appreciate any suggestions.

----

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

2

Re: Best way to move email to new domain/user (change domain for user)

Mail server will deliver NEW email to user's mailbox, and the path to mailbox is defined in SQL database. You can get the maildir path with sql command:

sql> USE vmail;
sql> SELECT CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) FROM mailbox;

So you must copy existing mailbox to the maildir path defined in SQL database.

3

Re: Best way to move email to new domain/user (change domain for user)

So just copy Old Maildir directory into new? Thats it?

Thank You!

ZhangHuangbin wrote:

Mail server will deliver NEW email to user's mailbox, and the path to mailbox is defined in SQL database. You can get the maildir path with sql command:

sql> USE vmail;
sql> SELECT CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) FROM mailbox;

So you must copy existing mailbox to the maildir path defined in SQL database.

4

Re: Best way to move email to new domain/user (change domain for user)

mindaugas wrote:

So just copy Old Maildir directory into new? Thats it?

YES.