Bug Report
[email protected] Mon, 28 Sep 2015 21:35:53 -0700
| Newsgroups | gmane.mail.squirrelmail.plugins |
|---|---|
| Message-ID | <[email protected]> |
I am subscribed to the mailing list.
(applies when you are sending email to SquirrelMail mailing list)
[X] True - No need to CC me when replying
[ ] False - Please CC me when replying
This bug occurs when:
New Mail Options->Count only messages that are RECENT: checked
AND
New Mail Options->Change title on supported browsers: checked
AND
Folder preferences->Folder List Options->Enable Unread Message Notification is set to: Only Inbox
AND
Folder preferences->Folder List Options->Unread Message Notification Type is set to: Only Unseen
The description of the bug:
The browser title always displays "0 New Messages". When a RECENT mail arrives the number should
increase by 1. It does not.
I can reproduce the bug by:
1.) Enable New Mail plugin.
2.) Set 4 options in New Mail and Folder Preferences as described above under "This bug occurs when:"
3.) Select a folder other than the Inbox. (I'm pretty sure if the inbox is in focus the new mail
will not be determined to be RECENT. I checked this by monitoring
/var/spool/mail/vhosts/example.com/username/new/. When The inbox is viewed the message gets
transfered to /var/spool/mail/vhosts/example.com/username/cur/. Directory cur is the inbox, I'm
guessing new is untouched)
4.) Send yourself an email from Squirrelmail or another client. Just don't go back to your inbox.
Instead wait for a refresh or click [Check Mail] in the upeer left pane. 0 New Messages should
remain unchanged.
5.) Change Folder preferences->Folder List Options->Unread Message Notification Type to: Unseen
and Total
(Optional) I got bored and found the bug occurs in:
/functions/imap_mailbox.php
function sqimap_get_status_mbx_tree
else condition starting on line 1411
(Optional) I got really bored and here's a fix:
Really all that needs to be done is to add: $oMbx->recent = $aStatus['RECENT'];
But I got really really bored and changed depricated function sqimap_unseen_messages to preferred
function sqimap_status_messages.
user@host:~# diff -u0 /usr/share/squirrelmail.devel/functions/imap_mailbox.php
/usr/share/squirrelmail.devel/functions/imap_mailbox.patch.php
--- /usr/share/squirrelmail.devel/functions/imap_mailbox.php 2015-01-02 20:09:49.000000000 -0800
+++ /usr/share/squirrelmail.devel/functions/imap_mailbox.patch.php 2015-09-28
13:05:15.743951074 -0700
@@ -1412 +1412,3 @@
- $oMbx->unseen = sqimap_unseen_messages($imap_stream,$oMbx->mailboxname_full);
+ $aStatus = sqimap_status_messages($imap_stream,$oMbx->mailboxname_full);
+ $oMbx->unseen = $aStatus['UNSEEN'];
+ $oMbx->recent = $aStatus['RECENT'];
----------------------------------------------
My browser information:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
My web server information:
PHP Version 5.6.13-0+deb8u1
PHP Extensions (List)
* 0 = Core
* 1 = date
* 2 = ereg
* 3 = libxml
* 4 = openssl
* 5 = pcre
* 6 = zlib
* 7 = bcmath
* 8 = bz2
* 9 = calendar
* 10 = ctype
* 11 = dba
* 12 = dom
* 13 = hash
* 14 = fileinfo
* 15 = filter
* 16 = ftp
* 17 = gettext
* 18 = SPL
* 19 = iconv
* 20 = mbstring
* 21 = session
* 22 = posix
* 23 = Reflection
* 24 = standard
* 25 = shmop
* 26 = SimpleXML
* 27 = soap
* 28 = sockets
* 29 = Phar
* 30 = exif
* 31 = sysvmsg
* 32 = sysvsem
* 33 = sysvshm
* 34 = tokenizer
* 35 = wddx
* 36 = xml
* 37 = xmlreader
* 38 = xmlwriter
* 39 = zip
* 40 = apache2handler
* 41 = PDO
* 42 = intl
* 43 = json
* 44 = ldap
* 45 = mcrypt
* 46 = mysql
* 47 = mysqli
* 48 = pdo_mysql
* 49 = readline
* 50 = mhash
* 51 = Zend OPcache
SquirrelMail-specific information:
Version: 1.5.2 [SVN]
Plugins (List)
* 0 = Compatibility (compatibility) 2.0.16
* 1 = Autocomplete (autocomplete) 3.0
* 2 = New Mail (newmail) CORE
* 3 = Bug Report (bug_report) CORE
My IMAP server information:
Server type: dovecot
Capabilities: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT=DISPLAY
THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT
CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE
------------------------------------------------------------------------------
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins