Bug 2537 - Only INBOX namespace is shown
: Only INBOX namespace is shown
Status: RESOLVED FIXED
Product: Email
General
: 4.1 (4.2008.23-14)
: N810 Maemo
: Low normal with 1 vote (vote)
: 4.1.1
Assigned To: modest-bugs
: modest-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2007-12-13 12:02 UTC by Lucas Maneos
Modified: 2008-12-06 15:29 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Lucas Maneos (reporter) 2007-12-13 12:02:06 UTC
STEPS TO REPRODUCE THE PROBLEM:

Configure modest to access an IMAP account that has other namespaces apart from
INBOX (such as shared folders or other users' accounts).

EXPECTED OUTCOME:

Should be able to access all available IMAP folders that the account has access
to.

ACTUAL OUTCOME:

Modest only shows folders under the INBOX namespace.

REPRODUCIBILITY:
(always/sometimes/once)

Always.

EXTRA SOFTWARE INSTALLED:

Nothing really relevant on the device.  The IMAP server is Cyrus imapd 2.3.8.

OTHER COMMENTS:
Comment 1 David Hagood 2008-02-26 00:29:43 UTC
This is a dup of bug #370
Comment 2 Lucas Maneos (reporter) 2008-02-26 12:07:18 UTC
Not really, #370 is for Communication/Email (the MUA pre-installed on the
tablets since the 770) while this is for Communication/Modest.
Comment 3 Philip Van Hoof 2008-06-26 12:16:56 UTC
Then this is a dup of Bug #3191
Comment 4 Lucas Maneos (reporter) 2008-06-26 20:32:27 UTC
Nope, this is an enhancement request about non-INBOX namespaces (unless they're
supposed to work already?)

INBOX subfolders work fine here, and the IMAP server (cyrus 2.3.9, now, using
the "internal" mailbox namespace) lists subfolders regardless of whether a
trailing "." is sent in the LIST request:

1. NAMESPACE
* NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
1. LIST (SUBSCRIBED) "INBOX" *
* LIST () "." "INBOX"
* LIST () "." "INBOX.Drafts"
* LIST () "." "INBOX.Sent"
* LIST () "." "INBOX.Trash"
[...]
1. OK Completed (0.000 secs 13 calls)
1. LIST (SUBSCRIBED) "INBOX." *
* LIST () "." "INBOX.Drafts"
* LIST () "." "INBOX.Sent"
* LIST () "." "INBOX.Trash"
[...]
1. OK Completed (0.000 secs 12 calls)

1. LIST (SUBSCRIBED) "xxxx" *
* LIST () "." "xxxx"
* LIST () "." "xxxx.commits"
* LIST () "." "xxxx.tech"
* LIST () "." "xxxx.tickets"
1. OK Completed (0.000 secs 5 calls)
1. LIST (SUBSCRIBED) "xxxx." *
* LIST () "." "xxxx.commits"
* LIST () "." "xxxx.tech"
* LIST () "." "xxxx.tickets"
1. OK Completed (0.000 secs 4 calls)

