GNOME Bugzilla – Bug 582494
Unread count in database not consistend
Last modified: 2010-03-26 17:24:41 UTC
Please describe the problem: I'm using Evolution 2.26.1-0ubuntu1 on Ubuntu 9.04 as IMAP client. The IMAP server runs Courier IMAP on Debian. The unread_count in the database is often not in sync with the server and the state on disk. An example: $ sqlite3 folders.db SQLite version 3.6.10 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .headers ON sqlite> .mode line folders sqlite> SELECT * FROM folders WHERE folder_name='INBOX/mysql'; folder_name = INBOX/mysql version = 14.0 flags = 0 nextuid = 0 time = 0 saved_count = 2 unread_count = 2 deleted_count = 0 junk_count = 0 visible_count = 2 jnd_count = 0 bdata = 3 1239302115 sqlite> .quit $ cd folders/INBOX/subfolders/mysql $ ls -l total 4 -rw-r--r-- 1 dveeden dveeden 183 2009-05-13 17:24 cmeta -rw-r--r-- 1 dveeden dveeden 0 2009-05-13 17:27 journal $ The GUI shows this: folders: "mysql(2)" message list: "There are no messages in this folder" The server: $ cd Maildir/.mysql/ $ find . . ./tmp ./new ./cur ./maildirfolder ./courierimapacl ./courierimapuiddb ./courierimapkeywords $ 1. The GUI should update the database if the message count in the database is not 0 and there are no messages in the folder to display. This happens mostly when I delete (but not expunge) mail using Evolution, then expunge using some other application. It does not update when I click refresh in the context menu of the folder. Connect/Disconnect also doesn't solve the issue. It does update when I receive new mail in that folder. Steps to reproduce: To reproduce: 1. evolution --force-shutdown 2. sqlite3 /path/to/folders.db 3. UPDATE folders SET unread_count='100' WHERE folder_name='Some/Foldername'; 4. Start evolution 5. New mail count is wrong 6. Send email to that mailbox to fix. Actual results: Expected results: Does this happen every time? Yes, I'm able to reproduce it. Other information:
You definitely shouldn't touch the disk numbers. Infact, the visible count is the most closer one to what you see, specially junk can be unread. Anyways, lemme try your approach and see how to take care.
*** This bug has been marked as a duplicate of bug 577542 ***