6.0.0-beta1
7/13/25

[#13157] Subscriptions to folders with names consisting only of digits does not work.
Summary Subscriptions to folders with names consisting only of digits does not work.
Queue IMP
Queue Version 6.1.7
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester ktm+imp (at) rice (dot) edu
Created 05/01/2014 (4091 days ago)
Due
Updated 05/29/2014 (4063 days ago)
Assigned 05/23/2014 (4069 days ago)
Resolved 05/29/2014 (4063 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/29/2014 11:48:08 PM Michael Slusarz Comment #12
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
I did not include it in my previous update, but I really think that it has to
do with the parsing.
Nope.  We parse everything as string values.

It was an issue with PHP's array_merge().  It automatically reindexes 
array keys that are *numeric* ... meaning it disregards the current 
variable type.  The documentation is not clear about this (it uses the 
term "numeric" without defining it).  So we need to use the '+' 
operator instead to avoid this behavior.
05/29/2014 11:45:27 PM Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit 321b79fa90a12d777477a8ec1f14b08102c3624a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu May 29 17:29:37 2014 -0600

     [mms] Fix working with mailboxes containing entirely integers 
(Bug #13157).

  .../Imap_Client/lib/Horde/Imap/Client/Socket.php   |    2 +-
  framework/Imap_Client/package.xml                  |    2 ++
  2 files changed, 3 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/321b79fa90a12d777477a8ec1f14b08102c3624a
05/23/2014 09:32:15 PM ktm+imp (at) rice (dot) edu Comment #10 Reply to this comment

[Show Quoted Text - 10 lines]
I did not include it in my previous update, but I really think that it has to
do with the parsing. Even though Dovecot uses an empty namespace
from the test logs, it returns the folder name as (2011) and cyrus without
the altnamespace has a folder name of INBOX.2011. It is definitely the
case, that as long as there is a single non-digit character the problem
does not occur. It looks like a problem parsing the IMAP server response.

Regards,
Ken
05/23/2014 09:19:49 PM Michael Slusarz Comment #9 Reply to this comment
This definitely shows the bug. It works for you with Cyrus because 
the folder name has non-digits in it, ie. INBOX.123. If you enable 
altnamespace
Except the altnamespace you have (empty) is exactly what Dovecot uses. 
  And Dovecot not only works for you, but is what I develop on myself.

I will go back and configure Cyrus on my test VM to use this 
altnamespace, but I am doubtful that will change anything.
05/23/2014 12:54:56 PM ktm+imp (at) rice (dot) edu Comment #8 Reply to this comment
Cyrus 2.3.x:
C: 2 LSUB "" 2011
Looking at this... what is your namespace on the Cyrus server?   
These mailboxes are being created in the empty namespace... which 
may not be in the personal namespace (at least in the default Cyrus 
config).
We use the altnamespace:

        altnamespace: 0
             Use  the  alternate  IMAP  namespace, where personal 
folders reside at the same level in the
             hierarchy as INBOX.

        This option ONLY applies where interaction takes place with 
the client/user.  Currently  this  is
        limited  to  the  IMAP protocol (imapd) and Sieve scripts 
(lmtpd).  This option does NOT apply to
        admin tools such as cyradm (admins ONLY), reconstruct, quota,   
etc.,  NOR  does  it  affect  LMTP
        delivery of messages directly to mailboxes via plus-addressing.

This definitely shows the bug. It works for you with Cyrus because the 
folder name has non-digits in it, ie. INBOX.123. If you enable 
altnamespace, you should definitely be able to reproduce it.

Regards,
Ken
05/23/2014 06:15:49 AM Michael Slusarz Comment #7 Reply to this comment
Cyrus 2.3.x:
C: 2 LSUB "" 2011
Looking at this... what is your namespace on the Cyrus server?  These 
mailboxes are being created in the empty namespace... which may not be 
in the personal namespace (at least in the default Cyrus config).
05/23/2014 06:13:08 AM Michael Slusarz Comment #6
State ⇒ Feedback
Reply to this comment
Can't reproduce on CentOS 6.5 with Cyrus 2.3.16 (IMP 6.2):
Fri, 23 May 2014 00:07:38 -0600
Connection to: imap://centos.curecanti.org/
Server connection took 0.0014 seconds.
S: * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS 
COMPRESS=DEFLATE] centos.curecanti.org Cyrus IMAP 
v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5 server ready
1 [LOGIN Command - username: slusarz]
S: 1 OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED 
COMPRESS=DEFLATE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE 
UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT 
SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE 
CATENATE CONDSTORE SCAN IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE 
URLAUTH] User logged in
CACHE: Using the Horde_Imap_Client_Cache_Backend_Cache storage driver.
C: 2 LSUB "" INBOX.123
S: 2 OK Completed (0.000 secs 1 calls)
Command 2 took 0.0004 seconds.
C: 3 LIST "" INBOX.123
S: 3 OK Completed (0.000 secs 1 calls)
Command 3 took 0.0002 seconds.
C: 4 CREATE INBOX.123
S: 4 OK Completed
Command 4 took 0.7458 seconds.
C: 5 SUBSCRIBE INBOX.123
S: 5 OK Completed
Command 5 took 0.1064 seconds.
C: 6 LSUB "" INBOX.123
S: * LSUB () "." "INBOX.123"
S: 6 OK Completed (0.000 secs 2 calls)
Command 6 took 0.001 seconds.
C: 7 LIST "" INBOX.123
S: * LIST (\HasNoChildren) "." "INBOX.123"
S: 7 OK Completed (0.000 secs 2 calls)
Command 7 took 0.0005 seconds.
C: 8 LOGOUT
S: * BYE LOGOUT received
S: 8 OK Completed
Command 8 took 0.0009 seconds.
For the record: there is nothing off about the server responses in 
your IMAP log (other than the fact I am assuming you cut out some 
responses, since it is missing a bunch of stuff in there).
05/20/2014 08:50:02 PM ktm_imp (at) rice (dot) edu Comment #5 Reply to this comment

[Show Quoted Text - 10 lines]
Okay, sorry for the delay. I set up a test Dovecot 2.2 server and sure 
enough the problem is not seen with that backend. We see it on our 
Cyrus IMAPD 2.3.14 from EPEL. Here is a transcript of the IMAP logs 
for creating a top-level folder with only digits in both Dovecot and 
Cyrus:

Cyrus 2.3.x:
C: 2 LSUB "" 2011
C: 3 LIST "" 2011
C: 4 LSUB "" 2011
C: 5 LIST "" 2011
C: 6 CREATE 2011
C: 7 SUBSCRIBE 2011
C: 8 LIST "" 2011
S: * LIST (\HasNoChildren) "/" "2011"
S: * LSUB () "/" "2011"
S: * LIST (\HasNoChildren) "/" "2011"

Dovecot 2.2:
C: 3 LIST () "" (2011)
C: 4 LIST () "" (2011)
C: 5 CREATE 2011
C: 6 SUBSCRIBE 2011
C: 7 LIST () "" (2011)
S: * LIST (\NoInferiors \UnMarked) "/" "2011"
S: * LIST (\Subscribed \NoInferiors \UnMarked) "/" "2011"

Hopefully, you can see why this causes a problem with a Cyrus backend. 
If there are any characters other than numbers in the top-level folder 
name, it works for Cyrus too.

Regards,
Ken
05/15/2014 10:05:55 PM Michael Slusarz State ⇒ No Feedback
 
05/09/2014 05:42:49 AM Michael Slusarz Comment #4 Reply to this comment
Can't reproduce on either IMP 6.1.8 or IMP 6.2.

See, e.g.:
https://github.com/horde/horde/commit/ff633998cb0c30f271316de26e707ac6e56a0688
Thank you for the response. I will try to dig into it further. What 
IMAP backend are you using for your testing? Maybe the problem 
relates to an interaction there which is why you cannot reproduce it.
Dovecot 2.2.
05/03/2014 04:04:45 PM ktm+imp (at) rice (dot) edu Comment #3 Reply to this comment
Can't reproduce on either IMP 6.1.8 or IMP 6.2.

See, e.g.: 
https://github.com/horde/horde/commit/ff633998cb0c30f271316de26e707ac6e56a0688
Thank you for the response. I will try to dig into it further. What 
IMAP backend are you using for your testing? Maybe the problem relates 
to an interaction there which is why you cannot reproduce it.

Regards,
Ken
05/03/2014 03:57:06 AM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Can't reproduce on either IMP 6.1.8 or IMP 6.2.

See, e.g.: 
https://github.com/horde/horde/commit/ff633998cb0c30f271316de26e707ac6e56a0688
05/01/2014 05:33:42 PM ktm+imp (at) rice (dot) edu Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Subscriptions to folders with names consisting only of digits does not work.
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
When a folder is created with a name that is composed ONLY of digits 
(0-9), it does not show properly on the subscribed folders after a 
logout/login. If any non-digit is added to the folder name (i.e. space 
or other alpha) using rename, the folder shows up properly as 
subscribed. I noticed this when helping a user archive their Email by 
year to clear their INBOX. Any assistance would be appreciated.

Regards,
Ken

Saved Queries