Closed Bug 697363 Opened 13 years ago Closed 3 years ago

new imap folders created by procmail are not subscribed automatically

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: harald.dunkel, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Build ID: 20110928134238 Steps to reproduce: If procmail generates a new maildir folder on a remote imap server (Dovecot), then tb doesn't show. I have to manually subscribe to the folder, which is especially painful for dynamic procmail rules deriving the folder name from some data found in the email header (e.g. for majordomo mailing lists). This is different to #540920. "Server supports folders that contain sub-folders and messages" is set.
PS: "Show only subscribed folders" is not set, of course. The mail folder becomes visible, but it doesn't show that there is a new mail.
(In reply to harald.dunkel from comment #1) Check bug 230497 (maybe similar to this).
(In reply to harald.dunkel from comment #0) > If procmail generates a new maildir folder on a remote imap server (Dovecot), then tb doesn't show. Create new mbox at IMAP server by procmail while Tb is already running? If so, unless IMAP server unsolicitely notifies about newly created mbox, any IMAP client can't know about the newly created mbox automatically, and, AFAIK, there is no such interface in protocol named IMAPv4rev1. This same as "Folder creation/deletion by second Tb instance while first Tb instance is running". To know it automaticlly, "periodical new folder check"(issue LIST and/or LSUB for all folders periodically) like "periodical new mail check" is needed. Are you requesting such "periodical new folder check" feature of Tb? > I have to manually subscribe to the folder, (snip) Tb requests LSUB and/or LIST for all folders to know recent folder status when Subscribe is requested by user. It's current design and implementation. However, Tb looks to re-aquire folder information upon first folder open after collapse/re-expand of IMAP account at folder pane(first connection request of connections kept by max cached connections) too. So, I think manual subscribe is not mandatory. Because of "Show only subscribed folders is not set, of course" in your case, I think newly created folder at server is automatically shown at folder pane, if parent folder of the newly created folder is expanded at folder pane before collapse of IMAP account. Is it right? If parent folder(call P) of newly created folder(call N) doesn't have subfolders before the new folder creation at server, and if P is shown at folder pane of Tb before the new folder creation at server, "+" mark for expand is not shown for folder P at folder pane of Tb. In this case, expand button("+") of P may not be automatically shown after collapse/re-expand of IMAP account. This is known issue in folder pane refresh. Collapse/re-expand of parent folder of P is a recovery operation from the lack of expand button(+) of folder P in many cases. Manual subscribe(show current subscription status) is perhaps another workaround of the lack of expand button(+) of folder P. Are you looking this problem of "lack of expand button(+) of parent folder even after Tb knows about subfolders created at server"? Get IMAP log with timestamp. > https://wiki.mozilla.org/MailNews:Logging > SET NSPR_LOG_MODULES=timestamp,imap:5 LIST and/or LSUB is requested by "collapse/re-expand of IMAP account followed by an IMAP folder open", isn't it? Is manual subscribe mandatory? (In reply to harald.dunkel from comment #1) > The mail folder becomes visible, but it doesn't show that there is a new mail. If server doesn't support "folder contains both subfolders and mails", and if server says "the folder is not for contain mails", Tb doesn't request command to know UID of mails. Get IMAP log and check commands requested by Tb and returned attributes of mail folder from server. Tb shows only "unread mail count"(perhaps \Recent mails too) at folder pane. "New mail alert" doesn't count already Read mails. Are there Unread mails in the folder?

Harald, this still needs information. If you still see the problem please provide an update

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE

Sorry, I missed the recent updates to this ticket. The problem still exists. Looking at the query I am not the only one with this problem.

Actually it shouldn't matter if the new folder contains only read or unread or deleted EMails. Officially I do not know, since TB didn't show yet. But there are all kinds of EMails present, processed by a MUA on another host. TB or apple's EMail program on the iphone.

Attached you can find a sample session. snap1.png shows 2 unread EMails for the github folder. No subfolders. If I click on it then there are no unread EMails anymore (sorry, no screenshot). There are no subfolders, either. After creating a new subfolder "xxx" in TB all the lost subfolders pop up (snap2), but still no unread EMails. After clicking on "containers" it suddenly shows that there are unread EMails in this subfolder (snap3). Other subfolders are still ignored.

Attached image snap1.png (deleted) —
Attached image snap2.png (deleted) —
Attached image snap3.png (deleted) —

The only way that TB currently has to discover new folders is to restart or collapse/expand the folders at the account level, " > harri at afaics dot de". Does this work for you?
Also, for tb to detect new mail in a non-Inbox folder you have to right-click the folder, go to properties and select "check this folder for new mail". This should cause the folders so selected to be checked for new mail on the timed interval.

Sorry, neither the restart nor the collapse/expand on the account seems to work.

AFAICT there is no option "check this folder for new mail" in the mail folder properties. Only "repair folder". It wouldn't be wise to hide this option deep in a submenu, anyway.

The only way I found by now is to wait a few minutes without reading any EMails, then double click on the folder with the new subfolders. Catchy.

(In reply to harald.dunkel from comment #12)

Sorry, neither the restart nor the collapse/expand on the account seems to work.

TB should always find and show new folders on restart unless the server (still dovecot I assume) isn't reporting them for some reason or they don't have the subscribed flag set. Do the missing folders show up when you open the subscribe dialog (right click on the account)?

AFAICT there is no option "check this folder for new mail" in the mail folder properties. Only "repair folder". It wouldn't be wise to hide this option deep in a submenu, anyway.

All imap folders have this under General Properties. It's not a button like "repair folder" but a check box, right under "Include the folder in global search". By default, only Inbox is check for new mail on the timed interval.

The only way I found by now is to wait a few minutes without reading any EMails, then double click on the folder with the new subfolders. Catchy.

So you double clicked the github.com folder and all the subfolders appeared? Above I thought you mean you created sub-folder xxx and the github.com subfolders appeared.

Any chance you can duplicate the problem while recording an IMAP:5 log as described here: https://wiki.mozilla.org/MailNews:Logging ?

I'll try to duplicate this with my dovecot server.

I'll try to duplicate this with my dovecot server.

The expand at root and restart works for me. But there a couple conditions that may make it not work. Maybe you are running into them.

Folder discovery occurs on the 1st imap login to the server. This will not occur automatically at start up if the server setting "Check for new messages at startup" is switched off (not checked). If the setting "check for messages every x mins" is on, the first imap connect will occur after that many minutes if "check new message at startup" is off. But if you open an imap folder in TB in the account, that will also cause a login and trigger discovery.

The expand discovery trigger will also not occur if an imap login to the server has not yet occurred. I've seen this happen before and to me it seems like a bug. But selecting a folder in the account to ensure a login has occurred will work around this and discovery will occur on the top-level expand.

Yes, the previously unknown folders are shown in the subscribe menu. They are not subscribed, though.

About the double click: You are right, adding another folder does the trick, too. Maybe the double click was just a coincidence with some other action run by TB.

About folder discovery: How does it work if my phone is logged in via IMAP as well? (BTW, dovecot's IMAP is configured with "mail_max_userip_connections = 20")

"Check for new messages at startup" is set. "Check for new messages every 5 minutes" is set as well. "Allow immediate server notifications" is set, too.

I will try to look into this logging thing this evening.

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

Attachment

General

Creator:
Created:
Updated:
Size: