Imap filters do not work on already read messages

RESOLVED DUPLICATE of bug 308148

Status

defect
--
major
RESOLVED DUPLICATE of bug 308148
9 years ago
2 years ago

People

(Reporter: jeremy.guthrie, Unassigned)

Tracking

24 Branch
x86
All

Firefox Tracking Flags

(Not tracked)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

I check my exchange account using Thunderbird, iPhone, and iPad.  If Thunderbird is the first to 'read' or 'download' a message via Imap before my two other devices then the filters work fine.

If I read my mail via iPhone, iPad, or OWA, then Thunderbird will not download and filter the message into the appropriate mailbox.  If I then highlight the message, and run filters manually against selected messages, it will put the message in the default inbox.  It will also mark the message as an unread new message.

Reproducible: Always

Steps to Reproduce:
1.  View message with outlook or OWA or iPhone to mark as read
2.  Start up thunderbird
3.  Wait for it to check IMAP interface to exchange
4.  Click on inbox on Exchange, message will only be there.
5.  Click on the message in the inbox
6.  Tools->Run Filter on Messages
Actual Results:  
1.  Message filter will put into Local inbox instead of proper mailbox per the filters
2.  Message will now be marked as unread


I recently migrated from Slackware/KMail to Thunderbird on MAC OS X.  I migrated all of my mail into a large mbox.  I was then pushing my mail back to the exchange so I could then re-run Thunderbird filters and file my old messages into the right box.  That worked for about 80,000 messages of the 110,000 I keep.  It then just stopped working right and has been behaving this way ever since.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
Component: General → Networking: IMAP
OS: Mac OS X → Windows XP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Version: unspecified → 1.9.1 Branch
   Hi,

 I have exactly the same issue in Thunderbird 3.1.4 on Ubuntu 10.10.

 I found that the filters (which I only use to 'tag' messages) seemed to work erratically when checking email on my imap account, tagging some messages and not others. The filters always work perfectly when run manually.

 Yesterday, I came to the same conclusion as what is reported here: when checking email from my imap account, only the mails that are *unread* on the imap server are filtered, the others are ignored even though they are 'new'.

It seems that the filters (on imap servers) are only run on new AND unread emails, instead of being run on all new emails...
Hello,

I can confirm this issue still being on Thunderbird 10.0.2.
Hi,

same her with Thunderbird 11.0.0 and iPhone...
This is supposedly "intended behavior" but stems from ancient times when IMAP was not commonly used.

See discussion here:
http://forums.mozillazine.org/viewtopic.php?f=39&t=2461817

However, today this issue clearly must be viewed as a bug that makes message filtering on IMAP accounts unusable on Thunderbird.

Instead, ALL messages (unread and read) should be filtered by Thunderbird -- if they are new to Thunderbird. As of today however, Thunderbird only filters messages that are 1.) new AND 2.) unread.

This behavior clearly must be fixed.
Same here, please add a fix.

TB12.0.1
Well, with all the mobile devices around it does seem the "intended behavior" is just a fail. For people managing their mails with TB and additionally using tablets and phones for reading, it is just a no go. Because it is a behavior that is simply not expected. If a program does something unexpected it is broken.
Seems as if no one is interested in TB anymore anyway

:(

FAIL, Mozilla
This is really lame that this hasn't even been looked at.  I migrated to the Exquilla plugin and I see the same stupid behavior.  IOW, a read message doesn't get moved whether it comes in via IMAP or an Exchange plugin.  This is silly, it's basic filtering and it is pretty flaky.  I really wish someone would pay attention.
OS: Windows XP → Mac OS X
Version: 1.9.1 Branch → 17
Component: Networking: IMAP → Filters
Product: MailNews Core → Thunderbird
Priority: -- → P2
Same issue, Please Help!
Same problem here, please fix it.
TB 17.0.7 and iPhone/iPad
I don't know about anyone else reading the links but there are a lot of comments that this is a desired behavior.  First off, it isn't intuitive at all that it only works on -new- and -unread- emails.  Short of that thread, it isn't documented anywhere.

Can we not just get a filter check box then that says "apply to all emails in folder regardless of state"?
Priority: P2 → P1
(In reply to David.P from comment #5)
> Instead, ALL messages (unread and read) should be filtered by Thunderbird --
> if they are new to Thunderbird. As of today however, Thunderbird only
> filters messages that are 1.) new AND 2.) unread.
> This behavior clearly must be fixed.

