发布于 2016-12-08 10:08:37
SPF策略服务器(如策略SPF )没有拒绝没有SPF记录的域的选项。解决方案是使用自定义策略服务器。
发布于 2017-03-09 12:01:47
如果您使用python策略-spf,您可以编辑可执行文件(/usr/bin/policyd spf在debian中):
在此代码块下的第159行中:
if mfrom_policy == 'SPF_Not_Pass':
try:
unused_results.remove('Fail')
actions['reject'].append('Fail')
unused_results.remove('Softfail')
actions['reject'].append('Softfail')
unused_results.remove('Neutral')
actions['reject'].append('Neutral')
except:
if debugLevel >= 2: syslog.syslog('Configuration File parsing error: Mail_From_reject')加:
elif mfrom_policy == 'Cerberus':
try:
unused_results.remove('Fail')
actions['reject'].append('Fail')
unused_results.remove('Softfail')
actions['reject'].append('Softfail')
unused_results.remove('None')
actions['reject'].append('None')
except:
if debugLevel >= 2: syslog.syslog('Configuration File parsing error: Mail_From_reject')要激活这个新的"Cerberus“选项,请编辑配置文件/etc/postfix-policyd-spf-python/policyd-spf.conf并将Mail_From_reject的值更改为"Cerberus”,如下所示:
# Mail_From_reject = Fail
Mail_From_reject = Cerberus通过这种修改,您可以轻松地从标准配置更改为更激进的配置,该配置拒绝没有spf记录的域。
这适用于Debian 10和ubuntu 20.04。
https://serverfault.com/questions/818367
复制相似问题