SOGo - BTS - SOGo
View Issue Details
0000736SOGoWeb Mailpublic2010-08-07 13:312011-04-09 15:38
cwright 
ludovic 
normalminoralways
resolvedfixed 
1.3.0 
1.3.6 
0000736: New mail displays only after second check
After upgrading to 1.3.0, we've noted that new mails only display for reading after the second time SOGo checks for new mail (either automatically or manually via the "Get Mail" button).

Between the first and second checks for new mail, new messages are indicated next to the Inbox folder, but cannot be seen in the main webmail window. (See the attached screenshot.)
IMAP server is Dovecot 1.0.15.

Other mail clients don't have this issue.

Thank you!
No tags attached.
png sogo_webmail.png (33,981) 2010-08-07 13:31
https://sogo.nu/bugs/file_download.php?file_id=184&type=bug
png
Issue History
2010-08-07 13:31cwrightNew Issue
2010-08-07 13:31cwrightFile Added: sogo_webmail.png
2010-08-25 17:04ludovicNote Added: 0001355
2010-08-25 17:04ludovicStatusnew => resolved
2010-08-25 17:04ludovicFixed in Version => 1.3.2
2010-08-25 17:04ludovicResolutionopen => fixed
2010-08-25 17:04ludovicAssigned To => ludovic
2010-08-26 11:08cwrightNote Added: 0001365
2010-08-26 11:08cwrightStatusresolved => feedback
2010-08-26 11:08cwrightResolutionfixed => reopened
2010-11-15 13:43cwrightNote Added: 0001817
2010-11-15 18:31francisNote Added: 0001822
2010-11-15 18:31francisStatusfeedback => resolved
2010-11-15 18:31francisResolutionreopened => fixed
2010-11-15 18:31francisFixed in Version1.3.2 => 1.3.4
2010-11-19 16:03cwrightNote Added: 0001875
2010-11-19 16:03cwrightStatusresolved => feedback
2010-11-19 16:03cwrightResolutionfixed => reopened
2011-02-02 12:27francisNote Added: 0002072
2011-02-02 12:59cwrightNote Added: 0002073
2011-02-02 13:02francisNote Added: 0002074
2011-02-02 13:29cwrightNote Added: 0002075
2011-02-02 16:26francisNote Added: 0002076
2011-02-15 17:03ludovicNote Added: 0002116
2011-02-15 20:16cwrightNote Added: 0002119
2011-02-23 14:01francisNote Added: 0002159
2011-02-23 14:03francisNote Edited: 0002159
2011-03-04 01:06AshokNote Added: 0002190
2011-04-09 15:38cwrightNote Added: 0002358
2011-04-09 15:38ludovicStatusfeedback => resolved
2011-04-09 15:38ludovicFixed in Version1.3.4 => 1.3.6
2011-04-09 15:38ludovicResolutionreopened => fixed

Notes
(0001355)
ludovic   
2010-08-25 17:04   
This should no longer be the case in the upcoming 1.3.2 version. Verify on sogo-demo.inverse.ca if you want.
(0001365)
cwright   
2010-08-26 11:08   
Thank you, Ludovic. Unfortunately I still see this issue in the CentOS nightly (201008260647).

Don't know if this is pertinent, but at one point I had it briefly working normally again after removing the files in /tmp: clay GNUstepSecure502 hsperfdata_root and restarting the server. Another server restart and the issue returned and I haven't been able to clear it again.

I don't see any errors in the SOGo or Dovecot logs.
(0001817)
cwright   
2010-11-15 13:43   
More info on this, FWIW.

Testing 201011150650 to see if any of the recent changes have resolved this, I've also noticed that the reverse situation can also occur. If I use only "Manual" checking for new mails, the number of new mails displayed next to Inbox never gets updated, though the new mails show up in the Inbox correctly.

Looking at sogo.log I've noticed different entries for automatic and manual mail checks.

Automatic checks generate:
localhost.localdomain - - [15/Nov/2010:12:18:15 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/uids HTTP/1.1" 200 6914/44 0.093 17337 60% 0
localhost.localdomain - - [15/Nov/2010:12:18:15 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/unseenCount HTTP/1.1" 200 13/0 0.042 - - 0

Manual checks generate:
localhost.localdomain - - [15/Nov/2010:12:20:28 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/uids HTTP/1.1" 200 6914/44 0.067 17337 60% 0

Could the missing line for unseenCount explain the behavior of the new messages count being off during manual mail checks?
(0001822)
francis   
2010-11-15 18:31   
Fixed in revision 1a7fb070202750af8cc8edfa2a6ffba467b2b25b.
(0001875)
cwright   
2010-11-19 16:03   
The fix helped, but the original issue still remains for us (Dovecot 1.0.15).

Here's some more info from my testing and watching the SOGo logs.

When a new mail arrives to my Inbox, I see different log entries when SOGo first checks for mail and then checks a second time. The logs (and behavior) are the same if the checks are manual or automatic.

FIRST CHECK (new mail count correct, new mail not in Inbox):

localhost.localdomain - - [19/Nov/2010:14:50:45 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/uids HTTP/1.1" 200 7056/44 0.076 17708 60% 0
localhost.localdomain - - [19/Nov/2010:14:50:45 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/unseenCount HTTP/1.1" 200 13/0 0.041 - - 0


SECOND CHECK (new mail shows up in Inbox):
localhost.localdomain - - [19/Nov/2010:14:51:45 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/unseenCount HTTP/1.1" 200 13/0 0.060 - - 0
localhost.localdomain - - [19/Nov/2010:14:51:45 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/uids HTTP/1.1" 200 7061/44 0.065 17715 60% 0
localhost.localdomain - - [19/Nov/2010:14:51:46 GMT] "POST /SOGo/so/cwright/Mail//0/folderINBOX/headers HTTP/1.1" 200 566/16 0.059 - - 0

I hope this helps. Thank you!
(0002072)
francis   
2011-02-02 12:27   
I just tried with SOGo 1.3.5a and dovecot 1.2.15. Everything works fine. Can you confirm?
(0002073)
cwright   
2011-02-02 12:59   
Hey Francis. We're still on Dovecot 1.0.15 with Debian Lenny. Still have the same behavior. The Inbox count shows new mails that aren't displayed in the Inbox until a second check.

I noted Squeeze will be stable in just a few days and has Dovecot 1.2.15 -- so maybe this won't be an issue for us much longer.
(0002074)
francis   
2011-02-02 13:02   
What version of SOGo are you running?
(0002075)
cwright   
2011-02-02 13:29   
Ah yes -- SOGo 1.3.5a on CentOS.
(0002076)
francis   
2011-02-02 16:26   
Make sure to empty your browser's cache.

Can you sniff the IMAP traffic? tcpflow does a nice job. Example :

tcpflow -i lo -c 'tcp port 143'

Thanks!
(0002116)
ludovic   
2011-02-15 17:03   
Any updates on this?
(0002119)
cwright   
2011-02-15 20:16   
I emailed Francis the requested trace. I can post here if need be. Thanks!
(0002159)
francis   
2011-02-23 14:01   
(edited on: 2011-02-23 14:03)
When the problem happens, the server doesn't return the message UID during the "UID SORT" operation but does during the "UID SEARCH (UNSEEN)" operation.

(0002190)
Ashok   
2011-03-04 01:06   
This appears for me too. sogo version 1.3.5
(0002358)
cwright   
2011-04-09 15:38   
This appears resolved for me after an upgrade to SOGo 1.6.

Still using Dovecot 1.0.15 but I don't see the issue any longer. Thanks!