"1.) new AND 2.) unread" is for new mail alert.
I agree with you.
"Mail of UID larger than highest UID Tb already knows, and no \Deleted flag" should be;
(a) "new mail" for message filter, regarless of \Seen flag, \Recent flag.
    ("mail of \Draft flag saved by other client" is "new" for this Tb?)
(b) "new mail" for new mail alert, only when no \Seen flag, no \Draft flag.
please refrain from setting priority - priority is used by developers. ref https://bugzilla.mozilla.org/page.cgi?id=fields.html#importance
OS: Mac OS X → All
Priority: P1 → --
See Also: → 883596
Ancient related/seealso filter bug, which must reopen: https://bugzilla.mozilla.org/show_bug.cgi?id=277042
Version: 17 → 24
(In reply to Jeremy Guthrie from comment #16)
> It looks like the Mozilla Foundations is not really doing development on
> Thunderbird anymore.
> 
> http://www.zdnet.com/mozilla-scraps-thunderbird-development-email-client-not-
> a-priority-anymore-7000000469/
> 
> https://wiki.mozilla.org/Thunderbird/New_Release_and_Governance_Model

According to what I heard at FOSDEM, and IIUC, Thunderbird has gone back to being a Community project, driven by volunteers only. No more Mozilla Corporation employees, or only a negligible few.

This certainly makes life hard but not necessarily impossible. Another thing which does make it hard is the lack of beta-testers (and, I suppose, Aurora and Daily testers), especially on Windows. Are you one? Are you ready to become one, by downloading a new build every 24 hours from http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central and using it as your default mailer, dutifully reporting any as yet unknown bugs that would bite you?

…And of course the MailNews Core product is shared between Thunderbird and SeaMonkey (another community project), which means more developers and more testers where the backends are concerned. (Not to mention Core, Toolkit, etc., which even Firefox shares with us.)
Same Problem here :-(
I cannot believe it is still unconfirmed?!
Please fix it!!!
Problem appears, if i check mails (all Imap-clients) from another machine (mobile or workstation) before the one with the filter! So, if the mails are marked as "read" (though from another machine), the filter does not seem to be working. If i mark them on these machines as "unread" an then re-check them on the filter-machine... it works pretty well! ... So, it seems as if the filter does not filter "read" mails, even though there are new on the machine with the filter...
Checking mails on two desktop and one mobile clients, all imap. one of the desktops has the filter.
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
Same problem here.
This four year old issue is really starting to be a pain in the a**, seriously, if I find a decent replacement program for Tb I WILL use instead. I just can't afford to waste time manually resorting my mails when I get home...
This is also describe earlier by bug 308148.

The issue is well understood, so please only comment there if you intend to supply the patch to fix it.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Summary: Imap filters work on new messages, do not work on already read messages, forcing on already read messages puts them in inbox → Imap filters do not work on already read messages
Duplicate of bug: 308148
> > It looks like the Mozilla Foundations is not really doing development on
> > Thunderbird anymore.
> > 
> 
> According to what I heard at FOSDEM, and IIUC, Thunderbird has gone back to
> being a Community project, driven by volunteers only. No more Mozilla
> Corporation employees, or only a negligible few.
> 
> This certainly makes life hard but not necessarily impossible. Another thing
> which does make it hard is the lack of beta-testers (and, I suppose, Aurora
> and Daily testers), especially on Windows. Are you one? Are you ready to


I use Thunderbird since its release and Mozilla *never* cared at all about fixing this product. They just added some new accounts type support like information feeds and chating. Some huge bugs are still there since the beginning, more than ten years later.
Thunderbird is advanced when people like you contribute. Rather than whine, here's what you can do: go to the dup parent, enable the pref there that is used to fix this bug, and comment whether thqt works for you. We need to decide if we are going to make that the defaut, and your input would be helpful.
Can you please elaborate on which pref needs to be enabled.

I also would be very keen on getting this issue (IMHO) fixed!

For months I have been wondering whether the relatively complex filter setup is causing the described problem. Having found this bug report I am glad that it is obviously not me causing this. 

I also share the opinion that with today's "standard habit" of processing e-mails on multiple devices the default behaviour should definitively be changed as requested.
mail.imap.filter_on_new defaults to true in version 52 which will be out in a couple weeks.
Great news, thank you!
You need to log in before you can comment on or make changes to this bug.