[Dovecot] "Broken mailbox list" with virtual plugin
Matthijs Kooijman
matthijs at stdin.nl
Wed May 6 12:06:08 EEST 2009
Hi,
I'm using the virtual plugin for a virtual inbox (with dovecot 1.2, r8980),
whose dovecot-virtual file looks as follows:
INBOX
INBOX/Lists
INBOX/Bulk
INBOX/MaybeSpam
Folders/TODO
all
Everything seems to work fine, but I get the following error in my logfiles:
IMAP(matthijs): virtual /home/matthijs/Mail/virtual/INBOX: Broken mailbox list
Some investigation of the source code tells me that this error means that
there was corrupt data in the index. In particular, the ext_data read from the
index was not long enough to contain all mailbox names. Adding some debug code
confirms this:
ext_size: 187
ext_data: \b0\5\0\0\5\0\0\0E\0\0\0\17\20w\9c\1\0\0\0\5\0\0\0\e9\af\e4I\92\1\0
\0\e7\2\0\0\0\0\0\0\7\0\0\0\b\0\0\0\e8\af\e4IO\3\0\0\5c\5\0\0\0\0\0
\0\8\0\0\0\a\0\0\0\ed\af\e4I\e6\0\0\0j\1\0\0\0\0\0\0\9\0\0\0\f\0\0
\0\3a\b0\e4I1\0\0\0e\0\0\0\0\0\0\0E\0\0\0\c\0\0\0\eb\af\e4I\c8\0\0
\0e\0\0\0\0\0\0\0INBOXINBOX/ListsINBOX/BulkINBOX/MaybeSpamFolders/TO
ext_hdr: change_counter=1456 mailbox_count=5 highest_mailbox_id=69 search_args_crc32=2625052695
mailbox: id=1 name_len=5 uid_validity=1239724009 next_uid=402 higest_modseq=743
mailbox name: INBOX
mailbox: id=7 name_len=11 uid_validity=1239724008 next_uid=847 higest_modseq=1372
mailbox name: INBOX/Lists
mailbox: id=8 name_len=10 uid_validity=1239724013 next_uid=230 higest_modseq=362
mailbox name: INBOX/Bulk
mailbox: id=9 name_len=15 uid_validity=1239724090 next_uid=49 higest_modseq=101
mailbox name: INBOX/MaybeSpam
mailbox: id=69 name_len=12 uid_validity=1239724011 next_uid=200 higest_modseq=101
virtual /home/matthijs/Mail/virtual/INBOX: Broken mailbox list
As you can see in the ext_data dump, the last mailbox name (Folders/TODO) is
cut short. I'm not so sure what caused this error.
I've just tried removing the index files, which seems to fix the error
message. The index file gets recreated and my debug statements show proper
output. Another solution is adding an extra file to the folder
list, in which case the index will get fixed as well.
Perhaps it would be good to recreate the index file when this error is found,
instead of complaining?
Also, from the code (virtual_sync_ext_header_read in
src/virtual/virtual-sync.c) it seems that the last mailbox should be skipped
because of this error, but the mailbox works fine. I'm probably not looking
closely enough :-)
I haven't been able to reliably break the index file with some quick testing
(reconnecting, restarting and modifying the mailbox list), but I did manage to
break it once (by removing a mailbox from halfway the list, and then adding it
again). I couldn't reproduce that, though, since removing a mailbox doesn't
always seem to recreate the index for some reason...
I've also just upgraded to the latest version, so if this is a bug fixed
between r8980 and r9018, then you'll probably not hear from me again :-)
I hope all this info helps a bit, I'm available for further debugging and
testing (also on IRC, nick is blathijs).
Gr.
Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20090506/e0e70ca7/attachment.bin
More information about the dovecot
mailing list