[exim] Re: how do i filter against utf-8 headers

Top Page
Delete this message
Reply to this message
Author: Andreas Metzler
Date:  
To: exim-users
Subject: [exim] Re: how do i filter against utf-8 headers
abc@??? wrote:
[rejecting mail with rfc2047-enoded utf-8 stuff in headers]
>   deny    hosts = +rbl_hosts
>           message = UTF-8 not allowed
>           log_message = UTF-8 not allowed in subject: $h_subject
>           condition = ${if match\
>           {${lc:$h_subject:}}\
>           {\Nutf\-8\N}\
>           {yes}{no}}


> That does not successfully match a UTF-8 encoded subject line.


> What's interesting, is if I look at a spam email within my mail reader
> (Pine), it looks like this: Subject: [utf-8] Hi again


> But the actual text within the /var/spool/mail file actually looks like
> this: Subject: =?utf-8?B?SGkgYWdhaW4=?=


> So there's some kind of encoding magic happening here that may be making
> it difficult for me to filter against UTF-8 messages. Any suggestions?


Use $rh_subject.

<http://www.exim.org/exim-html-4.50/doc/html/spec_11.html#IX830>
                 hth, cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
                                           http://downhill.aus.cc/