sieve and utf-8 MIME/base64 content

Vladislav Kurz vladislav.kurz at webstep.net
Fri Feb 16 05:07:19 EST 2018


On 02/16/18 10:25, Robert Stepanek wrote:
> On Fri, Feb 16, 2018, at 10:17, Eugene M. Zheganin wrote:
> 
>> I'm using sieve with cyrus to sort incoming mail, and it works perfectly 
>> with latin symbols. But what if I need to sort out the mail that has all 
>> sorts utf-8 sumbols in it ? Like MIME-encoded headers and base64 
>> -encoded body ?
> 
> The main developer for Sieve support (and 2.5) in Cyrus IMAP might not be able to respond the next days. That being said, I'm not sure I understand what use case you are trying to accomplish?

I'm not sure if it works either, but just to clarify - I think what
Eugene wants, is something like this:

if header :contains "from" "Štěpánek" { ... do whatever ... }

The problem is that headers with non-ascii chars are encoded in form
like this:

Subject: =?UTF-8?B?UmU6I.....gVG9v?=

And also the body is sometimes completely in base64, even though it is
just plaintext or HTML in UTF-8. Depends on sender's mail client.

So the question is whether Cyrus decodes this stuff before checking and
applying the sieve rules.

-- 
Best Regards
        Vladislav Kurz



More information about the Info-cyrus mailing list