Thursday, July 26, 2012

Thunderbird error copying message to sent folder—with dovecot

The past few weeks, my thunderbird email client has had trouble reading some messages and writing others. I searched for solutions, but none of them did much (I tried compacting my inbox, which is where I experienced the symptom, and this may or may not have helped). Pretty much I said File→Quit, then "killall -i thunderbird" and restarted. But I did that several times today and thought of something else.

Thunderbird on my OpenSUSE 11.3 Linux desktop talks IMAP to a local copy of dovecot (all folders are Maildir on local disk), and I wondered if the problem might have to do with dovecot rather than t-bird. I had read something about dovecot and bad index files affecting mbox-style folders but I decided to give the index thingie a try anyway.

First I stopped dovecot, then went into Maildir and said "mkdir OLD_DOVECOT_INDEX_FILES; mv dovecot.index* OLD_DOVECOT_INDEX_FILES/" and restarted dovecot. So far the results are promising; all things email seem snappy. Here's size/etc of old vs new index files:

collin@collin-dlx: ~/Maildir
% ls -o OLD_DOVECOT_INDEX_FILES/
total 12748
-rw-r--r-- 1 collin   285448 2012-07-26 13:33 dovecot.index
-rw-r--r-- 1 collin 12689408 2012-07-26 15:29 dovecot.index.cache
-rw-r--r-- 1 collin    12908 2012-07-26 15:29 dovecot.index.log
-rw-r--r-- 1 collin    32776 2012-07-26 13:33 dovecot.index.log.2
collin@collin-dlx: ~/Maildir
% ls -o dovecot.index*
-rw-r--r-- 1 collin 285832 2012-07-26 15:50 dovecot.index
-rw-r--r-- 1 collin  31744 2012-07-26 16:09 dovecot.index.cache
-rw-r--r-- 1 collin   5768 2012-07-26 16:09 dovecot.index.log
-rw-r--r-- 1 collin 127628 2012-07-26 15:48 dovecot.index.log.2
The big thing I notice is that the cache, which was formerly over 12 Mbytes, is now down to about 32K. Interestingly dovecot.index.log.2 is much bigger than the old one, but that doesn't seem to hurt anything.

Obviously, I hadn't run with the newer index files very long before doing the "ls -o", but about 5 hours later t-bird was still able to talk happily to dovecot and show/copy messages just fine.

So far, then, this plan looks like it may have solved my problem. I'll update this posting if not.

No comments: