John Lightsey
2008-Sep-09 15:36 UTC
[Dovecot] Data loss from removing dovecot.index* files?
Hi there, I've been rewriting the courier-dovecot-migrate script to handle dovecot->courier conversions in addition to courier->dovecot. One issue I've found is that when the courier->dovecot conversion is performed a second time (using --overwrite) and the dovecot-uidlist file is written again, Dovecot starts generating errors when accessing the maildir. The simple fix is to remove all of the dovecot.index* files so they are rebuilt when the maildir is scanned again. Is it safe to do this or is information stored in the index files that can't be rebuilt by Dovecot the next time it scans the maildir? J.D.
Timo Sirainen
2008-Sep-09 15:43 UTC
[Dovecot] Data loss from removing dovecot.index* files?
On Tue, 2008-09-09 at 10:36 -0500, John Lightsey wrote:> Hi there, > > I've been rewriting the courier-dovecot-migrate script to handle > dovecot->courier conversions in addition to courier->dovecot. One > issue I've found is that when the courier->dovecot conversion is > performed a second time (using --overwrite) and the dovecot-uidlist > file is written again, Dovecot starts generating errors when accessing > the maildir. The simple fix is to remove all of the dovecot.index* > files so they are rebuilt when the maildir is scanned again. Is it > safe to do this or is information stored in the index files that can't > be rebuilt by Dovecot the next time it scans the maildir?It's safe, but if any IMAP clients had seen the mailbox the first time they may become confused if the message UIDs change (which is also the reason Dovecot starts complaining). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080909/c7003dbf/attachment-0002.bin>
Patrick Nagel
2008-Sep-10 02:19 UTC
[Dovecot] Data loss from removing dovecot.index* files?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Timo Sirainen wrote:> On Tue, 2008-09-09 at 10:36 -0500, John Lightsey wrote: >> Hi there, >> >> I've been rewriting the courier-dovecot-migrate script to handle >> dovecot->courier conversions in addition to courier->dovecot. One >> issue I've found is that when the courier->dovecot conversion is >> performed a second time (using --overwrite) and the dovecot-uidlist >> file is written again, Dovecot starts generating errors when accessing >> the maildir. The simple fix is to remove all of the dovecot.index* >> files so they are rebuilt when the maildir is scanned again. Is it >> safe to do this or is information stored in the index files that can't >> be rebuilt by Dovecot the next time it scans the maildir? > > It's safe, but if any IMAP clients had seen the mailbox the first time > they may become confused if the message UIDs change (which is also the > reason Dovecot starts complaining). >Aren't flags only stored in dovecot.index files when there are more than 26 of them (and thus can't be stored in the filename)? - -- STAR Software (Shanghai) Co., Ltd. http://www.star-group.net/ Phone: +86 (21) 3462 7688 x 826 Fax: +86 (21) 3462 7779 PGP key: E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFIxy7H7yMg/OiDoAURArS5AJ9rjPOhJsed3bQDUNE88cC8wKed0QCfZNen auRthn0bl6HC8XFbeckmFSA=h5Bv -----END PGP SIGNATURE-----