1

Topic: Email migration problem

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

Hi,

I need to migrate users from an old postfixadmin mail server to a new IRedMail server. Normally I would use dsync to do this but on the old server domain.com was aliased to newdomain.com. On the new server I would like to have the users whose primary email address is someone@newdomain.com be migrated to the new server using someone@newdomain.com accounts, leave the users who use someoneelse@domain.com for their primary email address under the domain.com accounts and eliminate the domain alias.

As far as I can tell with dsync the source and destination email addresses need to be the same. Does anyone know how to specify both the source and destination email addresses using dsync? Barring that is there a different tool that could be used to accomplish this?

Regards,

Tom

2

Re: Email migration problem

You can use "-o" option to specify the username:

doveadm -o imapc_user=remote-user@domain.com -o imapc_password=bar backup -R -u local-user@domain imapc:

FYI: https://wiki.dovecot.org/Migration/Dsync

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Email migration problem

ZhangHuangbin wrote:

You can use "-o" option to specify the username:

doveadm -o imapc_user=remote-user@domain.com -o imapc_password=bar backup -R -u local-user@domain imapc:

FYI: https://wiki.dovecot.org/Migration/Dsync

Well that is as clear as mud!! I read that page several times and missed that. I am using a master passwd so I never really read that line. :-(

Anyway If I understand this correctly, I am thinking something like doveadm -o imapc_user=remote-user@domain.com mail_fsync=never backup -R -u user@local-domain.com imapc: should work.

I am going to try that.

In testing. I have encountered another error that I am not finding a way around short of switching to another mailbox type. If I run dsync 1 time it completes normally. If I run it a second time I get the following error:
dsync(user@local-domain.com): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted.

I found a post from Timo from 2016 that says not to use MailDir or delete the mailbox and run it again. Deleting the mailbox for the first run works but on the 2nd run it errors out again. Given that it is 3 years later I am wondering if  you have found a way around this problem?

Thanks for the help.

Regards,
Tom

4

Re: Email migration problem

If dsync doesn't work for you, try "imapsync".

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee