Closed Bug 396844 Opened 18 years ago Closed 14 years ago

Junk filter scans folders outside inbox when IMAP prefix used

Categories

(MailNews Core :: Filters, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 189970

People

(Reporter: bugzilla+mozilla, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty) Build Identifier: 2.0.0.6 (20070728) When I enable adaptive junk mail controls for my IMAP accounts, it scans every folder for junk mail, not just the Inbox and its sub-folders as described in this <a href="http://www.mozilla.org/start/1.5/extra/using-junk-control.html">Junk Mail tutorial</a>. I believe this is because I am using the Courier IMAP server which creates all folders beneath Inbox automatically. I use the "INBOX/" as my IMAP server directory in order to get around this, and have all folders appear alongside Inbox instead of beneath it. The junk mail folder should recognise this, and not filter mail in these folders. The use-case for this bug is that I have a separate Spam folder which I use SpamAssassin to filter spam to. SA encapsulates spam messages as an attachment in this folder, and so I don't want Thunderbird to learn from these encapsulated messages when I check the folder for false-positives. Reproducible: Always
so your SA spam folder is not a subfolder of inbox? if true, it shouldn't be scanned. but if it is a subfolder, it will be scanned. and if courier enforces that all folders must be subfolders of inbox, then your use case is outside the specs. to quote the full reference "Junk Mail Controls runs after mail mail filters and applies only to the Inbox folder AND its sub-folders. Use this to your advantage, for example, you can filter mail you are sure not to be Junk to a special folder outside of Inbox so that the messages will not be classified as Junk (especially useful if you subscribe to newsletters or if you are on a moderated mailing list)."
Version: unspecified → 2.0
(In reply to comment #1) > but if it is a subfolder, it will be scanned. and if courier enforces that all > folders must be subfolders of inbox, then your use case is outside the specs. ... in which case, this bug needs to be duped to bug 189970
Indeed, bug 189970 would solve my problem. This is a separate issue, however. Since I have entered an IMAP prefix specifically to get around the strange Courier namespace issue, and get my folders to appear alongside the Inbox instead of as sub-folders, Thunderbird should use this behaviour in deciding which folders to filter junk in. Since I have configured Thunderbird with the appropriate prefix, from a user perspective these folders are no longer sub-folders of my Inbox. It does do this already with standard mail filters. It writes out the folders as e.g. imap://user@mail/folder even though -technically- it would be imap://user@mail/INBOX/folder, however the inbox gets filtered out as a result of my imap prefix. Hopefully what I am saying makes sense. Even if this problem is limited to Courier, and is just a flaw in its design, it is still a very popular mail server, and this bug leaves all Courier users without any way to have an unfiltered imap folder.
Magnus, should this be changed to sev enh?
I'm not sure that reference is up to date. At least for me the junk filter runs on other folders than the imap Inbox. And I'm glad it does... as otherwise I wouldn't get tb junk filtering from such folders that get new mail filtered to them server side. It ignores the Junk folder I think. Maybe it helps if you set up the Spam folder to be a sub folder of the standard Junk folder.
Product: Core → MailNews Core
Component: General → MailNews: Filters
Product: Thunderbird → Core
QA Contact: general → filters
Version: 2.0 → unspecified
rkent for input
AFAICT, there is nothing in the junk running logic that implements this "applies only to the Inbox folder AND its sub-folders". The key statement that determines this is: if (serverType.EqualsLiteral("rss") || (mFlags & nsMsgFolderFlags::Newsgroup && !filterNewsForJunk) || (mFlags & (nsMsgFolderFlags::Junk | nsMsgFolderFlags::Trash | nsMsgFolderFlags::SentMail | nsMsgFolderFlags::Queue | nsMsgFolderFlags::Drafts | nsMsgFolderFlags::Templates | nsMsgFolderFlags::ImapPublic | nsMsgFolderFlags::ImapOtherUser) && !(mFlags & nsMsgFolderFlags::Inbox))) filterForJunk = PR_FALSE; (plus some followon logic that only processes NEW messages, and allows override of the default with an inherited folder property) That is, mail folders flagged as Junk, Trash, SentMail, Queue, Draft, Templates, ImapPublic, and ImapOtherUser are not scanned, others are. My JunQuilla extension for TB3 beta3 will probably include UI to allow selective enabling or suppressing of junk processing for a folder and its subfolders, using new backend capabilities. That would meet the needs of the reporter. I would change this bug to INVALID (or dupe to bug 189970) since it makes false assumptions about the way TB works.
on irc the thinking (along the lines of comment 7) is to dup this to bug 189970.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.