Closed Bug 1370758 Opened 8 years ago Closed 5 years ago

Can't create sub-folder in IMAP account until after checking for messages.

Categories

(Thunderbird :: Folder and Message Lists, defect)

52 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1690093

People

(Reporter: rjakabosky+github, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.61 Safari/537.36 Steps to reproduce: 1. Setup an IMAP account (IMAP server dovecot). 2. Disable "Check for new messages..." 3. Create a folder "MainFolder" 4. Restart Thunderbird 5. Try to create a sub-folder under "MainFolder". Actual results: The sub-folder is not created and no error message is displayed. Attached is a wireshark capture of the IMAP connection from Thunderbird to Dovecot (disabled TLS for this capture). Summary of IMAP connection: 1. Thunderbird opens TCP connection to IMAP server (port 143) 2. Dovecot returns Capabilities line: * OK [CAPABILITY ......] Dovecot ready. 3. Thunderbird closes the TCP connection. That same pattern happens each time when trying to create a sub-folder. Thunderbird doesn't even try to login or send a command to create a folder to the IMAP server. Only after checking for new messages, does it start working. Expected results: The sub-folder should have been created in the IMAP account, without having to first check for new messages. Or at least display a message asking the user to first check for messages.
Maybe Gene has some free cycles to look into this.
I can't seem to duplicate the problem. However, I do have a question: in English there are actually two items that say "Check for new messages...", Check for new messages at startup Check for new messages every X minutes. Which one are you referring to? I tried it with the 2nd one unselected first, then with both unselected and see no problem creating subfolders under MainFolder (after restarting tb after making the checkbox change). Tb sends the imap CREATE command to make the subfolders as it should. Then again, I'm not using Dovcot imap server. I don't see anything in the capability response you provided that affects subfolder creation. However, I did find some info by doing websearch on "can't create subfolders dovcot imap" regarding mbox vs. maildir such as this: https://wiki.dovecot.org/MboxChildFolders . Probably not relevant since you say tb will create the subfolder if "Check for new messages..." is checked. Do you have other folders in your dovcot account such as INBOX, Sent, Spam etc, or only MainFolder? I haven't tried that since I started from an existing account.
More info. I setup a localhost based dovecot server on Fedora 25 using these simple instructions https://wiki.dovecot.org/QuickConfiguration#Running but still no luck duplicating the problem. With both "check for messages" items turned off, I can still create new folders and subfolders in the new dovecot account on tb. I can even copy emails to the new folders/subfolders. (I don't have anything setup to actually receive real emails on this account.) One thing I noticed is that I had to use "Maildir" and not "mbox" for mail storage if subfolders are to be created (only top level folder MainFolder creates OK with mbox). Also, my new account has pre-existing top-level folders Inbox and Trash.
I mean both of the "Check for new messages" options, should be turned off. The bug only happens when Thunderbird hasn't talked to the IMAP server for checking messages or even opening a folder. I did some more testing and found that even opening any folder (Inbox, Trash, Sent, MainFolder, etc..) will make Thunderbird start talking to the IMAP server and then the bug doesn't happen. I have also found that this effects creating a top-level folder too, not just sub-folders. Also the "Subscribe.." dialog box is not able to get a list of folders from the server. In my Thunderbird I have more then one account, and TB remembers which account/folder I had open an re-open it. Here is an updated list of steps to reproduce: 1. Setup an IMAP account "Test" (IMAP server dovecot). 2. Disable both "Check for new messages......." Options 3. Setup a second email account (pop,imap,local, doesn't matter). 4. Make sure that the second email account is open, when you close Thunderbird. 5. Restart Thunderbird 6. Right-click the "Test" account and click "New Folder". 7. Pick a name for the folder and click "Create folder". 8. Nothing happens.
This screenshot should the empty folder list.
FYI. The IMAP account i was having problems is just used for Archiving email from old employees. So normally I only create a new folder for the employee that left and copy all old emails into that folder. So I get hit by this bug since I don't check that account for new messages or even browse the folders. I am thinking that maybe Thunderbird isn't loading the username/password for the account when the first action is to create a folder or list folders.
Yes, I see it when selected in one account and try to create a new folder in another account after starting tb. Doesn't matter if other account is dovecot. But if I click on (select) an existing folder inside the "dovecot/archive" account first (e.g., Inbox), I can create the new folder in that account and also list subscribed folders. Is this not workable for you? Just selecting "check new messages at startup" fixes the problem. You can un-select "check every X minutes" and also un-select "allow immediate notification" too if you are only using the account for archiving old emails and not receiving new emails from outside. You are right, without the check for new messages or clicking on an internal folder, no real login to the server occurs. But I think failure to create a folder or list existing folders is really a bug. Jorg, should it be fixed?
Sure, we just need someone to fix it. It would also be good to check whether this has been reported before, maybe in 2004 ;-(
(In reply to gene smith from comment #7) > But I think failure to create a folder or list existing folders is really a bug. > Jorg, should it be fixed? (In reply to Jorg K (GMT+2) from comment #8) > Sure, we just need someone to fix it. It would also be good to check whether > this has been reported before, maybe in 2004 ;-( This bug is pretty old problem which I frequently observed. ("Automatic new mail check" is usually disabled for testing.) ("Automatic activity such as auto-sync, Gloda etc. is usually disabled for testing.) (1) If trying to create a folder fails due to some kinds of error, "Create folder" request does do nothing. No feed back of error. "Dialog for input of new folder name" stays with unchanged. This is not IMAP only problem. This occurs on local mail folder. (2) If no IMAP connection is establised yet after restart of Thunderbird, (2-1) Subscribe fails because "login to IMAP server for subscribe" is not executed properly or fails. => This problem was already resolved in a Thunderbird version. (2-2) Request of "create a new IMAP folder" does do nothing. "login to IMAP server for creating new folder" is not excuted. Because "IMAP request for IMAP folder creation" can not be passed to IMAP server, Thunderbird does do nothing. This is IMAP version of problem (1). As already known by this bug, wprkaround of this bug is: - Click an IMAP folder of relevant IMAP account at folder pane => Login to IMAP server is executed and the clicked folder is selected at cached connection and the IMAP folder is opened. => After it, "Create IMAP folder under this IMAP account" is normally executed.
WADA, thanks for the good info. However, not sure if it is a vote to fix or not. Also, but I haven't tried yet, I expect any right-click operation (delete folder, compact, rename etc.) on a folder in a not-selected account might be non-functional for the same reason. Personally, I think the "most hated bug(s)" Bug 1366591 etc should be fixed first since the workaround for this "folder creating" bug is pretty straight forward as you show: select an existing folder in the account before attempting to create a new folder or, as I point out, just keep "check for new messages at startup" selected, which is on by default at account creation. But maybe I am not understanding if or why doing this might be a problem for the reporter...?
Yes there is a workaround. For me this isn't a problem anymore, because of the workaround. But this bug was causing me problems for months before I found out why it was failing. A few times I tried googling for the reason why thunderbird or dovecot's IMAP would fail to create a folder, but didn't find anything useful. I would just give-up and use the webmail interface to create the folder. Since I didn't know if it was a problem on the IMAP server or in Thunderbird, I didn't submit the bug when this first started happening. This isn't a high priority bug, but for other people who may run into it, i think it should be fixed. Bug 1366591 is much more important then this one. I might have even had that problem before.
(In reply to gene smith from comment #10) > since the workaround for this "folder creating" bug is pretty straight > forward as you show: select an existing folder in the account before > attempting to create a new folder or, as I point out, just keep "check for > new messages at startup" selected, which is on by default at account creation. What is needed for this bug is: An already connected/already logged-in connection. There is no need of "cached connection where an IMAP mbox is already selected". Following is a possible/simple solution(workaround by Tb's code). > When "startup of Thunderbird" and "going back to Work Online mode from Work Offline mode", > If no cached connection is established yet, > And if mail.server.server#.DoSubscribeUponStartUp=true, > (falls back to mail.server.default.DoSubscribeUponStartUp, default=true) > (DoSubscribeUponStartUp=false is mandatory for me, because "no connection status" is needed for testing) > Do same action as "File/Subscribe". No wrong action is involved in above workaround. A bad action is excess "File/Subscribe just after restart" only. IIRC, history is: (1) First login to IMAP server was normally done regardless of that mbox is already opnened or not. (2) First login to IMAP server was normally done upon mbox open only. (Selected mbox at folder pane upon shutdown, Inbox for new mail check, any mbox by floder click) IIUC, this is a regression by some changes. (2-1) => File/Subscribe did do nothing until first folder open (2-2) => Folder creation etc. did do nothing until first folder open (3) Current status (3-1) (2-1) is already resolved (3-2) (2-2) still exists If one of next occurs, this bug won't occur. (a) An IMAP mbox(call MboxA) is selected at folder pane, and shutdown Tb, then restart Tb => MboxA is selected at folder pane after restart, then MboxA is opened (b) New mail check is enabled => Inbox is selected at a cached connection (c) Folder click at folder pane => The clicked mbox is selected at a cached connection Because (b) is usually done by default setting, this bug can occur on very limited user only. - Users who did something just after account creation, without restart of Tb, without doing ordinal operations such as mail viewing. - Users like me, who intentionally disable (b), intentionally avoid (a), intentionally skip (c), for testing.

Not really "resolved" yet but this is definitely a duplicate of what I'm working on here: bug 1690093

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: