# # # Date: Wed, 25 Dec 2002 12:59:25 GMT From: Jorey Bump To: comp.mail.sendmail@lists.cm.nu Newsgroups: comp.mail.sendmail Subject: Re: Need recipe to block based on charset steveo@syslang.net (Steven W. Orr) wrote in news:m2el884si3.fsf@syslang.net: > I'm getting stuff that has this in it: > > Content-Type: text/html; charset=euc-kr > > Does someone have something I can add to my sendmail.mc that would > reject this type of stuff? I use the following, and it has been very effective: LOCAL_CONFIG dnl regex map for character sets (not case-sensitive) KCharsetKorean regex -a@MATCH charset=.*(euc-kr|korean|ks.*c) KCharsetChinese regex -a@MATCH charset=.*(big5|Chinese|cn|gb) LOCAL_RULESETS ################################################################## # 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@MATCH $#error $: 550 5.7.0 ${NoKoreanMsg} R$* $: $(CharsetChinese $&{currHeader} $) R@MATCH $#error $: 550 5.7.0 ${NoChineseMsg} _______________________________________________ Comp.mail.sendmail mailing list Comp.mail.sendmail@lists.cm.nu http://www.cm.nu/cgi-bin/mailman/listinfo/comp.mail.sendmail # # End of excerpt