Subscribe imap sub-folders

User Help for Mozilla Thunderbird
Post Reply
petrxn
Posts: 4
Joined: April 8th, 2016, 7:53 am

Subscribe imap sub-folders

Post by petrxn »

Hallo,
There is again back problem with subscribe sub-folders on imap server. The last worked version was 33 (beta). Subscription manager does not list the sub-folder. This bug was
fixed some versions ago, but unfortunatelly it is back now. I have checked it also in current beta version (45) and the problem is also here.

Is there an way to correct it?

Thank you,
User avatar
LIMPET235
Moderator
Posts: 39961
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Subscribe imap sub-folders

Post by LIMPET235 »

Moving to Thunderbird Support...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

Who is your email provider(s)?

IMAP servers can be configured to only let you to create folders within the inbox folder hierarchy, while others also let you create new folders at the same level as the inbox (a peer). Which is yours?

I've got IMAP accounts with fastmail, gmail, outlook, yahoo, gmx, comcast, vivaldi and zoho. None of them have your problem, though the folder hierarchy with Gmail is weird. See if using the flat folder tree add-on to re-organize part of your folder hierarchy helps, if its not a straightforward tree.
petrxn
Posts: 4
Joined: April 8th, 2016, 7:53 am

Re: Subscribe imap sub-folders

Post by petrxn »

We have used our own mail servers (cyrus, now version 2.4.18) for years. The problem is on shared mailboxes. With older versions of Thunderbird e.g. 32, or any other client there is no problem. Also if the sub-folder is already subsrcibed Thunderbird can use it without any problem.
I found an old bug where was this problem too, https://bugzilla.mozilla.org/show_bug.cgi?id=529244
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

Fastmail uses Cyrus 3.0.0-beta1-git-fastmail-13276 . However, I just have a full personal account with them so I've never been able to use a public folder . Do you know of any email provider that offers free IMAP accounts that support public folders/shared mailboxes?

From https://bugzilla.mozilla.org/show_bug.cgi?id=529244

> Debug log with IMAP:5
> * LSUB () "/" INBOX/aaa
> * LIST (\HasChildren) "/" INBOX/aaa

CHILDREN extension is supported, but \HasChildren is returned only to LIST command, not to LSUB command.


IMAP4 has two commands for listing mailboxes: LIST and LSUB. Others such as XLIST are optional (the mail server has to support an extension to the IMAP spec, which should show up in what it reports when asked about its capabilities). Support for \HasChildren in the List command is optional. If its supported, CHILDREN is returned when its asked about it the capabilities.

I searched a recent IMAP log file for a profile with fastmail, yahoo, gmail, outlook, comcast, zoho, gmx and vivaldi IMAP accounts. I can find XLIST and LIST commands for Fastmail (some of which use \HasChildren), but only Yahoo and Outlook get LSUB commands. The LSUB command is used just with subscribed folders. All of my accounts have "show only subscribed folders" checked so its not obvious to me why LSUB is used only with Yahoo and Outlook. Both say they support CHILDREN so I would think Thunderbird would want to use the LIST command.

1) I suggest you enable IMAP logging per http://kb.mozillazine.org/Session_logging_for_mail/news , create a log file, and post the results returned from sending a CAPABILITY command.
2) Do you see any XLIST or LIST commands with a \HasChildren argument in that log file?
3) See if you can find any attempts to list the contents of the shared mailbox . Please post an excerpt that shows what it uses to do that.

http://www.iana.org/assignments/imap-ca ... ties.xhtml

(Fastmail)
mail.messagingengine.com:NA:CreateNewLineFromSocket: 2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE XAPPLEPUSHSERVICE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SEARCH=FUZZY SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS LIST-METADATA WITHIN

(Yahoo)
imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * OK [CAPABILITY IMAP4rev1 ID MOVE NAMESPACE X-ID-ACLID UIDPLUS LITERAL+ CHILDREN XAPPLEPUSHSERVICE XYMHIGHESTMODSEQ AUTH=PLAIN AUTH=LOGIN AUTH=XOAUTH2 AUTH=XYMCOOKIE AUTH=XYMECOOKIE AUTH=XYMCOOKIEB64 AUTH=XYMPKI] IMAP4rev1 imapgate-1.8.1_01.20166 imap1014.mail.bf1.yahoo.com

(Outlook)
imap-mail.outlook.com:NA:CreateNewLineFromSocket: * CAPABILITY IMAP4rev1 CHILDREN ID NAMESPACE UIDPLUS UNSELECT AUTH=PLAIN AUTH=XOAUTH2 SASL-IR

(Gmail)
imap.gmail.com:NA:CreateNewLineFromSocket: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT APPENDLIMIT=35882577 LIST-EXTENDED LIST-STATUS
petrxn
Posts: 4
Joined: April 8th, 2016, 7:53 am

Re: Subscribe imap sub-folders

Post by petrxn »

Thank you for your help. There CAPABILITY command:
avs-brn-imap:NA:CreateNewLineFromSocket: * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=PLAIN SASL-IR] avs-brno Cyrus IMAP v2.4.18-Debian-2.4.18-5 server ready

Some lines from log:
2016-04-09 21:11:24.068000 UTC - 4816[10c05b40]: 13899800:avs-brn-imap:A:CreateNewLineFromSocket: * XLIST (\HasChildren) "." projects.test1

2016-04-09 21:11:24.068000 UTC - 4816[10c05b40]: ReadNextLine [stream=149e1040 nb=45 needmore=0]
2016-04-09 21:11:24.068000 UTC - 4816[10c05b40]: 13899800:avs-brn-imap:A:CreateNewLineFromSocket: * XLIST (\HasNoChildren) "." projects.test2

2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: ReadNextLine [stream=149e1040 nb=48 needmore=0]
2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: 13899800:avs-brn-imap:A:CreateNewLineFromSocket: * LIST (\Subscribed \HasChildren) "." projects

2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: ReadNextLine [stream=149e1040 nb=41 needmore=0]
2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: 13899800:avs-brn-imap:A:CreateNewLineFromSocket: * LIST (\Subscribed) "." projects.test1

2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: ReadNextLine [stream=149e1040 nb=41 needmore=0]
2016-04-09 21:11:24.256000 UTC - 4816[10c05b40]: 13899800:avs-brn-imap:A:CreateNewLineFromSocket: * LIST (\Subscribed) "." projects.test2

2016-04-09 21:15:14.222000 UTC - 5084[b2aab40]: ReadNextLine [stream=af75b20 nb=42 needmore=0]
2016-04-09 21:15:14.222000 UTC - 5084[b2aab40]: f15d800:avs-brn-imap:A:CreateNewLineFromSocket: * LIST (\HasChildren) "." projects.test1

2016-04-09 21:15:14.222000 UTC - 5084[b2aab40]: ReadNextLine [stream=af75b20 nb=44 needmore=0]
2016-04-09 21:15:14.222000 UTC - 5084[b2aab40]: f15d800:avs-brn-imap:A:CreateNewLineFromSocket: * LIST (\HasNoChildren) "." projects.test2
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

The CAPABILITY results are confusing as I don't see CHILDREN or XLIST there. Please post any lines where either the ID or the ENABLE command is sent, and its response.

The ID command is a way for a client and a server to exchange information about its implementation with each other. I don't think it has the missing information but its worth checking. The ENABLE command is a way for the client to request the server to enable certain IMAP extensions (capabilities). If successful it returns a list of the capabilities that it enabled. Fastmail's server supports that command, but Thunderbird never sends a ENABLE command to it.

