[SOLVED] Issue with Zimbra to New Mail Server Migration Using imapsync and account delegation

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
LogEdge21
Posts: 7
Joined: Thu Sep 28, 2023 1:07 am

[SOLVED] Issue with Zimbra to New Mail Server Migration Using imapsync and account delegation

Post by LogEdge21 »

I'm trying to migrate a mailbox from a Zimbra server to another mail server. I've created a technical user tech-migration@example.com and granted it rights to the user's mailbox with:

Code: Select all

zmmailbox -z -m user@example.com mfg / account tech-migration@example.com rwixda
Then I run the imapsync command:

Code: Select all

imapsync --host1 mail1.example.com --user1 user@example.com --authuser1 tech-migration@example.com --password1 pass1 \
        --host2 mail2.example.com --user2 user@example.com --password2 pass2
Where pass1 is the password for the technical user tech-migration@example.com.
The authorization for tech-migration@example.com is successful (confirmed in audit.log), but in mailbox.log I'm seeing this error:

Code: Select all

account - authorization failed for user@example.com (authenticated user tech-migration@example.com has insufficient rights)
As a result, the imapsync command fails as well.
Can anyone help me understand what might be causing this issue? Are there additional permissions I need to set up?
Last edited by LogEdge21 on Wed Apr 09, 2025 11:15 am, edited 1 time in total.
User avatar
wentum
Advanced member
Advanced member
Posts: 58
Joined: Fri Apr 04, 2014 10:49 am
Location: Pforzheim (Germany)
ZCS/ZD Version: Release 10.1.10.GA.4655
Contact:

Re: Issue with Zimbra to New Mail Server Migration Using imapsync and account delegation

Post by wentum »

Hello LogEdge21,

if you'd use an admin user as authuser1 it will work.

FYI here is the imapsync command I use for migration:

imapsync --host1 zimbra1.example.com --authuser1 admin --user1 info@example.com --password1 secret1 --host2 zimbra2.example.com --authuser2 admin@zimbra2.example.com --user2 info@example.com --password2 secret2 --folderrec "INBOX" --folderrec "Junk" --folderrec "Sent" --folderrec "Trash" --folderrec "Drafts" --skipemptyfolders --debugflags --nofoldersizes --nofoldersizesatend

Remark: I don't sync 'above' INBOX because of potentially existing shared mailboxes. These are linked in (as IMAP folders) at the same level as INBOX, Junk etc and you can't know their names because users are able to rename it.

HTH
Joerg
Last edited by wentum on Wed Apr 09, 2025 3:20 pm, edited 1 time in total.
LogEdge21
Posts: 7
Joined: Thu Sep 28, 2023 1:07 am

Re: Issue with Zimbra to New Mail Server Migration Using imapsync and account delegation

Post by LogEdge21 »

Just wanted to say a huge thanks for the help! Your suggestion worked perfectly.
Really appreciate how quickly you all responded. This community is awesome - you saved me hours of troubleshooting!
For anyone who might face the same problem in the future, the solution shared here worked like a charm.
Thanks again!
Post Reply