Opened 2 years ago

Closed 2 years ago

#1487657 closed Bugs (fixed)

imap folders wrong prefix

Reported by: glen Owned by:
Priority: 4 Milestone: 0.5-stable
Component: IMAP connection Version: 0.5-beta
Severity: major Keywords:
Cc:

Description

i encountered rather odd problem when upgraded from 0.5-beta to 0.5-rc

i seem to be no longer see private folders starting with s* (altho one private folder i can access), it says:
"Server Error: SELECT Mailbox does not exist, or must be subscribed to."

config part:

$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;

or even if i force ns:

$rcmail_config['imap_ns_personal'] = 'INBOX.';
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = 'shared.';

in the picture :
...

  • pld OK
  • servers FAIL
  • shared (shared folder top dir) OK
  • Spam OK
  • subscriptions FAIL
  • svn FAIL
  • trash FAIL

if i used C locale sorting, the Spam would be before "shared", so "shared" namespace corrupts all other private folders?

for "subscriptions" folder i enabled imap log and it shows:

[27-Dec-2010 11:48:37 +0200]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA ACL ACL2=UNION XMAGICTRASH  XIMAPPROXY] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information.
[27-Dec-2010 11:48:37 +0200]: C: A0001 LOGIN user password
[27-Dec-2010 11:48:37 +0200]: S: * OK [XPROXYREUSE] IMAP connection reused by imapproxy
[27-Dec-2010 11:48:37 +0200]: S: A0001 OK User logged in
[27-Dec-2010 11:48:37 +0200]: C: A0002 CAPABILITY
[27-Dec-2010 11:48:37 +0200]: S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION XMAGICTRASH
[27-Dec-2010 11:48:37 +0200]: S: A0002 OK CAPABILITY completed
[27-Dec-2010 11:48:37 +0200]: C: A0003 SELECT subscriptions
[27-Dec-2010 11:48:37 +0200]: S: A0003 NO Mailbox does not exist, or must be subscribed to.
[27-Dec-2010 11:48:37 +0200]: C: A0004 LOGOUT
[27-Dec-2010 11:48:37 +0200]: S: * BYE LOGOUT received
[27-Dec-2010 11:48:37 +0200]: S: A0004 OK Completed

yet for "pld" imap log is with correct prefix:

[27-Dec-2010 11:51:42 +0200]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA ACL ACL2=UNION XMAGICTRASH  XIMAPPROXY] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information.
[27-Dec-2010 11:51:42 +0200]: C: A0001 LOGIN user password
[27-Dec-2010 11:51:42 +0200]: S: * OK [XPROXYREUSE] IMAP connection reused by imapproxy
[27-Dec-2010 11:51:42 +0200]: S: A0001 OK User logged in
[27-Dec-2010 11:51:42 +0200]: C: A0002 CAPABILITY
[27-Dec-2010 11:51:42 +0200]: S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION XMAGICTRASH
[27-Dec-2010 11:51:42 +0200]: S: A0002 OK CAPABILITY completed
[27-Dec-2010 11:51:42 +0200]: C: A0003 SELECT INBOX.pld
[27-Dec-2010 11:51:42 +0200]: S: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
[27-Dec-2010 11:51:42 +0200]: S: * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited
[27-Dec-2010 11:51:42 +0200]: S: * 34 EXISTS
[27-Dec-2010 11:51:42 +0200]: S: * 0 RECENT
[27-Dec-2010 11:51:42 +0200]: S: * OK [UIDVALIDITY 1096573444] Ok
[27-Dec-2010 11:51:42 +0200]: S: * OK [MYRIGHTS "acdilrsw"] ACL
...

something went wrong with mixing shared and private namespaces?

Attachments (1)

w724.png (10.9 KB) - added by glen 2 years ago.

Download all attachments as: .zip

Change History (10)

Changed 2 years ago by glen

comment:1 Changed 2 years ago by thomasb

  • Milestone changed from later to 0.5-stable
  • Severity changed from normal to major

Duplicate or at least related to #1487649

comment:2 Changed 2 years ago by glen

i can confirm [1c7b94b5] fixes it for me too, so #1487649 was duplicate :)

comment:3 Changed 2 years ago by glen

yet now i can't access INBOX:

[27-Dec-2010 18:53:04 +0200]: S: A0006 OK FETCH completed.
[27-Dec-2010 18:53:04 +0200]: C: A0007 SEARCH ALL UNDELETED UNSEEN
[27-Dec-2010 18:53:04 +0200]: S: * SEARCH
[27-Dec-2010 18:53:04 +0200]: S: A0007 OK SEARCH done.
[27-Dec-2010 18:53:04 +0200]: C: A0008 LOGOUT
[27-Dec-2010 18:53:04 +0200]: S: * BYE LOGOUT received
[27-Dec-2010 18:53:04 +0200]: S: A0008 OK Completed
[27-Dec-2010 18:53:06 +0200]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA ACL ACL2=UNION XMAGICTRASH  XIMAPPROXY] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information.
[27-Dec-2010 18:53:06 +0200]: C: A0001 LOGIN user login
[27-Dec-2010 18:53:06 +0200]: S: * OK [XPROXYREUSE] IMAP connection reused by imapproxy
[27-Dec-2010 18:53:06 +0200]: S: A0001 OK User logged in
[27-Dec-2010 18:53:06 +0200]: C: A0002 CAPABILITY
[27-Dec-2010 18:53:06 +0200]: S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION XMAGICTRASH
[27-Dec-2010 18:53:06 +0200]: S: A0002 OK CAPABILITY completed
[27-Dec-2010 18:53:06 +0200]: C: A0003 SELECT INBOX.INBOX
[27-Dec-2010 18:53:06 +0200]: S: A0003 NO Mailbox does not exist, or must be subscribed to.
[27-Dec-2010 18:53:06 +0200]: C: A0004 LOGOUT
[27-Dec-2010 18:53:06 +0200]: S: * BYE LOGOUT received
[27-Dec-2010 18:53:06 +0200]: S: A0004 OK Completed

comment:4 Changed 2 years ago by alec

Set imap_ns_* options to null and re-login to Roundcube. Provide complete log.

comment:5 Changed 2 years ago by Voyageur

Trying again witout M*SS*G* blacklisted word

All imap_ns_* options set to null, svn [4da0bee2]

[29-Dec-2010 10:04:44 +0100]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.
[29-Dec-2010 10:04:44 +0100]: C: A0001 CAPABILITY
[29-Dec-2010 10:04:44 +0100]: S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION
[29-Dec-2010 10:04:44 +0100]: S: A0001 OK CAPABILITY completed
[29-Dec-2010 10:04:44 +0100]: C: A0002 AUTHENTICATE PLAIN
[29-Dec-2010 10:04:44 +0100]: S: +
[29-Dec-2010 10:04:44 +0100]: C: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[29-Dec-2010 10:04:44 +0100]: S: A0002 OK LOGIN Ok.
[29-Dec-2010 10:04:44 +0100]: C: A0003 LSUB "" "*"

< Bunch of LSUB server replies >

[29-Dec-2010 10:04:44 +0100]: S: * LSUB (\HasNoChildren) "." "INBOX.Sent"
[29-Dec-2010 10:04:44 +0100]: S: * LSUB (\HasNoChildren) "." "INBOX.Junk"
[29-Dec-2010 10:04:44 +0100]: S: * LSUB (\HasNoChildren) "." "INBOX.Drafts"
[29-Dec-2010 10:04:44 +0100]: S: * LSUB (\HasNoChildren) "." "INBOX.Trash"
[29-Dec-2010 10:04:44 +0100]: S: * LSUB (\Noselect \HasChildren) "." "INBOX"
[29-Dec-2010 10:04:44 +0100]: S: A0003 OK LSUB completed
[29-Dec-2010 10:04:44 +0100]: C: A0004 STATUS INBOX.INBOX (blacklisted UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: A0004 NO Mailbox does not exist, or must be subscribed to.
[29-Dec-2010 10:04:44 +0100]: C: A0005 STATUS INBOX.INBOX (blacklisted UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: A0005 NO Mailbox does not exist, or must be subscribed to.
[29-Dec-2010 10:04:44 +0100]: C: A0006 SELECT INBOX.INBOX
[29-Dec-2010 10:04:44 +0100]: S: A0006 NO Mailbox does not exist, or must be subscribed to.
[29-Dec-2010 10:04:44 +0100]: C: A0007 STATUS INBOX.Drafts (blacklisted UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: * STATUS "INBOX.Drafts" (blacklisted 0 UNSEEN 0)
[29-Dec-2010 10:04:44 +0100]: S: A0007 OK STATUS Completed.
[29-Dec-2010 10:04:44 +0100]: C: A0008 STATUS INBOX.Sent (blacklist UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: * STATUS "INBOX.Sent" (blacklist 1536 UNSEEN 0)
[29-Dec-2010 10:04:44 +0100]: S: A0008 OK STATUS Completed.
[29-Dec-2010 10:04:44 +0100]: C: A0009 STATUS INBOX.Junk (blacklist UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: * STATUS "INBOX.Junk" (blacklist 29649 UNSEEN 29582)
[29-Dec-2010 10:04:44 +0100]: S: A0009 OK STATUS Completed.
[29-Dec-2010 10:04:44 +0100]: C: A0010 STATUS INBOX.Trash (blacklist UNSEEN)
[29-Dec-2010 10:04:44 +0100]: S: * STATUS "INBOX.Trash" (blacklist 220 UNSEEN 0)
[29-Dec-2010 10:04:44 +0100]: S: A0010 OK STATUS Completed.

< STATUS INBOX.* go on... then logout >

With manual imaps session via openssl, "SELECT INBOX" works fine

comment:6 follow-up: Changed 2 years ago by alec

This patch should fix your issue, but I'm not sure if this doesn't break something for others. However, there should be only one INBOX, so maybe this is a right way.

--- rcube_imap.php      (wersja 4369)
+++ rcube_imap.php      (kopia robocza)
@@ -3337,7 +3337,7 @@
                     }
                 }
                 // Add prefix if first personal namespace is non-empty
-                if ($this->namespace['personal'][0][0]) {
+                if ($mbox_name != 'INBOX' && $this->namespace['personal'][0][0]) {
                     return $this->namespace['personal'][0][0].$mbox_name;
                 }
             }

Better solution is propsed in #1487637.

comment:7 Changed 2 years ago by janisk

thanks, this works in my case and folders are accessed/manipulated correctly.

comment:8 in reply to: ↑ 6 Changed 2 years ago by maharaja

i can confirm that the patch from alec works for my courier imap based setup.

comment:9 Changed 2 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied in [a36e1ef9].

Note: See TracTickets for help on using tickets.