It looks like its returning folders from the shared mailbox. Is the problem that is returns a incomplete list (it doesn't list a child folder for projects.test1) or am I misunderstanding what "projects" is?
If you uncheck "show only subscribed folders" (which I assume you normally don't want to do) does it list all of the public child folders?
What is "public(shared)" and "other users" set to in server settings -> advanced ?

An overview of what folders exist in the shared mailbox and which ones are visible in the list of subscribed folders would help. Just a couple folders deep, no need for the entire tree.
petrxn
Posts: 4
Joined: April 8th, 2016, 7:53 am

Re: Subscribe imap sub-folders

Post by petrxn »

Hello,
is this better?
2016-04-10 19:37:38.424000 UTC - 6448[10d18080]: 139c3800:avs-brn-imap:NA:CreateNewLineFromSocket: 1 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE IDLE] Success (tls protection) SESSION

Yes the folder "projects" is top folder from shared mailbox.
I have tested it on new server with fresh tree:
- projects
- projects.test1
- projects.test1.test11
- projects.test2

I have tried also make new Thunderbird profile, then all the sub-folders in subscription manager are shown, but only for first start of Thunderbird on fresh profile. After Thunderbird restart the sub-folder "projects.test1.test11" is missing in subscription manager.
If help you I can send you some pictures and full log by email.
Thanks
Petr
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

Yes, that capability string clears how the CHILDREN issue. The existing bug reports - https://bugzilla.mozilla.org/show_bug.cgi?id=529244 and https://bugzilla.mozilla.org/show_bug.cgi?id=529618 - are similar but don't require a shared mailbox, like your problem does. I suspect you'll probably have to file a new bug report but let me see if I can figure out whats going on before you do that.

Please email me the log file and pictures (click on the envelope icon under my avatar).
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

I looked at the info you sent me. Thunderbird had no problem finding your entire folder hierarchy in your mailbox, detected that projects.test (other mailbox) has children, but projects.test.test11 was never returned. Thunderbird appears to have all of the capabilities it needed, the server just didn't return the expected result.

I suggest you file a new bug report (since the problem only occurs in somebody else's mailbox), attaching the info you sent me as attachments. If you do that please post a link to the bug report.
chris2015
Posts: 3
Joined: April 16th, 2016, 4:24 am

Re: Subscribe imap sub-folders

Post by chris2015 »

I have just tried this. IMAP folder list is completely shown,

Code: Select all

a2 LIST "" "*"
* LIST (\HasChildren) "/" privat1
* LIST (\HasChildren) "/" privat1/p1b
* LIST (\HasNoChildren) "/" privat1/p1b/p1c
* LIST (\HasNoChildren) "/" INBOX/Sent
* LIST (\HasNoChildren) "/" INBOX/Drafts
* LIST (\HasNoChildren \Sent) "/" Sent
* LIST (\HasNoChildren \Drafts) "/" Drafts
* LIST (\HasNoChildren \Trash) "/" Trash
* LIST (\HasNoChildren) "/" test
* LIST (\Noselect \HasChildren) "/" public
* LIST (\HasChildren) "/" public/test-pub
* LIST (\HasChildren) "/" public/test-pub/p1
* LIST (\HasChildren) "/" public/test-pub/p1/p11
* LIST (\HasChildren) "/" public/test-pub/p1/p11/p12b
* LIST (\HasNoChildren) "/" public/test-pub/p1/p11/p12b/p123a
* LIST (\HasNoChildren) "/" public/test-pub/p1/p11/p12b/p123b
* LIST (\HasNoChildren) "/" public/test-pub/p1/p11/p12
* LIST (\HasChildren) "/" INBOX
a2 OK List completed.
but Thunderbird doesn't display them.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Subscribe imap sub-folders

Post by tanstaafl »

I suggest you file a separate bug report.
chris2015
Posts: 3
Joined: April 16th, 2016, 4:24 am

Re: Subscribe imap sub-folders

Post by chris2015 »

tanstaafl wrote:I suggest you file a separate bug report.
For completeness: I've added screenshots to two bug reports:
The first report is about 38 branch, the second 45.
Post Reply