灰名单(Greylisting)是一种保护电子邮件用户免受垃圾邮件侵害的方法。一个邮件传输代理使用灰名单“暂时拒绝”接收到的邮件,如果邮件是合法的,则原始服务器将在延迟后再次尝试,如果已经过了指定的时间后重新接收到该邮件,则接受该电子邮件。

Zimbra 中启用 cbpolicyd 中的 Greylisting 灰名单

# 初始化 Zimbra 中的 cbpolicyd
/opt/zimbra/libexec/zmcbpolicydinit -force

# 配置 Zimbra 中启用 Greylisting
zmprov ms `zmhostname` zimbraCBPolicydGreylistingEnabled TRUE

# 配置 cbpolicyD 中的 Greylisting,SQL代码见下面
sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb

# 重启生效
zmcbpolicydctl restart
-- PolicyID 值 3 为系统自带的 "Default Inbound"策略
INSERT INTO greylisting (PolicyID,Name, UseGreylisting, GreylistPeriod,Track,GreylistAuthValidity,GreylistUnAuthValidity,UseAutoWhitelist,AutoWhitelistPeriod,AutoWhitelistCount,UseAutoBlacklist,AutoBlacklistPeriod,AutoBlacklistCount,Disabled) VALUES (3,'greylisting',1,60,'SenderIP:/24',604800,86400,1,604800,3,1,604800,50,0);

-- 添加白名单IP
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:220.181.12.0/22','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:220.181.31.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.125.50.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:220.181.72.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.58.178.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.58.177.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:113.108.225.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:218.107.63.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.58.189.128/25','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.126.96.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.126.97.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.31.100.154','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.19.67.100','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:176.34.21.58','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:121.195.178.48/28','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:223.252.213.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:113.108.226.64/26','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:58.248.244.64/26','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:223.252.206.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:43.230.90.0/27','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:14.29.82.0/25','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:122.13.158.0/25','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:35.154.184.19','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:35.158.20.192','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.198.69.159','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.221.130.187','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.56.66.10','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:54.219.167.112','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:103.129.252.0/26','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:123.126.65.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:106.2.88.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:220.181.97.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:180.150.142.123','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:180.150.142.124','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:180.150.154.88','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:180.150.154.92','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:180.150.154.93','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:103.211.228.151','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:59.111.176.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:220.194.24.0/24','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:52.52.2.81','163',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:40.92.0.0/14','Outlook',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:35.190.247.0/24','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:66.249.80.0/20','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:72.14.192.0/18','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:74.125.0.0/16','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:108.177.8.0/21','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:173.194.0.0/16','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:209.85.128.0/17','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:216.58.192.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:216.239.32.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:172.217.0.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:172.217.32.0/20','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:172.217.128.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:172.217.160.0/20','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:172.217.192.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:108.177.96.0/19','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:35.191.0.0/16','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:130.211.0.0/22','Gmail',0);
INSERT INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ('SenderIP:66.102.0.0/20','Gmail',0);


原文链接地址:http://blog.exsvc.cn/article/zimbra-cbpolicyd-greylisting.html
转载请注明:转载自 易科博客 ,谢谢!

发表评论

电子邮件地址不会被公开。 必填项已用*标注