Closed Bug 165161 Opened 22 years ago Closed 21 years ago

IMAP Cannot file messages in IMAP folders three levels deep when not using subscription

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 2000
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philk, Assigned: Bienvenu)

References

Details

(Keywords: imap-interop)

Attachments

(5 files)

Mozilla Mail 1.1 Release on Windows 2000 SP3
UW-IMAP 2001a on FreeBSD 4.6-STABLE

119 IMAP mail folders, including many like:
Vendors/Software/McAfee
Contract/Client/General

How to replicate the bug:
1.  Minimise all first level IMAP folders in the left pane of the Mail window.
2.  Close Mozilla.
3.  Start Mozilla.
4.  Compose a new message.
5.  Options/Send a copy to.../ try to pick any 3rd level IMAP folder

Either the third level will not be visible in the menu (for example, no Client
visible under Contract) or it will not be selectable (client visible under
Contract, but it is greyed out and nothing appears under it).

This will stay this way until the third level folders are opened in the left
pane, then Mozilla is quit and restarted.

If Mozilla is quit with the folders collapsed in the left pane, they will not be
available for Filing and Copy to the next time it is started.

This bug is 100% repeatable.
QA Contact: huang → meehansqa
Keywords: interop
This picture shows step 1.
This picture demonstrates step 2 of the bug.
This picture demonstrates step 3 of the bug.
I've added three pictures to demonstrate the bug.  The aim is to file the bug
report into the IMAP folder ROTFL/PSB/Parking.

Look at picture 1.
Notice that the ROTFL folder is closed and has been closed since I started Mozilla.
Click on the File icon, select the server and the ROTFL folder.
Note that the PSB subfolder is greyed out, and cannot be used as a target for
filing the message.

Look at picture 2.
I now expand the ROTFL folder in the folder list.
You can see that there are three subfolders.
Click on the File icon, select hte server and the ROTFL folder.
The PSB subfolder is *still* greyed out.
From this point on, it is impossible to file anything into folders into the PSB
subfolder using the File icon.

Look at picure 3.
Quit Mozilla and restart it.
Expand the ROTFL folder in the folder list *first*, before ever clicking on the
File icon.
You can now see the subfolders.
Now use the File icon to successfully file items into the third level folder.

This is completely repeatable behaviour and applies to *any* third level IMAP
folder.  It must be expanded the folder menu before trying to file to it.

Note also that is necessary to manually expand any folder of level 3 or deeper,
as Mozilla does not automatically detect them on launch.


This demonstrates how Mozilla handles IMAP.  See the comments for why this is
wrong.
Look at the IMAP trace attachment.  This shows Mozilla using the following logic:

4 list "" "Mail/%"

This is good to find the top level folders.  It gives out things like:
* LIST (\NoInferiors \UnMarked) "/" Mail/SAGE-AU
* LIST (\NoSelect) "/" Mail/ROTFL
* LIST (\NoSelect) "/" Mail/Vendors

Which means that Mail/SAGE-AU is a normal folder that can take messages, and
that Mail/ROTFL and Mail/Vendors aren't - which means they are folders that can
only contain folders and not messages.

Logically the next step is to recursively iterate down through the \NoSelect
candidates looking for more folders.  So I would have expected to see the next
command being:

5 list "" "Mail/ROTFL/%"

then

6 list "" "Mail/Vendors/%"

But instead, what we get is this:

5 list "" "Mail/%/%"

This is bad, as it just looks for level 2 folders.  Some of these look like this:

* LIST (\NoSelect) "/" Mail/ROTFL/
* LIST (\NoInferiors \UnMarked) "/" Mail/ROTFL/AMR
* LIST (\NoInferiors \UnMarked) "/" Mail/ROTFL/GroPep
* LIST (\NoInferiors \UnMarked) "/" Mail/ROTFL/IGC
* LIST (\NoSelect) "/" Mail/ROTFL/PSB
* LIST (\NoInferiors \UnMarked) "/" Mail/ROTFL/SupporterZone
* LIST (\NoInferiors \UnMarked) "/" Mail/ROTFL/rotfl.com.au

Which clearly shows that there are subfolders under the level 2 folders.

However, Mozilla doesn't then look for level three folders with this:

6 list "" "Mail/%/%/%"

It just stops.

If I manually open the level 2 folder, Mozilla does this:

23 list "" "Mail/ROTFL/%"

Which looks for the level 3 folders.

So this exactly describes why the bug exists.  Put simply Mozilla searches only
for level 1 and 2 folders.  It should iterate down looking for all folders.


Phil.
if you use IMAP subscription, everything works fine. The option not to use
subscription does not work well in Mozilla, unfortunately, since so few people
don't use subscription. If you go into your imap server settings, click
advanced, and only show subscribed folders, things should work a lot better. I
agree this is a bug, but I'm just letting you know that if you can use
subscription, things will work much better.
taking
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
accepting - I'm going to look into fixing this now.
Status: NEW → ASSIGNED
Attached patch proposed fixSplinter Review
if we're not using subscription, we need to explicitly list non-verified
folders
Attachment #138956 - Flags: superreview?(mscott)
Blocks: 229740
Attachment #138956 - Flags: superreview?(mscott) → superreview+
fixing summary, fixed.
No longer blocks: 229740
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Summary: UW-IMAP Cannot file messages in IMAP folders three levels deep → IMAP Cannot file messages in IMAP folders three levels deep when not using subscription
fixed on m4 branch
Blocks: 229740
*** Bug 231501 has been marked as a duplicate of this bug. ***
*** Bug 200989 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: