ietf-mta-filters
[Top] [All Lists]

Re: Filtering on raw (non-decoded) headers?

2008-02-13 14:49:02

Post Scriptum:

Sometimes when I reread the mail, just before sending it out, I correct here and there something. Usually, when the mail is finished my keyboard layout is in Cyrillic. Sometimes, when I do the corrections, I make the edits without changing the layout, thus instead of writing "a" I write "а" (these are symbols that have different unicode number), especially when I know that the recipient has a UTF-8 capable client. From time to time I correct the subject in this way.

So I consider the policy your users apply as wrong. Better use spam filter, instruct it to increase the spammines, when encoded headers arrive, and sum the results of the spam tests, before evaluating the mail for spam.

Дилян Палаузов wrote:
    Hello Rob,

I see nothing wrong to encode ordinary ASCII headers with ?koir-8? style. If you want to check against headers containing Cyrillic letters, then
    if header :contains "subject" "е" { ... }
shall do the work, where "e" is Unicode 0435.

    Със здраве,
        Дилян

Rob Mueller wrote:

We're a large cyrus installation, and I recently got an email from a customer noticing that cyrus doesn't correctly decode MIME encoded headers when doing sieve header matches.

I looked through the cyrus code, and I think the fix is actually pretty easy, but it occured to me that in fixing this, we completely loose the ability to match against the non-decoded headers. That's actually annoying because I know a number of people do that to try and block emails with particular character sets in the subject line. For instance I know people have script tests like this:

if header :contains "subject" "?koir-8?" { ... }

To catch and drop all emails with Russian subjects.

By fixing this bug, it would break those existing scripts, and from what I can see in the RFC, there's no way to actually force a match against the non-decoded header (eg no :raw option or something like that).

Am I missing something? Is there a way to make a header match against a non-decoded header?

Rob