For what it's worth recent modest versions now show the top-level folders of
each hierarchy that contains subscribed folders, but nothing underneath. I
can't tell you at exactly which version this happened as I skipped quite a few
- now running 1.0-2008.23-2 on Diablo (adjusting version to match).
Comment 5 Lucas Maneos (reporter) 2008-06-26 21:24:35 UTC
(In reply to comment #4)
> unless they're supposed to work already?

Hm, on closer inspection it seems that they are.  Modest actually uses LSUB to
discover the list of folders to show, as follows:

A00012 LSUB "INBOX" *\r\n
A00013 LSUB "user." {1+}\r\n*\r\n
A00014 LSUB "" {1+}\r\n%\r\n

(Note the "%" in the last one, which explains the current behaviour.)

The problem is that Cyrus advertises "" as the (only) shared namespace and
camel-lite (specifically, get_folders_sync_ns_only_lsub) uses a "%" wildcard in
this case.

One possible fix would be to use a "*" wildcard and filter our the personal and
other prefixes from the result.  Another would be to keep using "%" for "", but
also LSUB each listed folder (+ delimiter) that \\HasChildren, with a "*"
wildcard.
Comment 6 Philip Van Hoof 2008-06-27 11:06:45 UTC
Hey Lucas,

That's regretfully not an option because using * would mean fetching all
recursively. Non-INBOX (non-personal) namespaces are often used for proxying
news servers with use hierarchies.

Recursively fetching is therefore not a good idea (it could take hours to
download the recursive tree).

The LIST (SUBSCRIBED) command for LIST-EXTENDED had problems that got fixed by
that other bug. If your IMAP server has LIST-EXTENDED, try again with that
patch and you will most likely have different results.

Let us know what that gives (for now, you'll have to compile Tinymail manually.
There are no packages with that fix in yet).
Comment 7 Philip Van Hoof 2008-06-27 11:20:14 UTC
For the bugmaster: I think we will need to mark this bug as wontfix, as we
can't support shared namespaces that are called "". 

The problem with that being that we can only LSUB those using %
(non-recursively) as there can be IMAP servers that proxy large mailbox
hierarchies (like NNTP proxying on the shared namespace), and we wouldn't want
to fetch those recursively.

In the long run it's possible that we'll adapt both Tinymail and Modest to
fetch child info as mailbox nodes unfold, right now this has no priority and is
really only important for NNTP news clients (although for heavy E-mail users
and users who are connected to IMAP servers that indeed proxy huge trees to
their users, for example via the non-personal namespaces, it would be useful
indeed).

What the user who posted this bug can do is putting his mailboxes in the
"user." namespace instead, or reconfigure Cyrus to have a non-empty-string name
for the shared namespace. That should/would result in LSUB "shared." % which I
expect to work as expected.


The expected behaviour of Tinymail/Modest is:

For the first namespace (the INBOX namespace or the personal namespace),
recursive fetching using both LIST and LSUB or LIST (SUBSCRIBED) is used.

For the user and shared namespaces (the user. and the empty-string or the
shared. namespace) only LSUB is used and the fetch is always non-recursive. The
reason being that there might be large trees behind it, and we wouldn't want to
waste megabytes of bandwidth on recursively fetching it.
Comment 8 Lucas Maneos (reporter) 2008-06-27 13:22:55 UTC
Hi Philip, and thanks for your comments.

This bug has shifted quite a bit now.  I think the original request can be
resolved "FIXED" (I can confirm it works fine for me in the "user." namespace
once I subscribed to a few folders under it) and I'd be happy to open a new one
for the "" namespace / LSUB % issue or take it to the mailing list if you think
that's more appropriate.

In the meantime, if I may argue this a little bit:

I totally agree that LSUB (vs LIST) is the right thing to do (actually I'd
prefer it if that was also the default for the personal namespace, but that's
another issue).  But since it's already doing that isn't the NNTP proxy issue
already taken care of?  In fact, if newsgroups (or any large mailbox hierarchy)
are placed under a non-empty namespace prefix it looks like camel-tiny will
happily LSUB * there.

> The expected behaviour of Tinymail/Modest is:
> 
> For the user and shared namespaces (the user. and the empty-string or the
> shared. namespace) only LSUB is used and the fetch is always non-recursive. 

The *current* behaviour is recursive LSUB unless the prefix is empty (see
comment #5 & get_folders_sync_ns_only_lsub).  Please don't "fix" that as it
would make it impossible to see folders more than one level down from the
prefix (eg user.foo.bar).

> What the user who posted this bug can do is putting his mailboxes in the
> "user." namespace instead, or reconfigure Cyrus to have a non-empty-string name
> for the shared namespace.

AFAICT Cyrus only supports configuring the other/shared namespaces when using
the "alternate" namespace which is not really an option on this server as it
would inconvenience a large number of users.
Comment 9 Philip Van Hoof 2008-06-27 13:29:46 UTC
Yeah, I think summarizing this on Tinymail's mailinglist would be useful.

There are of course a few things we can do with its LIST/LSUB code, but we must
also take into account that the behaviour for LIST-EXTENDED must be the same or
at least similar, that we shouldn't ever cause a huge pull-down of large folder
trees.

The reason why "" is never recursively asked is because recursively asking for
"" means recursively asking for all namespaces (it'll match all namespaces). So
that's why I made an exception for "" and recursively fetching.

Recursively fetching LSUB is usually fine because most people are not
subscribed to millions of folders. So maybe indeed, we can change the LSUB
fetch for "" to be recursive ...

It's something we want to test against a lot of IMAP servers, though.

But let's discuss these possibilities on Tinymail's mailing list.

I'll leave it to the bugmaster to decide about the state of this bug.
Comment 10 Andre Klapper maemo.org 2008-11-04 00:10:04 UTC
(In reply to comment #9)
> I'll leave it to the bugmaster to decide about the state of this bug.

Either FIXED for the original request, or WONTFIX as in comment 7.
FIXED sounds better, eh? :-P