Thursday, October 18, 2012

Folder empty in HORDE / IMP, but folder has content

Horde / IMP Empty Mailbox

I have been using the Horde groupware suite for many years now, and cannot remember ever having any problems other than minor issues in connection with upgrades of either Horde itself or the OS on the machine where Horde is installed.
A couple of days ago, however, all of a sudden my inbox displayed the following message, even though there were plenty of messages both read and unread in the folder:
There are no messages in this mailbox.
The funny thing was, I could see all of the messages in the folder if I did a search for a string that was not found - for example search for messages in inbox from "nosuchuser".
Some searching revealed that others have occassionally seen a similar problem, and there seemed to be a connection to the IMP preferences for the user having the problem. The most common recommended solution was to delete all of the imp preferences for the user.

Since I have a lot of customized settings, I wanted to avoid that if possible, so I went digging. I tracked the problem down to a garbled setting in the sortpref preference setting.
The solution for me was to reset sortpref to its' default setting. I did this with the following SQL code:

update horde_prefs set pref_value='a:0:{}' where pref_uid='USERNAME' and pref_name='sortpref' and pref_scope='imp';

(Of course, you have to replace USERNAME with the actual username of the user having the problem)

After logging out and back in again, the problem was fixed.

Originally written: 2011-03-28

Origin from here: http://tips.negaard.net/info/HordePrefs.html