Stopping messages containing Chinese and Korean characters?

emm1 ljosnet at gmail.com
Sat Apr 8 20:27:21 IST 2006


How would I do this in FreeBSD 6 sendmail? In Linux the following
worked perfectly:

LOCAL_CONFIG
dnl #
dnl regex map for character sets (not case-sensitive)
KCharsetKorean regex -a at MATCH charset=.*(euc-kr|korean|ks.*c)
KCharsetChinese regex -a at MATCH charset=.*(big5|Chinese|cn|gb)
dnl #
LOCAL_RULESETS
dnl #
##################################################################
#  Local ruleset - Check Content-Type:                           #
##################################################################
dnl Reject based on Content-Type header
HContent-Type:          $>CheckContentType
D{NoKoreanMsg}Korean not spoken here.
D{NoChineseMsg}Chinese not spoken here.
SCheckContentType
R$*             $: $(CharsetKorean $&{currHeader} $)
R at MATCH         $#error $: 550 5.7.0 ${NoKoreanMsg}
R$*             $: $(CharsetChinese $&{currHeader} $)
R at MATCH         $#error $: 550 5.7.0 ${NoChineseMsg}

When I insert the same code in my FreeBSD sendmail I get this error:

stat=rewrite: map CharsetChinese not found

Thanks!


More information about the MailScanner mailing list