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

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

2008-02-13 14:34:27

        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