Results 1 to 2 of 2

Thread: Problem with running imapsync ('could not add flags')

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Redwood City, CA, USA
    Rep Power

    Default Problem with running imapsync ('could not add flags')

    So I have been trying to migrate some test users from our old IMAP setup (using Dovecot) to Zimbra, it seems imapsync isn't able to pull all the folders so I have to do things like --folderrec, etc. Here is the command line:

    ./imapsync --host1 mail.domain.tld --user1 $username --password1 '' --host2 zimbra.domain.tld --user2 $username --password2 '' --port1 993 --ssl1 --authmech1 PLAIN --authmech2 PLAIN --ssl2 --port2 993 --noauthmd5 --exclude '#shared*' --nofoldersizes --folder INBOX --subscribe_all --useuid --delete2

    The initial sync for the most part works fine (except for the missing folders which I fill in on subsequent runs, but when I do, it spits out this:

    CACHE h1 h2: 19135 files
    Host2 folder INBOX selected: 19135 messages, duplicates: 0
    Host2 flags msg INBOX/1257 could not add flags [$Forwarded $Label2 \Answered \Seen]: * BYE zimbra.domain.tld Zimbra IMAP4rev1 server closing connection (2x); Unable to connect to zimbra.domain.tld: IO::Socket::SSL: SSL connect attempt failed because of handshake problemserror:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

    Basically imapsync is unable to add flags to a migrated message so Zimbra then drops the IMAP connection, and I get three pages of SSL handshake and IMAP errors as it no longer has a connection.

    This is really slowing down the migration of users, I even tried using imapsync v1.525 from git and it still has the same issue.

    Ideas? (thanks in advance)

  2. #2
    Join Date
    Aug 2012
    Rep Power



    have you tried to remove the Flags starting with $?

    e.g. you can use the "--regexflag" option from imapsync. I used

    --regexflag 's/.*?(?:(\\(?:Answered|Flagged|Deleted|Seen|Draft)\s?)|$)/defined($1)?$1:q()/eg'
    to remove all "not-standard" folder flags.


Similar Threads

  1. [SOLVED] Problem during imapsync
    By Oded Arbel in forum Migration
    Replies: 9
    Last Post: 03-07-2010, 05:30 AM
  2. imapsync flags for Lotus Notes migration
    By marrotte in forum Migration
    Replies: 1
    Last Post: 01-16-2009, 03:56 PM
  3. imapsync problem
    By erik.schwalbe in forum Migration
    Replies: 4
    Last Post: 05-15-2008, 09:17 AM
  4. Imapsync Problem
    By scalper in forum Administrators
    Replies: 1
    Last Post: 07-21-2006, 03:10 AM
  5. imapsync problem
    By J45p3r in forum Administrators
    Replies: 1
    Last Post: 04-19-2006, 02:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts