Author Topic: Inbox for a specific user does not refresh - FIXED.  (Read 6084 times)

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh - FIXED.
« on: August 27, 2009, 12:03:14 PM »
I have a very odd problem.

First of all, I'm using:

RoundCube 0.3RC
Gentoo, kernel 2.6.28-gentoo-r5
MySQL 5.0.76-r1
Apache 2.2.11
PHP 5.2.9-r2
Dovecot 1.1.15 IMAP

When one specific user logs in, they cannot view any new mail message unless they click to a folder other than Inbox and then back again.

The Inbox folder simply does not update automatically, and even manually clicking "Check for new messages" shows nothing new.

Every other user on the system works just fine.  This happens across multiple computers and multiple browsers.

I created a new "test" user, did a cp -a of the user's .maildir, a chown -R test:test /home/test/.maildir - and when I logged in as this new user, everything worked (and they could see all of the failing user's email messages).

I actually deleted the system account for this problem user (after backing up their .maildir), recreated it, restored the .maildir directory, and set permissions.  The same thing happens.

I've deleted the RoundCube database entry for this user - to no effect.

I've set "$rcmail_config['enable_caching'] = FALSE;".

I'm pretty much at a loss as to further troubleshooting or having any idea what might be happening with this one specific username.

Any ideas at all?
« Last Edit: August 28, 2009, 08:10:58 AM by Jason_Bassford »

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #1 on: August 27, 2009, 12:48:25 PM »
I should also mention that, for this user, the Inbox is automatically refreshed in every other email and Web client I've used.  (SquirrelMail, Horde/Imp, Seamonkey Mail...)  So the incompatibility is specific to RoundCube and this user.

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #2 on: August 28, 2009, 08:10:40 AM »
I fixed it!

I ended up making sure that the user had read of all of the email in their Inbox.  I then backed up and deleted their .maildir directory.  At this point, RoundCube recreated what it needed to and everything worked.  I copied back over the .Sent and other user-created mail folders with their existing messages.  Everything still worked.

I still have no idea why the exact contents of the .maildir directory failed for this username but not for a different one, but everything is good now.

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #3 on: September 02, 2009, 11:01:09 PM »
Okay, so it turns out that the above did not fix it.  A day after, the same thing happened again.  I got really frustrated because I went through everything I had before without it working this time.

However, in the end, I came up with the real answer and I can reproduce the problem and solution on demand.

The issue is that this user was accessing their IMAP mail from a different client (SeaMonkey Mail) at home at the same time as using RoundCube while at work.  During the previous testing, and in pure coincidence, SeaMonkey mail had been turned off - making me think that it was something I'd done to fix the problem.  However, it wasn't.

Any time I want to prevent RoundCube from automatically displaying new mail messages - without having to click to a different folder from Inbox and then back again - all I have to do is make sure that the IMAP server is being accessed concurrently by another IMAP client for the same username.  It seems that this concurrent access interferes with RoundCube in some fashion.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Inbox for a specific user does not refresh.
« Reply #4 on: September 03, 2009, 01:06:37 AM »
The reason is that the recent flag of new messages is toggled by the other imap client. The check for new mail function checks if a mailbox has recent flags. If detected it adds new messages by an ajax call. The folder selection loads the box completely. That's the difference.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #5 on: September 03, 2009, 09:25:15 AM »
Ah!  Cheers.  So I would either have to have RC ignore the recent flag and just reload every so often no matter what - or I would need to have the other client not set that.  (I'm not sure what affect either of those would have.)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Inbox for a specific user does not refresh.
« Reply #6 on: September 03, 2009, 05:13:44 PM »
I don't think you can fix this issue (yet). I'm not a php/imap guru, but most desktop clients use the IMAP server IDLE module, if supported. This means that the client quits a request by sending "idle" to the server. If there is a change for an idle connection then the server connects to the client and "tells" the client what has changed. Webmail apps such as RoundCube supports only a one way communication. Means that only the client is able to establish a connection to the server. The server can't connect to the browser. IMO, the only way is to disable the IDLE module in the server and to set the client not to check for new messages automatically.

Hope you understand my poor english description.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #7 on: September 08, 2009, 11:07:48 AM »
Hmm.  I've just tested and, having SeaMonkey Mail open, both SquirrelMail and Horde/Imp both accurately detect new mail when it comes in - even though there's another active IMAP connection.

I'm guessing that this would be because both SquirrelMail and Horde support two way communication, unlike RoundCube?

How about this instead.  Rather than having RoundCube check for new mail every so often, is there a way of simply having it grab the total number of messages in the Inbox, and updating that?  If that's possible, then I would know simply by the number increasing (and I often deal with new mail right away anyway - so any number displayed would mean something new).  I suppose that in theory a conditional statement could also be used so that if the current number is greater than the previously displayed number, the assumption is that there's something new.  In that way, the existing mechanism based on IDLE could be simply be replaced. (I may well still be misunderstanding this.)
« Last Edit: September 08, 2009, 11:10:22 AM by Jason_Bassford »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Inbox for a specific user does not refresh.
« Reply #8 on: September 08, 2009, 01:38:40 PM »
Yes, but that's not failsafe. RoundCube devs won't accept this approach, IMO. Try your luck with a ticket @ trac.roundcube.net
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #9 on: September 11, 2009, 10:56:08 AM »
I wasn't able to email that address:

: host trac.roundcube.net[64.34.171.35] said: 554
    5.7.1 : Relay access denied (in reply to RCPT TO
    command)

I tried from both my home and work email addresses...

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Inbox for a specific user does not refresh.
« Reply #10 on: September 11, 2009, 03:52:22 PM »
rosali meant goto Roundcube Webmail and open a ticket, or even better add your thoughts to an existing one on the subject like #1486106 (New messages don't appear immediatly) ? Roundcube Webmail
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Inbox for a specific user does not refresh.
« Reply #11 on: September 11, 2009, 04:20:35 PM »
Thanks, that made it clearer.

For what it's worth, the specific issue of concurrent email client access throwing off RC's Inbox is Check mail (#1485784).

Offline Araguaci

  • Newbie
  • *
  • Posts: 5
    • http://www.artesdosul.com
fixed in template
« Reply #12 on: April 29, 2010, 03:06:15 PM »
I'm could fixed only with this code:

/webmaildesenv/skins/[name]/templates/mail.html
...
   



...