Home > Linux > document > 正文

postfix 添加国内反垃圾邮件联盟过滤垃圾邮件

1.编辑 /etc/postfix/main.cf,添加如下内容
smtpd_client_restrictions =...
 reject_rbl_client cblless.anti-spam.org.cn,....
如果不希望被拒绝,可以添加警告
warning_if_reject  reject_rbl_client cblless.anti-spam.org.cn,....
2.反垃圾生效,从qq邮箱发来的邮件,连续阻止了ip183.60.61.235,103.7.31.14的发送邮件请求
May 29 16:03:54 mail postfix/smtpd[19106]: connect from SMTPBG14.QQ.COM[183.60.61.235]
May 29 16:04:11 mail dovecot[22600]: pop3(user@xishui139.com): Connection closed top=0/0, retr=0/0, del=0/18569, size=17979482
May 29 16:04:12 mail postfix/smtpd[19106]: NOQUEUE: reject: RCPT from SMTPBG14.QQ.COM[183.60.61.235]: 554 5.7.1 Service unavailable; Client host [183.60.61.235] blocked using cblless.anti-spam.org.cn; from=<583938053@qq.com&gt; to=<aliyun_blog@xishui139.com&gt; proto=ESMTP helo=<smtpbg14.qq.com>
May 29 16:04:12 mail postfix/smtpd[19106]: disconnect from SMTPBG14.QQ.COM[183.60.61.235] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
May 29 16:04:24 mail postfix/smtpd[19106]: connect from smtpproxy32.qq.com[103.7.31.14]
May 29 16:04:39 mail postfix/smtpd[19106]: NOQUEUE: reject: RCPT from smtpproxy32.qq.com[103.7.31.14]: 554 5.7.1 Service unavailable; Client host [103.7.31.14] blocked using cblless.anti-spam.org.cn; from=<583938053@qq.com&gt; to=<aliyun_blog@xishui139.com&gt; proto=ESMTP helo=<smtpproxy32.qq.com>
May 29 16:04:39 mail postfix/smtpd[19106]: disconnect from smtpproxy32.qq.com[103.7.31.14] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
May 29 16:04:40 mail postfix/smtpd[19106]: warning: hostname smtpproxyl.qq.com does not resolve to address 119.147.14.109
May 29 16:04:40 mail postfix/smtpd[19106]: connect from unknown[119.147.14.109]
May 29 16:05:01 mail postfix/smtpd[19106]: warning: 109.14.147.119.cblless.anti-spam.org.cn: RBL lookup error: Host or domain name not found. Name service error for name=109.14.147.119.cblless.anti-spam.org.cn type=A: Host not found, try again
May 29 16:05:20 mail postfix/policy-spf[19120]: Policy action=PREPEND Received-SPF: pass (qq.com: Sender is authorized to use '583938053@qq.com' in 'mfrom' identity (mechanism 'include:spf.mail.qq.com' matched)) receiver=mail.xishui139.com; identity=mailfrom; envelope-from="583938053@qq.com"; helo=smtpproxy1.qq.com; client-ip=119.147.14.109
May 29 16:05:21 mail postfix/smtpd[19106]: 129A9C0786: client=unknown[119.147.14.109]
May 29 16:05:21 mail postfix/cleanup[19123]: 129A9C0786: message-id=<tencent_4EFF671E45CD27E014751C52@qq.com&gt;
May 29 16:05:21 mail opendkim[1221]: 129A9C0786: [119.147.14.109] [119.147.14.109] not internal
May 29 16:05:21 mail opendkim[1221]: 129A9C0786: not authenticated
May 29 16:05:27 mail opendkim[1221]: 129A9C0786: DKIM verification successful
May 29 16:05:27 mail postfix/smtpd[19106]: disconnect from unknown[119.147.14.109] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
May 29 16:05:27 mail postfix/qmgr[18956]: 129A9C0786: from=<583938053@qq.com&gt;, size=579734, nrcpt=1 (queue active)
May 29 16:07:22 mail amavis[1591]: (01591-05) Blocked SPAM {DiscardedOpenRelay,Quarantined}, [119.147.14.109]:38475 [119.147.14.109] <583938053@qq.com&gt; -> <aliyun_blog@xishui139.com&gt;, Queue-ID: 129A9C0786, Message-ID: <tencent_4EFF671E45CD27E014751C52@qq.com&gt;, mail_id: LngnarJ6g5MA, Hits: 3.643, size: 579884, dkim_sd=s201512:qq.com, 112541 ms
May 29 16:07:22 mail postfix/smtp[19125]: 129A9C0786: to=<aliyun_blog@xishui139.com&gt;, relay=127.0.0.1[127.0.0.1]:10024, delay=161, delays=46/0.06/5.9/109, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=01591-05 - spam)
May 29 16:07:22 mail postfix/qmgr[18956]: 129A9C0786: removed
3.关闭反垃圾参数,因为我设置了spamassassin垃圾分数过滤,高于3.0的邮件汇报直接discard(上面2中邮件评分Hits: 3.643)。
May 29 16:18:59 mail postfix/smtpd[19283]: connect from SMTPBG6.QQ.COM[183.60.61.231]
May 29 16:19:25 mail postfix/policy-spf[19294]: Policy action=PREPEND Received-SPF: pass (qq.com: Sender is authorized to use '583938053@qq.com' in 'mfrom' identity (mechanism 'include:spf.mail.qq.com' matched)) receiver=mail.xishui139.com; identity=mailfrom; envelope-from="583938053@qq.com"; helo=smtpbg6.qq.com; client-ip=183.60.61.231
May 29 16:19:26 mail postfix/smtpd[19283]: 669A0C0786: client=SMTPBG6.QQ.COM[183.60.61.231]
May 29 16:19:26 mail postfix/cleanup[19297]: 669A0C0786: message-id=<tencent_5EE4BB3B3974F3904DED086F@qq.com&gt;
May 29 16:19:27 mail opendkim[1221]: 669A0C0786: SMTPBG6.QQ.COM [183.60.61.231] not internal
May 29 16:19:27 mail opendkim[1221]: 669A0C0786: not authenticated
May 29 16:19:36 mail opendkim[1221]: 669A0C0786: DKIM verification successful
May 29 16:19:36 mail postfix/smtpd[19283]: disconnect from SMTPBG6.QQ.COM[183.60.61.231] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
May 29 16:19:36 mail postfix/qmgr[19231]: 669A0C0786: from=<583938053@qq.com&gt;, size=575977, nrcpt=1 (queue active)
May 29 16:19:58 mail postfix/smtpd[19301]: connect from localhost.localdomain[127.0.0.1]
May 29 16:19:58 mail postfix/smtpd[19301]: CF7CFC2DB5: client=localhost.localdomain[127.0.0.1]
May 29 16:19:58 mail postfix/cleanup[19297]: CF7CFC2DB5: message-id=<tencent_5EE4BB3B3974F3904DED086F@qq.com&gt;
May 29 16:19:59 mail opendkim[1221]: CF7CFC2DB5: no signing table match for '583938053@qq.com'
May 29 16:20:05 mail opendkim[1221]: CF7CFC2DB5: DKIM verification successful
May 29 16:20:05 mail postfix/qmgr[19231]: CF7CFC2DB5: from=<583938053@qq.com&gt;, size=576516, nrcpt=1 (queue active)
May 29 16:20:05 mail postfix/smtpd[19301]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
May 29 16:20:05 mail postfix/virtual[19303]: CF7CFC2DB5: to=<aliyun_blog@xishui139.com&gt;, relay=virtual, delay=7.1, delays=6.9/0.1/0/0.17, dsn=2.0.0, status=sent (delivered to maildir)
May 29 16:20:05 mail postfix/qmgr[19231]: CF7CFC2DB5: removed
May 29 16:20:05 mail amavis[1592]: (01592-06) Passed CLEAN {RelayedOpenRelay}, [183.60.61.231]:39465 [183.60.61.231] <583938053@qq.com&gt; -> <aliyun_blog@xishui139.com&gt;, Queue-ID: 669A0C0786, Message-ID: <tencent_5EE4BB3B3974F3904DED086F@qq.com&gt;, mail_id: GQF-_lUknN8F, Hits: 0.943, size: 576127, queued_as: CF7CFC2DB5, dkim_sd=s201512:qq.com, 28733 ms
May 29 16:20:05 mail postfix/smtp[19299]: 669A0C0786: to=<aliyun_blog@xishui139.com&gt;, relay=127.0.0.1[127.0.0.1]:10024, delay=66, delays=37/0.23/0.12/29, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as CF7CFC2DB5)
May 29 16:20:05 mail postfix/qmgr[19231]: 669A0C0786: removed

default iconRBL-reject.txt

上一篇:linux postfix install spf check
下一篇:linux postfix 安装Spamassassin和clamav
linux postfix check amavisd service

linux postfix check amavisd service

linux postfix 安装Spamassassin和clamav

linux postfix 安装Spamassassin和clamav

国内影响已扩散,利用“NSA武器库”中漏洞的Wannacry蠕虫勒索软件袭击全球(含修复方案)

国内影响已扩散,利用“NSA武器库”中漏洞的Wannacry蠕虫勒索软件袭击全球(含修复方案)

思科Talos团队深度解析“WannaCry”勒索软件

思科Talos团队深度解析“WannaCry”勒索软件

首发 | Wannacry勒索软件母体主程序逆向分析(含临时解决方案自动化工具)

首发 | Wannacry勒索软件母体主程序逆向分析(含临时解决方案自动化工具)

WannaCry蠕虫详细分析

WannaCry蠕虫详细分析

linux postfix check amavisd service

linux postfix check amavisd service

发表评论

您必须 [ 登录 ] 才能发表留言!

沙发空闲中,快来抢!