UnicodeDecodeError? Argh! Nothing works! I'm tired and hurting and...

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Tue Nov 24 23:43:32 CET 2009

On Tue, 24 Nov 2009 13:19:10 -0500, Chris Jones wrote:

> On Tue, Nov 24, 2009 at 08:02:09AM EST, Steven D'Aprano wrote:
>> Good grief, it's about six weeks away from 2010 and Thunderbird still
>> uses mbox as it's default mail box format. Hello, the nineties called,
>> they want their mail formats back! Are the tbird developers on crack or
>> something? I can't believe that they're still using that crappy format.
>> No, I tell a lie. I can believe it far too well.
> :-)
> I realize that's somewhat OT, but what mail box format do you recommend,
> and why?



Corruption is less likely, if there is corruption you'll only lose a 
single message rather than potentially everything in the mail folder[*], 
at a pinch you can read the emails using a text editor or easily grep 
through them, and compacting the mail folder is lightning fast, there's 
no wasted space in the mail folder, and there's no need to mangle lines 
starting with "From " in the body of the email.

The only major downside is that because you're dealing with potentially 
thousands of smallish files, it *may* have reduced performance on some 
older file systems that don't deal well with lots of files. These days, 
that's not a real issue.

Oh yes, and people using Windows can't use maildir because (1) it doesn't 
allow colons in names, and (2) it doesn't have atomic renames. Neither of 
these are insurmountable problems: an implementation could substitute 
another character for the colon, and while that would be a technical 
violation of the standard, it would still work. And the lack of atomic 
renames would simply mean that implementations have to be more careful 
about not having two threads writing to the one mailbox at the same time.

[*] I'm assuming normal "oops there's a bug in the mail client code" 
corruption rather than "I got drunk and started deleting random files and 
directories" corruption.


More information about the Python-list mailing list