Evolution picks up mail but fails to put it in the inbox

The error message is “database disk image is malformed (/home/gunter/.local/share/evolution/mail/local/folders.db)”. I suspect the database got corrupted when the SSD had a hick-up (since then, the SSD tested fine). Version is 3.44.4-0ubuntu2. How can this “malformation” be fixed? I already did a back-up of Evolution, just in case.

Hi,
it’s an SQLite database file. They have some repair functions, but if they won’t work, you can remove the file and it’ll be re-created when you start Evolution again. The only downside is that the file contains meta data about the packages, including Labels, Follow-up flags and many other, thus when the file is created from scratch, this information is lost.

Try to run from a terminal:

sqlite3 ~/.local/share/evolution/mail/local/folders.db "PRAGMA integrity_check;"

You can try to vacuum the file too, though I’m not sure whether it’ll help. That’s with:

sqlite3 ~/.local/share/evolution/mail/local/folders.db "VACUUM;"

If neither that helps, then move away the file. There might be other methods to restore the broken file, or at least the parts it has working (I’d imagine an export to a text file and then importing the text file to a fresh database), I only do not know any such at the moment, neither I’ve a pointer to it, I’m sorry.

Bye,
Milan

Hi Milan
I’m gobsmacked! I didn’t expect an answer so fast, and so professional!
I tried “VACUUM”, and it seems to have fixed the problem! The disappeared messages re-appeared, and so far, fetching new messages also works, and I see no reason why this should change.
So a huge THANK YOU for your generous help. Sharing your experience saved me a lot of time and trouble.
Cheers, Gunter

Hi,

I didn’t expect an answer so fast

It was only a luck, I’ve been passing around and noticed the question. It takes longer usually, sometimes even days.

I tried “VACUUM”,

If you did not, run also the integrity check, it should uncover hidden issues, hopefully (I’m a bit confused what it catches and what not; no SQLite expert here).

In any case, good it’s working for you again.

Bye,
Milan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.