CentOS 7.x imapsync syntax

From Notes_Wiki
Revision as of 13:53, 20 May 2021 by Saurabh (talk | contribs)

<yambe:breadcrumb self="imapsync syntax">CentOS_7.x_imapsync|imapsync</yambe:breadcrumb>

CentOS 7.x imapsync syntax

imapsync can be used for:

  • Migrating from one email service (Eg GSuite) to another (Eg Zimbra)
  • Migration from older version of email server (Eg Zimbra 8.6) to newer email server (Eg Zimbra 8.7)
  • Migration from mulit-server email setup to single-server setup
  • Creating a delayed HA between two servers using Zimbra community edition.
    Note this will only sync emails. User accounts, passwords, preferences, distribution lists, contacts, etc. need to be synced separately.


Imapsync syntax is:

imapsync \
   --host1 <zimbra-host1> --user1 '<email-id>' --authuser1 admin@example.com --password1 '<adminpass-zimbra-host1>' \
   --host2 <zimbra-host2> --user2 '<email-id>' --authuser2 admin@example.com --password2 '<adminpass-zimbra-host2>' \
   --authmech1 plain --ssl1 --port1 993 \
   --authmech2 plain --ssl2 --port2 993 \
   --subscribe --useheader 'Message-Id' --skipsize --allowsizemismatch --syncinternaldates --fast  --nofoldersizes  \
   --exclude "Drafts|Junk|Trash|Junk E-mail|Emailed Contacts" --noauthmd5 


Imapsync Zimbra

In Zimbra Admin interface set maximum message size to more than 10MB if emails being synced would be large. Then as zimbra user do

  zmmailboxdctl restart 

for new maximum message size to take effect.


<yambe:breadcrumb self="imapsync syntax">CentOS_7.x_imapsync|imapsync</yambe:breadcrumb>