本文档说明如何通过思科邮件安全设备(ESA)发送垃圾邮件示例来测试反垃圾邮件设置。首先,您需要确保在服务器上启用反垃圾邮件。可以通过登录网络界面并选择“安全服务”(Security Services)选项卡,然后选择“反垃圾邮件”(Anti-Spam)进行验证,并确保其已启用。另外,请确保您的传入邮件策略已启用反垃圾邮件设置。您可以依次转到“邮件策略”(Mail Policies)和“传入邮件策略”(Incoming Mail Policies)进行确认,然后点击“反垃圾邮件”(Anti-Spam)下的超链接修改策略垃圾邮件设置。
配置传入邮件策略以对垃圾邮件采取适当操作后,请登录到ESA的CLI。我们将在邮件中生成标有“X-Advertisement: spam”标题的垃圾邮件示例。Telnet至端口25上的设备并启动SMTP会话,如下例所示。
example.domain.com> telnet mail.example.com 25
Trying 172.19.1.93...
Connected to mail.example.com.
Escape character is '^]'.
220 mail.example.com ESMTP
ehlo example.com
250-example.com
250-8BITMIME
250 SIZE 104857600
mail from:test@example.com
250 sender <test@example.com> ok
rcpt to:test2@example.com
250 recipient <test2@example.com> ok
data
354 go ahead
X-Advertisement: Spam
Subject: testing spam filter
data
spam test
.
250 ok: Message 44 accepted
quit
在ESA的CLI上键入“tail mail_logs”以观察传入的消息,输出应如下所示:
Tue Apr 26 16:33:48 2005 Info: Start MID 44 ICID 28
Tue Apr 26 16:33:48 2005 Info: MID 44 ICID 28 From: <test@example.com>
Tue Apr 26 16:33:53 2005 Info: MID 44 ICID 28 RID 0 To: <test2@example.com>
Tue Apr 26 16:34:18 2005 Info: MID 44 Message-ID '<41faeo$1c@example.com>'
Tue Apr 26 16:34:18 2005 Info: MID 44 Subject 'testing spam filter'
Tue Apr 26 16:34:18 2005 Info: MID 44 ready 84 bytes from <test@example.com>
Tue Apr 26 16:34:18 2005 Info: MID 44 matched all recipients for per-recipient
policy DEFAULT in the inbound table
Tue Apr 26 16:34:18 2005 Info: MID 44 Brightmail positive
Tue Apr 26 16:34:18 2005 Info: Message aborted MID 44 Dropped by case
Tue Apr 26 16:34:18 2005 Info: Message finished MID 44 done
Tue Apr 26 16:34:21 2005 Info: ICID 28 close
邮件日志的结果显示,邮件被识别为垃圾邮件,并按照反垃圾邮件传入邮件策略中的定义被丢弃。请验证ESA是否正在采取您的反垃圾邮件设置中定义的相应措施。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
20-Aug-2014 |
初始版本 |