email corrupted, again!

User Help for Mozilla Thunderbird
Post Reply
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

email corrupted, again!

Post by freetheware »

Well, the reason I stopped using Thunderbird a year ago is that it corrupted a few of my emails; putting header information of a few current (undeleted) emails with body/content of emails I'd deleted long ago.

And now, it's happened again. Imagine selecting a fairly recent email in the inbox, and seeing something in the message body window that's actually an email you've deleted LONG ago. Very bad, as I use Thunderbird for business email also.

Is this a known issue?
Thunderbird 38.7.2 on Ubuntu 16.04, all up to date.

I'll have to use another client, I simply can't risk this again.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: email corrupted, again!

Post by tanstaafl »

You probably have a corrupt inbox folder. When it gets corrupt you can get fragmented messages or resurrect deleted messages.

Its a risk due to using the mbox format to store messages that usually occurs only for the inbox as that is usually the only folder that has the combination of lots of messages, lots of deleted messages, and not compacted often. You won't see this with a really large archive folder for example. Its recommended that you get in the habit of moving most of the messages in the inbox that you want to keep to other folders, and to enable automated compacting of folders. See http://kb.mozillazine.org/Compacting_folders , especially the "real fix" section.

Thunderbird 45.0 has restored configuring a new account to use maildir instead of mbox as an option again (which implies they think its finally mature enough for general use), but I haven't had a chance to check it out yet. The maildir format is immune to corrupt folders because it stores each message in a separate file (think of it as .eml files but with a UNIX heritage) , unlike mbox which stores all of the messages for a folder in one file.

Another workaround would be to use a IMAP account where you disable offline folders and global search, so that it only stores headers on the hard disk, not messages. Everytime you open a message it would fetch it from the server and only store it in memory. If you have a broadband connection this works well (assuming you are comfortable using one of the other methods to search messages such as the quick filter bar). Its terrible if you have a satellite connection. See http://kb.mozillazine.org/Minimize_the_ ... _a_profile if you're interested.
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

Re: email corrupted, again!

Post by freetheware »

Thanks, that's very helpful. I rarely keep more than 20 or so emails in my Inbox. I'll look into your recommendations above, especially switching to maildir format.

I prefer having emails stored locally so I can work with them offline, although that's much less of an issue having a smart phone in possession at all times.
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

Re: email corrupted, again!

Post by freetheware »

UPDATE:

That's a great article on compacting the folders, corrupted folders, etc. Thanks!!

I setup a Thunderbird profile using maildir. I immediately ran into a problem of Thunderbird not downloading attachments of the 'last few' emails in all (most?) of my folders. Odd. Wiki stated Thunderbird+maildir wasn't for wide use yet (you even have to configure it in about:config rather than the gui).

So, I'm back to using Thunderbird again, but am setting inbox to auto compact, often.
We'll see how it goes.

Thanks!
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

Re: email corrupted, again!

Post by freetheware »

Just an update..all has been good. Until today....another email corrupted. Header/subject line of email "a", but when looking at the email, it has a body of email "b". I have been compacting folders daily. I'm just surprised this still happens. I'd think one thing a email client should get right, is non-corruption of emails.

Maybe I'll try maildir again. Uggg.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: email corrupted, again!

Post by tanstaafl »

Is the actual message on the server being corrupted, or just the folder listing? Log into webmail using a browser and see if the message matches what Thunderbird displays.

If a message stored in either a mbox or a maildir file is corrupted I wouldn't expect you to see that in Thunderbird unless you are configured to work offline.
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

Re: email corrupted, again!

Post by freetheware »

The message on the server was not corrupted. I am configured to work offline. I've switched to maildir, so far so good. Any major known issues with maildir? That is, should I switch back to mbox and turn off 'work offline'?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: email corrupted, again!

Post by tanstaafl »

See Operations still unsuccessful with Maildir in https://wiki.mozilla.org/Thunderbird/Maildir

If the only corruption is in the maildir file (showing up when you open the message or look at the folder listing when working offline) have you checked that your file system is healthy (no bad sectors etc.)?

"I immediately ran into a problem of Thunderbird not downloading attachments of the 'last few' emails in all (most?) of my folders."
See http://kb.mozillazine.org/Entire_messag ... wanted=all . Check that mail.imap.mime_parts_on_demand is true and how big is mail.imap.mime_parts_on_demand_threshold . The latter determines how much of a message is downloaded by default when you don't try to open an attachment.
freetheware
Posts: 16
Joined: May 4th, 2016, 9:47 am

Re: email corrupted, again!

Post by freetheware »

I thought I posted a response....
Good idea on the file system; I ran fsck and no issues were found.

Now, using maildir, it seems confused about an attachment. It shows size as 1.7Mb in the email pane but downloads to a directory at zero size. uggggg. I'll try again with addons disabled.
I guess I can be happy that using mbox, it took several years to get a corrupt email, and that the corruption is only on the client side. I could just delete my mbox folders, reload, etc.
Post Reply