[MlMt] MM crashes when moving emails

Benny Kjær Nielsen mailinglist at freron.com
Sat Jul 28 09:17:33 UTC 2012

On 28 Jul 2012, at 3:31, Joachim Tingvold wrote:

> MM seems to crash when moving emails from one folder to another 
> (within the same folder-level), if the folder-name is the same (but 
> with different case, i.e. 'Inbox' and 'INBOX'). Upon restarting MM, it 
> seems to have actually moved the messages, as it complains about 
> emails it can't find (in the folder where the messages originally was 
> located).

I'm amazed I haven't run into this problem before (the bug has been 
present in all versions of MailMate). IMAP is implementation-dependent 
and can be both case sensitive and insensitive. Internally, MailMate 
treats all IMAP accounts as case sensitive and that is fine until saving 
files to the disk. Well, that might work as well since message file 
names are unique (INBOX and Inbox are then simply merged on disk), but 
moving a message between these disk folders apparently triggers a 
serious bug.

> The crash isn't actually my primary issue here (from the developers 
> point-of-view, it probably is),

Yes, the primary problem is that this bug can corrupt the local cache of 
messages. This is the worst kind of bug. Unfortunately I'm not sure I 
have time enough to fix it before going on a 2-week vacation. Sorry 
about that :-(

> but I find the question-dialogue, that pops up when MM starts again, a 
> bit weird. When it states it cannot find the emails, it gives me 3 
> options (if I recall correctly); 1) retry, 2) re-download all 
> messages, and 3) rebuild from cache. What is the logic here? Obviously 
> it won't find the emails (since they seem to have been moved after 
> all), so option 1) isn't going to help me. Option 2) and 3) baffles me 
> a bit -- why does it need to download/reload from cache the _ENTIRE_ 
> mail-database, because of 2 emails that has moved? Why can't it just 
> try to locate the missing emails in the _background_? (out of my way).
> Right now, option 3) is preferred over option 2), when it comes to how 
> long time it takes. Nevertheless, option 3) took almost an hour to 
> complete (196k messages imported) where it also used 90% of my CPU all 
> the way. And all that for just 2 emails. (-:
> Sorry for the rant.

Understandable. It seems like a lot of work for a small problem, but the 
problem is that when MailMate detects an unexpected state of the local 
cache/database (there are numerous checks in the code for unexpected 
states) then there is no way to know exactly what the problem is. If 
MailMate ignores the problem or tries to fix it without knowing exactly 
what happened is too dangerous. It could escalate the problem to a more 
serious state with the risk of leading to data loss.

If it's any consolation then searching in MailMate may be much faster 
for you now :-) (Depends on what revision of MailMate you originally 
used to setup accounts.)

Kind regards,


More information about the mailmate mailing list