Closed Bug 355018 Opened 18 years ago Closed 15 years ago

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

Categories

(MailNews Core :: Filters, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ok34, Unassigned)

Details

(Whiteboard: revisit 2008-12-18)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.0.7) Gecko/20060912 SeaMonkey/1.0.5
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.0.7) 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?= <rechnungsstelle@1und1.de>


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.
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...
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.
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).
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.
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
Looks like a dupe of bug 320584.
No, wait -- that bug is the opposite of this.
I'm not able to reproduce this.  Whether the encoded '&' is in the Subject: or the From:, Quicksearch and filters correctly identify the message.
Mike: How did you test this? Did you manually edit your mbox file or is there some trick to force MIME?
(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.
OK, I tried reproducing this with actual incoming email and I still have no problem detecting a MIME-encoded '&' in Subject or From headers.
Problem exists on 1.0.6., too.

On 1.0.7. I haven't received a mail from 1&1 so far.
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.
Product: Core → MailNews Core
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
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.
Reporter, since no additional posts, can we assume the bug is no more reproducible?
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.
WFM per comment 16
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: