[solved] imapsync zcs 7.1.4 to 8.7.7

Looking to migrate to ZCS? Ask here. Got a great tip or script that helped you migrate? Post it here.
Post Reply
fbzimblet
Advanced member
Advanced member
Posts: 119
Joined: Sun Apr 17, 2016 4:15 pm

[solved] imapsync zcs 7.1.4 to 8.7.7

Post by fbzimblet »

I'm using above script to sync over imap from 7.1.4 to 8.7.7 and not sure if imapsync covered by zimbra support, so I ask here first.

Code: Select all

host1="source-IP"
host2="destination-IP"
username="user@domain"
admin_account_password="zimbra-admin-password"
imapsync \
  --host1 "$host1" --host2 "$host2" --automap --useuid --delete2 \
  --user1 "$username" --authuser1 admin \
  --ssl1 --authmech1 PLAIN \
  --password1 "$admin_account_password" \
  --user2 "$username" --authuser2 admin \
  --ssl2 --authmech2 PLAIN  \
  --password2 "$admin_account_password" \
  --maxsize 52428800 --buffersize 8192000 \
  --nofoldersizes --nosyncacls --subscribe --syncinternaldates \
  --authmech2 PLAIN \
  --exclude '(?i)\b(Junk|Spam|Trash)\b' \
  --regextrans2 "s,&AAo-|&AA0ACg-|&AA0ACgANAAo-(?=/|$),,g" \
  --regexflag 's/\\\\(?!Answered|Flagged|Deleted|Seen|Recent|Draft)[^\s]*\s*//ig' --debugflags \
  --regextrans2 's,:,-,g' \
  --regextrans2 's,\",'\'',g' \
  --regextrans2 's,\s+(?=/|$),,g' \
  --regextrans2 "s,^(Briefcase|Calendar|Contacts|Notebook|Tasks)(?=/|$), $1 Folder,ig" \
  --regextrans2 's,\",-,g' \
This script managed to make sure all email synced and if there are emails on destination that already deleted on source, it will be deleted during imapsync.

Problem is, it also tried to sync Emailed Contacts, create a folder named Folder and put contact files in it.

How to resolve this?
Last edited by fbzimblet on Wed May 03, 2017 8:19 am, edited 1 time in total.
fbzimblet
Advanced member
Advanced member
Posts: 119
Joined: Sun Apr 17, 2016 4:15 pm

Re: imapsync zcs 7.1.4 to 8.7.7

Post by fbzimblet »

excluding emailed contacts and contacts folder solved this

Code: Select all

16c
  --exclude '(?i)\b(Junk|Spam|Trash|Emailed \Contacts|Contacts)\b' \
.
Post Reply