sieve filtering utf 8 strings

Sergey Schwartz sergey.schwartz at
Wed Sep 2 15:03:00 UTC 2015


I'm completely stuck, so asking for advice.
My user has a sieve script which checks message header if it contains 
words in russian like 'Лист бронирования отправлен'.

Pritty simple script

# rule:[Отправлено]
if allof (header :contains "subject" "LDS (robot): Лист бронирования 
отправлен", header :contains "from" "noreply at")
     fileinto "Отправлено";

I don't have errors compiling the script or executing it via LMTP, but 
it doesn't work.
Normally user receives messages from robot with subject encoded as 

Subject: =?UTF-8?Q?LDS_(robot):_=D0=9B=D0=B8=D1=81=D1=82?=

When I send a test message via Thunderbird with required words - sieve 
works fine and subject is encoded in base64

Subject: =?UTF-8?B?0JvQuNGB0YIg0LHRgNC+0L3QuNGA0L7QstCw0L3QuNGPINC+0YLQv9GA?=

It is the same text, but encodind is different - base 64 works fine and 
quoted-printable does not.
Is it possible to have both supported for sieve ?

Best regards,
Sergey Schwartz

Senior System Administrator
Biblio Globus Tour Operator

T: +7 495 5042500 ext 1532
E: sergey.schwartz at

More information about the dovecot mailing list