Mail filters stumble over MIME encoded chars (ampersand only?)



12 years ago
9 years ago


(Reporter: ok34, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: revisit 2008-12-18)


(1 attachment)



12 years ago
User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv: Gecko/20060912 SeaMonkey/1.0.5
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv: Gecko/20060912 SeaMonkey/1.0.5

When e-mails are being filtered, the filter seems to be unaware of codepages.

Reproducible: Always

Steps to Reproduce:
1.Establish a filter rule "From contains '1&1'"
2.Process a mail with From: =?iso-8859-1?Q?Rechnungsstelle_1=261_Internet_AG?= <>

Actual Results:  
Mail does not get filtered, although in the main mail window the sender is correctly displayed as "Rechnungsstelle 1&1 Internet AG"

Expected Results:  
Mail should get filtered, as the From header field does indeed contain an ampersand character.

I could not check whether this happened on Mozilla 1.7.12 already, since the sender of these e-mails changed his headers at about the same time I switched to Seamonkey.

Comment 1

12 years ago
Does this also happen with other messages where From or Subject is encoded in some way (create a test filter and then manually run that filter)? Maybe look at messages with umlauts in Subject or From to find such a message. I thought at the time the mail filters kick in the MIME headers are already decoded...

Comment 2

12 years ago
Created a filter "Subject contains 'ötest'" (o-umlaut+test). Sent e-mail to myself with that subject. Header line is Subject: =?ISO-8859-1?Q?=F6test?=

Filtered correctly.

Maybe its a problem affecting only rules for From lines? Or only affecting ampersand characters? Codepages should work on all header lines an on all characters.

Comment 3

12 years ago
Can you try to send yourself a mail with Subject line "test 1&1 öffnen" and filter on "1&1" and then on "öffnen" and see if one of those two fails? I think the umlaut is required here to trigger the encoding to MIME (or is & in Subject enough to trigger MIME? don't think so).

Comment 4

12 years ago
Created two filters. One filtering "öffnen" (with o-umlaut) and one with "1&1" (ampersand). The latter was first in sequence. Sent e-mail to myself with subject
test 1&1 =?ISO-8859-1?Q?=F6ffnen?=

Gets correctly filtered on the ampersand - no wonder, Seamonkey seems to enclose only the umlaut in ISO codepage brackets.

If the same behaviour is exhibited the other way round I would still consider it to be a bug. Any character may be inside the codepage marking, umlauts, ampersand, and even "normal" characters.


12 years ago
Assignee: mail → nobody
Component: MailNews: Main Mail Window → MailNews: Filters
Product: Mozilla Application Suite → Core
QA Contact: filters
Summary: Mail filters seemingly codepage-unaware → Mail filters stumble over MIME encoded chars (ampersand only?)
Version: unspecified → Trunk

Comment 5

12 years ago
Looks like a dupe of bug 320584.

Comment 6

12 years ago
No, wait -- that bug is the opposite of this.

Comment 7

12 years ago
I'm not able to reproduce this.  Whether the encoded '&' is in the Subject: or the From:, Quicksearch and filters correctly identify the message.

Comment 8

12 years ago
Mike: How did you test this? Did you manually edit your mbox file or is there some trick to force MIME?

Comment 9

12 years ago
(In reply to comment #8)
> Mike: How did you test this? Did you manually edit your mbox file or is there
> some trick to force MIME?

I did manually edit the mbox -- so, I suppose it's possible the filter is failing for incoming mail where it's not failing for after-the-fact filtering or Quicksearch.

There is a trick you can use, however; you can simply paste the MIME encoding into a Subject field, or into the Name field of an identity.

Comment 10

12 years ago
OK, I tried reproducing this with actual incoming email and I still have no problem detecting a MIME-encoded '&' in Subject or From headers.

Comment 11

12 years ago
Problem exists on 1.0.6., too.

On 1.0.7. I haven't received a mail from 1&1 so far.

Comment 12

12 years ago
Created attachment 249676 [details]
Header of a mail that did not get filtered

This is the entire header and message body of a mail that did not get filtered. I only removed the attachment and altered all strings that may contain personal information (Bugzilla is being grazed by spam harvesters), like e-mail address, billing backreference, mail id.

I zipped the file, to ensure that no "ascii filtering" takes place anywhere.


10 years ago
Product: Core → MailNews Core

Comment 13

10 years ago
Reporter, Can you confirm whether this problem is gone, or still exists on a current version of thunderbird?  

We are working to help old bugs move along, so your comment will be helpful.
Whiteboard: revisit 2008-12-18

Comment 14

10 years ago
Hi, so far I did not see this behaviour again. But I will generate a couple of test e-mails to test filtering and report the results here.

Comment 15

9 years ago
Reporter, since no additional posts, can we assume the bug is no more reproducible?

Comment 16

9 years ago
Thanks for asking. I have so far not seen this bug reappear, having received some mails with ampersand and other encoded characters. So, yes, it's no longer reproducible.

Comment 17

9 years ago
WFM per comment 16
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.