本文使用Postfix。
反垃圾邮件类型:
目前比较常见的反垃圾邮件系统有检测域名和IP的反垃圾邮件系统(Spamhaus)与检测邮件信息的反垃圾邮件系统(Spam Assassin),本文只讲检测域名与IP的反垃圾邮件系统,后者我会另开一篇博客文章详细讲述。
Postfix配置:
修改main.cf,添加/修改以下配置
smtpd_recipient_restrictions =
#让mynetworks里面给出的地址直接通过而不是进入验证
permit_mynetworks,
#强制sasl
permit_sasl_authenticated,
#禁止发送到不存在的邮箱地址
reject_unauth_destination,
#进入反垃圾邮件验证,必须要是reject_rbl_client [反垃圾邮件系统地址],
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client pbl.spamhaus.org,
reject_rbl_client xbl.spamhaus.org,
reject_rbl_client zen.spamhaus.org,
#检测自定义名单
check_sender_access hash:/etc/postfix/sender_checks,
permit
添加sender_checks,该示例中a.com是无条件通过,b.com是无条件拒绝
a.com OK
b.com REJECT
如果是Postfix+Dovecot,请输入该指令
postmap /etc/postfix/sender_check
设置好了?重开Postfix吧!
systemctl restart postfix
systemctl restart dovecot #如果使用Postfix+Dovecot
反垃圾邮件系统列表及官网
- 注意:添加反垃圾邮件系统之前请确保你知道你正在干什么
- 注意:请先点击括号内的详情页面查看使用方法,仔细阅读使用方法再决定是否调用
- 注意:本文只截取了部分反垃圾邮件系统,数据获取时间为【2021年7月23日】,我们不会保证下面的数据都是正确的,一切数据请以官网为准。
- 注意:如果因为配置出错而产生无法挽回的结果,我们不会承担任何责任(第一条注意事项)(加个反垃圾检测似乎并不会怎样,但以防万一还是写一下)
- 反垃圾邮件服务器列表
- Spamhaus
- IMP-SPAM
- LashBack
- REDHAWK
- SORBS
- SEM-BLACK
- SPAMCOP
- URIBL
- DSBL
- Barracuda
- BACKSCATTERER
- RATS
- GBUdb Truncate
- NiX Spam
- Weighted Private Block List
Spamhaus (推荐)
- 官网:spamhaus.org
- 用户查询:check.spamhaus.org
- 系统调用 (Spamhaus SBL Advisory):sbl.spamhaus.org
- 系统调用 (Spamhaus PBL Advisory):pbl.spamhaus.org
- 系统调用 (Spamhaus XBL Advisory):xbl.spamhaus.org
- 系统调用 (Spamhaus ZEN Advisory):zen.spamhaus.org
IMP-SPAM
- 官网:imp.ch
- 用户查询:antispam.imp.ch
- 系统调用 (Realtime blacklist assembled by spamtraps):dnsrbl.imp.ch
- 系统调用 (IP-adresses from catched spammails):spamrbl.imp.ch
- 系统调用 (IP-adresses from catched worm/viruses):wormrbl.imp.ch
- 系统调用 (Realtime blacklist built from spamtrap sources):uribl.swinog.ch
- 系统调用 (Realtime blacklist assembled by spamtraps):blacklist.woody.ch
LashBack
- 官网:lashback.com
- 用户查询(仅发送删除请求):blacklist.lashback.com
- 系统调用:ubl.unsubscore.com
REDHAWK
- 官网:redhawk.org
- 用户查询:redhawk.org/SpamHawk/query.php
- 系统调用(可能是):access.redhawk.org
SORBS
- 官网:sorbs.net
- 用户查询:sorbs.net/lookup.shtml
- 系统调用 (Aggregate zone (contains all the following DNS zones except spam.dnsbl.sorbs.net)):dnsbl.sorbs.net
- 系统调用 (List of Open HTTP Proxy Servers):http.dnsbl.sorbs.net
- 系统调用 (List of Open SOCKS Proxy Servers):socks.dnsbl.sorbs.net
- 系统调用 (List of open Proxy Servers not listed in the SOCKS or HTTP lists.):misc.dnsbl.sorbs.net
- 系统调用 (List of Open SMTP relay servers.):smtp.dnsbl.sorbs.net
- 系统调用 (List of web (WWW) servers which have spammer abusable vulnerabilities (e.g. FormMail scripts) Note: This zone now includes non-webserver IP addresses that have abusable vulnerabilities.):web.dnsbl.sorbs.net
- 系统调用 (List of hosts that have been noted as sending spam/UCE/UBE to the admins of SORBS within the last 48 hours.):new.spam.dnsbl.sorbs.net
- 系统调用 (List of hosts that have been noted as sending spam/UCE/UBE to the admins of SORBS within the last 28 days (includes new.spam.dnsbl.sorbs.net).):recent.spam.dnsbl.sorbs.net
- 系统调用 (List of hosts that have been noted as sending spam/UCE/UBE to the admins of SORBS within the last year. (includes recent.spam.dnsbl.sorbs.net).):old.spam.dnsbl.sorbs.net
- 系统调用 (List of hosts that have been noted as sending spam/UCE/UBE to the admins of SORBS at any time, and not subsequently resolving the matter and/or requesting a delisting. (Includes both old.spam.dnsbl.sorbs.net and escalations.dnsbl.sorbs.net).):spam.dnsbl.sorbs.net
- 系统调用 (This zone contains netblocks of spam supporting service providers, including those who provide websites, DNS or drop boxes for a spammer. Spam supporters are added on a ‘third strike and you are out’ basis, where the third spam will cause the supporter to be added to the list.):escalations.dnsbl.sorbs.net
- 系统调用 (List of hosts demanding that they never be tested by SORBS.):block.dnsbl.sorbs.net
- 系统调用 (List of networks hijacked from their original owners, some of which have already used for spamming.):zombie.dnsbl.sorbs.net
- 系统调用 (Dynamic IP Address ranges (NOT a Dial Up list!)):dul.dnsbl.sorbs.net
- 系统调用 (IP addresses and Netblocks of where system administrators and ISPs owning the network have indicated that servers should not be present.):noserver.dnsbl.sorbs.net
- 系统调用 (Aggregate zone (contains all RHS zones)):rhsbl.sorbs.net
- 系统调用 (List of domain names where the A or MX records point to bad address space.):badconf.rhsbl.sorbs.net
- 系统调用 (List of domain names where the owners have indicated no email should ever originate from these domains.):nomail.rhsbl.sorbs.net
SEM-BLACK
- 官网:spameatingmonkey.com
- 用户查询:spameatingmonkey.com/lookup
- 注意:请先点击括号内的详情页面查看使用方法,仔细阅读使用方法再决定是否调用
- 系统调用 (SEM-BACKSCATTER):backscatter.spameatingmonkey.net
- 系统调用 (SEM-BLACK):bl.spameatingmonkey.net
- 系统调用 (SEM-IPV6BL):bl.ipv6.spameatingmonkey.net
- 系统调用 (SEM-FRESHZERO):freshzero.spameatingmonkey.net
- 系统调用 (SEM-FRESH):fresh.spameatingmonkey.net
- 系统调用 (SEM-FRESH10):fresh10.spameatingmonkey.net
- 系统调用 (SEM-FRESH15):fresh15.spameatingmonkey.net
- 系统调用 (SEM-FRESH30):fresh30.spameatingmonkey.net
- 系统调用 (SEM-NETBLACK):netbl.spameatingmonkey.net
- 系统调用 (SEM-URI):uribl.spameatingmonkey.net
- 系统调用 (SEM-URIRED):urired.spameatingmonkey.net
- 系统调用 (SEM-BADNETS):badnets.spameatingmonkey.net
- 系统调用 (SEM-IXHASH):ixhash.spameatingmonkey.net
- 系统调用 (ANONWHOIS):list.anonwhois.net
- 系统调用 (SEM-ASN-ORIGIN):origin.asn.spameatingmonkey.net
- 系统调用 (SEM-COUNTRY):country.spameatingmonkey.net
SPAMCOP
- 官网:spamcop.net
- 用户查询:spamcop.net/bl.shtml
- 注意:该调用地址可能会使用SORBS的库
- 系统调用:bl.spamcop.net
URIBL
- 官网:uribl.com
- 用户查询:uribl.com
- 注意:请先点击括号内的详情页面查看使用方法,仔细阅读使用方法再决定是否调用
- 注意:不建议使用该反垃圾邮件系统,检测似乎过于严格,会导致一些个人邮件服务器的邮件无法成功送达,如果您确定您的收信人都来自与知名邮箱(Gmail等),那可以尝试使用
- 系统调用 (使用方法):multi.uribl.com
DSBL
Barracuda
- 官网:barracudacentral.org
- 用户查询:barracudacentral.org/lookups
- 系统调用 (使用方法):b.barracudacentral.org
BACKSCATTERER
- 官网:backscatterer.org
- 用户查询:backscatterer.org/index.php?target=test
- 注意(摘自官网):ips.backscatterer.org 不是垃圾邮件发送者列表。这是一个 Backscatterer 列表!!!如果您需要,我们建议使用spammerlist UCEPROTECT.NET而不是 使用ips.backscatterer.org,请记住这一点
- 系统调用 (使用方法):ips.backscatterer.org
RATS
- 官网:spamrats.com
- 用户查询:spamrats.com
- 系统调用 (RATS-Dyna):dyna.spamrats.com
- 系统调用 (RATS-NoPtr):noptr.spamrats.com
- 系统调用 (RATS-Spam):spam.spamrats.com
- 系统调用 (RATS-Auth):auth.spamrats.com
GBUdb Truncate
NiX Spam
- 官网:heise.de
- 用户查询:dnsbl.manitu.net
- 系统调用 (使用方法):ix.dnsbl.manitu.net
Weighted Private Block List
- 官网:wpbl.pc9.org
- 用户查询:www.wpbl.info/cgi-bin/detail.cgi
- 系统调用 (使用方法):db.wpbl.info