[Rspamd-Users] Block emails with Chinese and Cyrillic characters in the subject
Marcus MERIGHI
mcmer-rspamd at tor.at
Wed Apr 22 09:59:48 UTC 2026
Hello Andreas,
without bothering the list I wanted to say thanks for sharing!
Marcus
rspamd at linuxmaker.com (Andreas Günther), 2026.04.22 (Wed) 08:40 (CEST):
> Am Mittwoch, 6. August 2025, 16:08:19 Mitteleuropäische Sommerzeit schrieb Steve
> Witten:
> > Here are the relevant regexps in
> > $LOCAL_CONFDIR/local.d/maps.d/blacklist/content.map:
> >
> > # Non-Western charsets
> > #
> > /(=\?|charset\=)big5/i # Big5
> > /(=\?|charset\=)euc-kr/i # Extended Unix Code -- Korean
> >
> > /(=\?|charset\=)windows-1251/i # Windows 1251
> > /(=\?|charset\=)koi8-r/i # Cyrillic
> > /(=\?|charset\=)gb2312/i # Chinese
> > /(=\?|charset\=)ks_c_5601-1987/i # Hangul (Korean)
>
>
> These are outdated rules. They're barely effective anymore because they recognize
> outdated language-specific character sets like windows-1251, gb2312, or big5, while
> modern spam emails almost always use universal UTF-8.
>
>
> That's why my solution is this:
>
>
> /etc/rspamd/local.d/multimap.conf
> MIXED_NONLATIN_SUBJECT {
> type = "header";
> header = "Subject";
> map = "${LOCAL_CONFDIR}/local.d/maps.d/mixed_nonlatin.map";
> symbol = "MIXED_NONLATIN_SUBJECT";
> description = "Cyrillic, Chinese, Arabic or other non-Latin subject";
> regexp = true;
> score = 6.0;
> action = "reject";
> }
>
> and in
> /etc/rspamd/local.d/maps.d/mixed_nonlatin.map
>
> /\p{Cyrillic}/u
> /\p{Han}/u
> /\p{Arabic}/u
> /\p{Hangul}/u
> /\p{Hiragana}/u
> /\p{Katakana}/u
>
>
> Best regards
>
>
> Andreas
> --
> Users mailing list
> Users at lists.rspamd.com
> https://lists.rspamd.com/mailman/listinfo/users
More information about the Users
mailing list