If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Message filter doesn't work on some messages

RESOLVED INCOMPLETE

Status

MailNews Core
Filters
RESOLVED INCOMPLETE
6 years ago
5 years ago

People

(Reporter: matteo sisti sette, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

6 years ago
Created attachment 589147 [details]
Screenshot at 2012-01-17 12:15:58.png

User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

Steps to reproduce:

I have a message filter set up to move the matching messages into a subfolder of the Inbox. I attach a screenshot of the filter settings. The filter is as follows:
Match all of the following:
- subject contains "["
- subject contains "]"
- From doesn't contain "matteosistisette"
- To doesn't contain "matteosistisette"
- Cc doesn't contain "matteosistisette"



Actual results:

Most of the times the filter works, but sometimes some messages that match the filter criteria are not filtered, i.e. the action is not applied to them.
I attach an example of a message that didn't get filtered. Some other similar messages from the same mailing list did get filtered.


Expected results:

Obviously, all (and only) messages that match the filter criteria should be applied the action (which in this case is to move them to a subfolder).
(Reporter)

Comment 1

6 years ago
Created attachment 589148 [details]
a message that matches the filter but didn't get filtered

Comment 2

6 years ago
It does work for me on TB12, Win XP. The message is filtered fine, when using Tools-> Run filters on folder, Run filters on Message and also from the Filters list dialog.

Can you try these menu options?

Does it only NOT work when the message is received and the filter should run automatically?
(Reporter)

Comment 3

6 years ago
"Run filters on message" and "run filters on folder" don't work either. It's TB9 on Ubuntu 11.10 here.

Comment 4

6 years ago
(In reply to matteo sisti sette from comment #3)
How about a suggestion: filter should contains Delivered-To = <YourName> instead of those 3 conditions (To, CC, BCC). Try it.
Attachment #589148 - Attachment mime type: application/octet-stream → text/plain
(Reporter)

Comment 5

6 years ago
@Hashem:
- the filter should work the way it is; whether or not that's the most elegant way to write the filter i need, the observed behavior is wrong. The message matches the filter and is not filtered.

- i don't think your suggested change would make any sense. The purpose of my filter is "take all messages that contain "[" and "]" (which probably belong to some mailing list) but were _not_ specifically addressed to me". They are all delivered to me, if they weren't I wouldn't have them in my inbox in the first place! the condition Delivered-To=<myName> will always return true. Anyway this is not relevant to the bug

Comment 6

6 years ago
(In reply to matteo sisti sette from comment #3)
> "Run filters on message" and "run filters on folder" don't work either. It's
> TB9 on Ubuntu 11.10 here.

Is there anything interesting in Tools->Error console when you try to run the filters?
(Reporter)

Comment 7

6 years ago
No, nothing
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
(In reply to matteo sisti sette from comment #5)
> @Hashem:
> - the filter should work the way it is; whether or not that's the most
> elegant way to write the filter i need, the observed behavior is wrong. The
> message matches the filter and is not filtered.

Suggestion by Hashem Masoud implies:
  "Delivered-To: matteosistisette@gmail.com" exists in the mail
  as you already know, 
  and this is reason why rule you defined doesn't work as you want.

Confusing but predefined "To" is not "To: header only" and predefined "To or CC" is not "To: header or CC: header only".
Similar difference exists in From(From: Sender:, ... vs From: header only), Date(extracted timestamp value vs. Date: header), Status(extracted mail status vs. Status: header), .... 

For BCC: check, "In Delivered-To: == true && In To: == false && In CC: == flase" is needed as you say.
If you want to check "To: header only", you need to add customized header(I recommend you to define as "to" in order to distingush from predefined "To").
View msgFilterRules.dat content for some differences between predefined keyword and customized header name in message filter.
(Reporter)

Comment 9

6 years ago
Do you mean that the predefine "To" means "To: or Delivered-to:"?

If so,
- that's wrong and should be changed
- or at least it should read "To or Delivered-To", i.e. what it does should match what it says it does
- ALL the messages I receive have the "Delivered-To: matteosistisette@gmail.com" header, so why do some (most) get filtered and some not? If To means "To or Delivered-To", then my "To doesn't contain matteosistisette" rule would always return false and my filter would have never filtered a single message.

I attach another message. This one _got_ filtered (how I expected). Can you tell why this message would match the filter and the previous one I posted wouldn't?
(Reporter)

Comment 10

6 years ago
Created attachment 590129 [details]
a message that matches the filter and does get filtered as expected

why does this get filtered and the previous one does not?
(In reply to matteo sisti sette from comment #9)
> Do you mean that the predefine "To" means "To: or Delivered-to:"?

No.
I meant; "To" is perhaps "To: and some other header(s)" as former "Sender" was Sending person, From:, Sender: ..., and Delivered-to: may be included in the "some other header(s)" for "To".
But Delivered-To: is perhaps searched only when customized header is added and used. I was perhaps confused. 

(In reply to matteo sisti sette from comment #10)
> a message that matches the filter and does get filtered as expected
> why does this get filtered and the previous one does not?

(mail which was not moved, attached first, call mail-1)
> Delivered-To: matteosistisette@gmail.com
> Subject: Re: [ODK Community] Anyone using a Nomad Trimble
> From: Matt Berg <mlberg@gmail.com>
> To: opendatakit@googlegroups.com
> Content-Type: multipart/alternative; boundary=000e0ce04248f73b0e04b6b5f5cc

(mail which was moved, attached second, call mail-2)
> Delivered-To: matteosistisette@gmail.com
> From: Yaw Anokwa <yanokwa@gmail.com>
> Subject: Re: [javarosa-developers] javarosa and GWT
> To: javarosa-developers@googlegroups.com
> Reply-To: javarosa-developers@googlegroups.com
> Sender: javarosa-developers@googlegroups.com
> Content-Type: text/plain; charset=ISO-8859-1

It may be "To or CC" relevant issue like next;
If mail received just before contains CC, and current mail doesn't have CC, garbage of previous mail's CC is used by filter.

Can you check with single mail in single local mail folder, with "Run Filters On Folder". (some problem is reported to Run filter on (selected) message(s). check with Run Filters On, please).

Create local mail folder1, folder2, copy mail-1, mail-2 to to folder1, folder2 respectively, create a filter rule of "same condition, with simple action like Add Star, Stop execution" at top of message filter rules, Run Filters On Folder at folder1 and folder2.
Can you see problem on mail in folder1?
matteo?

(In reply to WADA from comment #11)
> 
> It may be "To or CC" relevant issue like next;
> If mail received just before contains CC, and current mail doesn't have CC,
> garbage of previous mail's CC is used by filter.
> 
> Can you check with single mail in single local mail folder, with "Run
> Filters On Folder". (some problem is reported to Run filter on (selected)
> message(s). check with Run Filters On, please).
> 
> Create local mail folder1, folder2, copy mail-1, mail-2 to to folder1,
> folder2 respectively, create a filter rule of "same condition, with simple
> action like Add Star, Stop execution" at top of message filter rules, Run
> Filters On Folder at folder1 and folder2.
> Can you see problem on mail in folder1?
Whiteboard: [closeme 2012-06-25]
(Reporter)

Comment 13

5 years ago
I don't have the time to run those tests
thanks for the update. please reopen after testing
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2012-06-25]
You need to log in before you can comment on or make changes to this bug.