简介
本文档介绍如何编写和配置筛选器,以便检测思科邮件安全设备(ESA)上基于内容类型的字符集并对其执行操作。以下文档可用于检测垃圾邮件中看到的基于外语字符。
背景信息
ESA管理员可能会收到大量包含基于字符的外语且对其公司或域来说不是合法邮件的邮件。 一种从ESA解决问题的方法是,我们有三个选项:
-
编写过滤器以检测内容类型。
-
编写过滤器以引用过滤器中的基于字符的词典。
- 使用条件“消息语言”编写过滤器。(此选项是AsyncOS邮件安全10.0.0-203及更高版本的新功能。)
如何阻止基于内容类型的字符集
编写过滤器以检测内容类型
第一个选项供管理员编写和配置过滤器,并根据需要将其关联到邮件策略。
注意:编写并配置此过滤器作为邮件过滤器可能需要耗费大量资源,以便扫描邮件正文中的字符集。
注意:强烈建议将此过滤器配置为内容过滤器,因为内容过滤器会在反垃圾邮件扫描后执行。 但是,如果需要,可以将此过滤器编写并配置为邮件过滤器。
以下示例将考虑通过基于Windows-1251的字符集包含基于俄语(西里尔文)字符的邮件。 作为内容过滤器写入:
使用的测试电子邮件正文中包含以下内容:
Russian uses а, э, ы, у, o, я, е, ё, ю, и as vowels. You could create a message filter set to "Matches any of the following" that test whether "Body" "contains" "и", "Body" "contains" "ё" and so forth until you covered all of the vowels. Ssince English also uses "a" , "e" , "o", and "y" letters don't test for them. The reason for "Matches any of the following" is to logically OR them - you want the action to take place if any of those letters are found.
使用如上配置的内容过滤器,邮件日志的记录将与以下内容类似:
Thu Sep 10 14:50:09 2015 Info: Start MID 164993 ICID 266729
Thu Sep 10 14:50:09 2015 Info: MID 164993 ICID 266729 From: <end_user@test.com>
Thu Sep 10 14:50:09 2015 Info: MID 164993 ICID 266729 RID 0 To: <recpient@my_co.com>
Thu Sep 10 14:50:09 2015 Info: MID 164993 using engine: SPF Verdict Cache using cached verdict
Thu Sep 10 14:50:09 2015 Info: MID 164993 Message-ID '<7A961F85-A5F1-413F-87CB-C31D2E5605EC@my_co.com>'
Thu Sep 10 14:50:09 2015 Info: MID 164993 Subject 'russian test'
Thu Sep 10 14:50:09 2015 Info: MID 164993 ready 2302 bytes from <end_user@test.com>
Thu Sep 10 14:50:09 2015 Info: MID 164993 matched all recipients for per-recipient policy DEFAULT in the inbound table
Thu Sep 10 14:50:09 2015 Info: MID 164993 AMP file reputation verdict : CLEAN
Thu Sep 10 14:50:09 2015 Info: MID 164993 using engine: GRAYMAIL negative
Thu Sep 10 14:50:09 2015 Info: MID 164993 Custom Log Entry: <====== WINDOWS-1251 DETECTED ======>
Thu Sep 10 14:50:09 2015 Info: MID 164993 quarantined to "Policy" (content filter:russian_text)
Thu Sep 10 14:50:09 2015 Info: Message finished MID 164993 done
可以使用其他语言和字符集。 有关其他信息,请参阅“参考”部分。
编写筛选器以引用基于字符的词典
第二个选项是将字符集列表添加到词典文本文件,并在过滤器中引用该字符集。
将字符添加到词典的示例:
现在,字符将分配给词典,并且词典本身在过滤器的条件项中引用:
使用与上面相同的测试邮件,该邮件正文中包含以下内容:
Russian uses а, э, ы, у, o, я, е, ё, ю, и as vowels. You could create a message filter set to "Matches any of the following" that test whether "Body" "contains" "и", "Body" "contains" "ё" and so forth until you covered all of the vowels. Ssince English also uses "a" , "e" , "o", and "y" letters don't test for them. The reason for "Matches any of the following" is to logically OR them - you want the action to take place if any of those letters are found.
使用词典匹配条件按上述方式配置内容过滤器,邮件日志将记录类似于以下内容:
Thu Sep 10 15:26:08 2015 Info: Start MID 164995 ICID 266737
Thu Sep 10 15:26:08 2015 Info: MID 164995 ICID 266737 From: <end_user@test.com>
Thu Sep 10 15:26:08 2015 Info: MID 164995 ICID 266737 RID 0 To: <recpient@my_co.com>
Thu Sep 10 15:26:08 2015 Info: MID 164995 using engine: SPF Verdict Cache using cached verdict
Thu Sep 10 15:26:08 2015 Info: SPF Verdict Cache cache status: hits = 6, misses = 4, expires = 1, adds = 4, seconds saved = 0.50, total seconds = 0.85
Thu Sep 10 15:26:08 2015 Info: MID 164995 Message-ID '<BCC88307-EB91-476E-8732-334E9EE84EC8@my_co.com>'
Thu Sep 10 15:26:08 2015 Info: MID 164995 Subject 'russian test 3'
Thu Sep 10 15:26:08 2015 Info: MID 164995 ready 2316 bytes from <end_user@test.com>
Thu Sep 10 15:26:08 2015 Info: MID 164995 matched all recipients for per-recipient policy DEFAULT in the inbound table
Thu Sep 10 15:26:08 2015 Info: MID 164995 AMP file reputation verdict : CLEAN
Thu Sep 10 15:26:08 2015 Info: MID 164995 using engine: GRAYMAIL negative
Thu Sep 10 15:26:08 2015 Info: MID 164995 Custom Log Entry: <====== WINDOWS-1251 DETECTED VIA DICTIONARY ======>
Thu Sep 10 15:26:08 2015 Info: MID 164995 quarantined to "Policy" (content filter:russian_text_2)
Thu Sep 10 15:26:08 2015 Info: Message finished MID 164995 done
使用“消息语言”条件写入内容过滤器
第三个选项是使用“消息语言”条件。ESA使用内置语言检测引擎检测消息中的语言。设备将提取主题和邮件正文,并将其传递到语言检测引擎。
语言检测引擎确定提取的文本中每种语言的概率并将其传回设备。设备将概率最高的语言视为邮件的语言。在以下情况中,设备将邮件的语言视为“未确定”:
- 如果ESA不支持检测到的语言
- 如果设备无法检测邮件的语言
- 如果发送到语言检测引擎的提取文本的总大小小于50字节。
注意:此选项是AsyncOS邮件安全10.0.0-203及更新版本的一项新功能。
以下示例将考虑包含基于中文/台湾的字符集的邮件。 作为内容过滤器写入:
使用如上配置的内容过滤器,邮件日志的记录将与以下内容类似:
Tue Feb 28 06:53:18 2017 Info: Start MID 481 ICID 27
Tue Feb 28 06:53:18 2017 Info: MID 481 ICID 27 From: <end_user@test.com>
Tue Feb 28 06:53:18 2017 Info: MID 481 ICID 27 RID 0 To: <recipient@my_co.com>
Tue Feb 28 06:53:18 2017 Info: MID 481 Subject 'Chinese text test'
Tue Feb 28 06:53:18 2017 Info: MID 481 ready 1047 bytes from <end_user@test.com>
Tue Feb 28 06:53:18 2017 Info: MID 481 matched all recipients for per-recipient policy DEFAULT in the inbound table
Tue Feb 28 06:53:18 2017 Info: MID 481 interim verdict using engine: CASE spam negative
Tue Feb 28 06:53:18 2017 Info: MID 481 using engine: CASE spam negative
Tue Feb 28 06:53:18 2017 Info: MID 481 interim AV verdict using Sophos CLEAN
Tue Feb 28 06:53:18 2017 Info: MID 481 antivirus negative
Tue Feb 28 06:53:18 2017 Info: MID 481 using engine: GRAYMAIL negative
Tue Feb 28 06:53:18 2017 Info: MID 481 Message language: 'Chinese/Taiwan'
Tue Feb 28 06:53:18 2017 Info: MID 481 Custom Log Entry: <=========Chinese/Taiwan Language Detected=========>
Tue Feb 28 06:53:18 2017 Info: MID 481 Outbreak Filters: verdict negative
Tue Feb 28 06:53:18 2017 Info: MID 481 quarantined to "Policy" (content filter:Chinese_text)
Tue Feb 28 06:53:18 2017 Info: Message finished MID 481 done
参考
- Microsoft提供字符集名称(.NET名称)在 代码页标识符 在写入和配置过滤器时可以参考的参数。
注意:ANSI代码页可能在不同计算机上有所不同,也可能针对单个计算机进行更改,从而导致数据损坏。为了获得最一致的结果,应用程序应使用Unicode,例如UTF-8或UTF-16,而不是特定的代码页。
- 莫齐拉赞 在文章中为以下内容提供内容类型的详细信息:标题、外字母、外来单词等 外语垃圾邮件
相关信息