On Tue, Dec 14, 2021 at 11:36:00AM +0100, Benoît Panizzon wrote:
> Hi Gang
> 
> At the moment we see a lot of phishing emails with UTF-8 encoded
> subject containing emojis like:
> 
> =?UTF-8?Q?=E2=9C=85_Dein_Paket_wartet_auf_dich!_-14.12.2021-?=
> 
> I noticed a Rule:
> 
> header        PP001 Subject =~ /=\?UTF-8\?Q\?=E2=9C=85_Dein_Paket/
> 
> is not matching.
> 
> Neiter does: /Dein_Paket/
> 
> But /Dein\ Paket/
> 
> Does match. So it looks like SpamAssassin is passing the 'decoded'
> header.
> Unfortunately the 'readable' part is a bit too generic. I would like to
> also match the emoji.
> 
> How do I do this? There is no rawheader or rawbody matcher as far as I
> could determine.

Subject:raw =~ /=E2=9C=85/

Or better yet, just match the UTF-8 bytes as is, which will work regardless
of encoding method:

Subject =~ /\xE2\x9C\x85/

Reply via email to