Re: UTF-8 support / Perl regex \p{} unicode character property in 4.0.x

Jona Müller <[email protected]> Thu, 26 Mar 2026 16:17:42 +0100
Newsgroups gmane.mail.spam.spamassassin.general
Message-ID <acVOFjovoCBMHx5b@MacbookPro>
> Take a look at the ruleset 25_replace.cf
> 
>   https://github.com/apache/spamassassin/blob/trunk/rules/25_replace.cf

Thanks. 

> Are you looking for _specific_ emojis? Or just any?
> 
> I will take a look at adding an <EMOJI> tag that covers everything, then you
> could write a simple subject header rules looking for any emoji, or a
> sequence of them.

Right now any emoji would be very nice. 

We mostly process corporate mail, high volume plain text mailing
lists and a few non-profit organizations, emojis are not unheard of but usually
suspicious. For example 100% of mail with emojis in friendly from is spam.
In the subject it's more like 70% spam. People have their name and maybe their
company or department in friendly from, usually nothing else. 

> Targeting *specific* emojis becomes more difficult and may not be worth the
> effort, though I do notice certain ones (like the eggplant) appear in
> certain types of spam and are unlikely in ham...

For those very specific ones we have some rules and can add more later, those
are way less relevant at the moment. 

When using perl with the regex debug enabled I've noticed that the \p{}'s seem
to expand to one gigantic unicode byte ranges regex like in 25_replace.cf
internally but I don't know enough about perl's internals on how to get them out
of there. 

Jona Müller
-- 
================================
Independend GmbH

[email protected]
+49 6832 265556

http://ind.me
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEM0qOw5hydnArKgH2jALoLo7pDpwFAmnFThIACgkQjALoLo7p
DpwweA/8DScPbRQ/H7vX619SgiSl/WNQCdLBXoLvkJjX2vgSUSyKJ9c/XUXMPavQ
svDWlDX/cd487/4dIx4aKWVs6VPcuL6GuYmDdHF/N+xysBEHWPHLwQh3IlyAxxLR
kfKeA4zWwbqe6N1+HD1Rx/0md48eZ22/dUfdzdDLCeOu5FevdIVqZMEBADAz28ge
cXlnp8TrhmOzPW9dVWvwGoZ0zw1kqlWbnI30ffeEkNacwgy6woppWHPNM/xEgOB/
gfK3iesU3oSVhOmozbYPo207t5LZ5tFl+9mjk5+IqXLVgcC7inVnEew4oR0/ZemF
T85YF6jgnQkEfcNTxK8f1mgpttmEz6nBZA0jpBpEYAPaAdzoPWC1POXyQ3B5DzN8
J+pE8ki7vLhkC3XHJeqWMHgTIcY2p2UjzRw7iZTu7NeZsQVMBWAmOPSmN9Ihnf0h
b6V9kIP6VF7405/f3gE21/6BUcHXZlmw/UJFZCMTvnc1ZxXMVKR487GmFfuKI5hw
3lyIfSrawgCuPgC9ratvqa9pAN91+sOCtPgyUogKEEyCHd4mLd5oWMxXEb5+eSNS
WlQrDOSxpFQqaeat0GDJKfxkUNtqZuG0mqQOO9BiNtJDWvveOIw7Qbr1mtrcMvRb
2RV1YfMkTt2mlqZ2GnDa2FWrfow9/zFoTTjJc1MZko9RtGq2Dks=
=vWp7
-----END PGP SIGNATURE-----