How to fix a malformed .journal.db with a SQLite error

This article will show you how to fix a corrupt .journal.db that is being reported in the error log.

Issue encountered

The best way to see if the .journal.db needs fixing is to look for the following line in the error log:

[11/May/2012 10:13:33] SQLiteDbWriteCache.h: [Mail Path]/[Domain]/[Username]/.journal.db: runVacuum - SQLite error: code 11, error SQLITE_CORRUPT[11]: database disk image is malformed

This error normally does not cause the user any problems but it can fill the error log up with many lines of the same error.


To correct this error:

  1. Stop Kerio Connect
  2. Navigate to your Kerio Store folder, default paths are below:
  • Windows: C:\Program Files\Kerio\MailServer\Store\Mail
  • Mac: /usr/local/kerio/mailserver/store/mail
  • Linux:/opt/kerio/mailserver/store/mail
  1. Delete the .journal.db that is reported in the error log
  2. Start Kerio Connect

This file rebuilds itself, usually instantly, but sometimes it can take a while. Note however that this should not affect the users' ability to use their email accounts.