[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] messages are not deleted on host1 (dovecot to dovecot) with --delete, it was a big bug


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] messages are not deleted on host1 (dovecot to dovecot) with --delete, it was a big bug
Date Wed, 08 Feb 2012 23:55:07 +0100

Hello Jelle,

What are the recommended settings to migrate mail from dovecot host1 to
dovecot host2. (debian stable machines)

/root/imapsync-1.476/imapsync_elf_x86.bin \
--pidfile /tmp/imapsync01.pid \
--host1 ashley.powercraft.nl \
--tls1 \
--user1 jelledejong at powercraft dot nl \
--passfile1 ~/secret01 \
--delete \
--expunge1 \
--host2 imap.powercraft.nl \
--tls2 \
--user2 jelledejong at powercraft dot nl \
--passfile2 ~/secret02 \
--subscribe>>  jelledejong at powercraft dot nl dot txt

I ran this command it exit without errors, all messages are moved, but
they are still on host1 when I login in.

It was a big mistake I introduced in imapsync release 1.468, I changed host1 connection to be read-only for safety I thought but it was a bad idea within the context of --delete option, since --delete does change account1.

So take an older release than 1.468 or the any from 1.484 (included).
I also added a regression test about --delete so that this bad behavior
will never happen again.

I'm sorry for this ugly bug. I hope the read-only mode has the
side effect of not changing flags to \DELETED as well.
In case of flag change the effect of a second run could be catastrophic
because \DELETED flags would be synced to host2!

--
Au revoir,                             09 51 84 42 42
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06