• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Horde "There are no messages in this mailbox" when there are

SalvadorS

Regular Pleskian
Hello,

I have a server (Debian 6.0.6) with Plesk 11 up to date and Horde 4.3.11

If I use webmail (horde) and access to a mailbox of one of our clients and even though there were plenty of messages both read and unread in the inbox folder I don´t see anyone. Only: There are no messages in this mailbox.

If I search inside inbox folder then I can see the emails.

Any ideas of how to fix this?

Thanks
 
Last edited:
Error fixed

Hello,

It seems there is a Horde error.

In the database table horde_prefs appear entries with sorting direction set to "" (an empty string), like that:
userxy imp sortpref
a:1:{s:5:"INBOX";a:2:{s:1:"b";s:1:"2";s:1:"d";s:0:"";}}
In this case the user gets the message 'There are no messages in this mailbox.' in the inbox screen, even if the inbox contains seen or unseen messages

You can fix this issue editing this file:

/usr/share/psa-horde/imp/lib/IMP.php

You have to add these lines:

/* check for empty direction */
if ($ob['dir'] === "") {
$ob['dir'] = $GLOBALS['prefs']->getValue('sortdir');
}

Just before:

/* Can't do threaded searches in search mailboxes. */
if (!IMP::threadSortAvailable($mbox)) {
if ($ob['by'] == SORTTHREAD) {

Final result:

/* check for empty direction */
if ($ob['dir'] === "") {
$ob['dir'] = $GLOBALS['prefs']->getValue('sortdir');
}

/* Can't do threaded searches in search mailboxes. */
if (!IMP::threadSortAvailable($mbox)) {
if ($ob['by'] == SORTTHREAD) {


I tested myself and worked.

I found this solution in http://bugs.horde.org/ticket/11100

Wish it helps in the future.

Regards
 
Thank you. This is very useful. I think I'm seeing this on one of our systems and I'll try this fix. Either way I'm sure it will help others. Much appreciated.
 
Hello,

I tried above solution. I added in

# vi /usr/share/psa-horde/imp/lib/IMP.php
1535 /* check for empty direction */
1536 if ($ob['dir'] === "") {
1537 $ob['dir'] = $GLOBALS['prefs']->getValue('sortdir');
1538 }
1539
1540 /* Can't do threaded searches in search mailboxes. */
1541 if (!IMP::threadSortAvailable($mbox)) {
1542 if ($ob['by'] == SORTTHREAD) {
1543 $ob['by'] = SORTDATE;
1544 }
1545 }

but still it is not working. Still my client Inbox shows "There are no messages in this mailbox."

After doing this changes is there any service needs to restart ?

But if I check by command line in client Inbox in below directory :
/var/qmail/mailnames/example.com/abcxyz/Maildir/cur
it shows 492 messages but not in webmail.

Please help me to solve this.

Thanks
 
Back
Top