Preserving IMAP flags across an upgrade

Mike Brodbelt m.brodbelt at acu.ac.uk
Thu Jan 29 09:41:37 EST 2004


Hi,

I'm upgrading from Cyrus 2.0.16 to 2.1.15, and, while I'm now nearly
there, I've still got one outstanding problem - IMAP flags other than
(\Seen) and (\Recent) are not being preserved across the upgrade.

My understanding is that the (\Seen) and (\Recent) flags for an account
called bob are both stored in the bob.seen file, which in my case is a
skiplist database under /var/lib/cyrus/user/b. The other flags appear to
be stored in cyrus.index or cyrus.cache.

To upgrade, I've exported and rebuilt the mailboxes.db, converted sasldb
to sasldb2, run reconstruct over the user mailboxes, and converted the
seen files to skiplist. The passwords, mailboxes, messages, and seen
state all appear fine, but other flags have not moved.

The original system shows this for one mailbox:-

23 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $MDNSent $Forwarded
$Label1 $Label2 $Label3 $Label4 $Label5)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $MDNSent
$Forwarded $Label1 $Label2 $Label3 $Label4 $Label5 \*)]
* 1788 EXISTS
* 1 RECENT
* OK [UNSEEN 87]
* OK [UIDVALIDITY 997801234]
* OK [UIDNEXT 10391]
23 OK [READ-WRITE] Completed
26 UID fetch 1:* (FLAGS)

<snip>

* 720 FETCH (FLAGS (\Seen) UID 8651)
* 721 FETCH (FLAGS (\Seen $MDNSent) UID 8653)
* 722 FETCH (FLAGS (\Answered \Seen) UID 8665)
* 723 FETCH (FLAGS (\Answered \Seen $MDNSent) UID 8666)
* 724 FETCH (FLAGS (\Seen $Label5) UID 8667)
* 725 FETCH (FLAGS (\Seen $Label5) UID 8670)
* 726 FETCH (FLAGS (\Answered \Seen $Label5) UID 8671)
* 727 FETCH (FLAGS (\Seen) UID 8672)
* 728 FETCH (FLAGS (\Seen) UID 8673)
* 729 FETCH (FLAGS (\Seen $MDNSent $Label5) UID 8675)

My test system shows this for the same mailbox and messages:-

* 720 FETCH (FLAGS (\Seen) UID 8651)
* 721 FETCH (FLAGS (\Seen) UID 8653)
* 722 FETCH (FLAGS (\Seen) UID 8665)
* 723 FETCH (FLAGS (\Seen) UID 8666)
* 724 FETCH (FLAGS (\Seen) UID 8667)
* 725 FETCH (FLAGS (\Seen) UID 8670)
* 726 FETCH (FLAGS (\Seen) UID 8671)
* 727 FETCH (FLAGS (\Seen) UID 8672)
* 728 FETCH (FLAGS (\Seen) UID 8673)
* 729 FETCH (FLAGS (\Seen) UID 8675)


I can only assume that reconstruct is somehow destroying the flag data,
but I've no idea how I can prevent this, or preserve it across the
upgrade. Any ideas would be much appreciated.

Mike.





More information about the Info-cyrus mailing list