首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SPF应该添加到smtpd_sender_restrictions或smtpd_recipient_restrictions中吗?

SPF应该添加到smtpd_sender_restrictions或smtpd_recipient_restrictions中吗?
EN

Server Fault用户
提问于 2018-10-23 13:01:38
回答 1查看 850关注 0票数 3

我在centos 7中使用postfix+dovecot。

我使用

代码语言:javascript
复制
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,reject_invalid_hostname,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient'
postconf -e 'smtpd_sender_restrictions =reject_non_fqdn_sender,reject_unknown_sender_domain,reject_rbl_client sbl-xbl.spamhaus.org,check_policy_service unix:private/policy'
postconf -e 'policy_time_limit = 3600s'
postconf -e 'policy-spf_time_limit = 3600'  

若要设置后缀main.cf,请执行以下操作。

注意check_policy_service unix:private/policyin smtpd_sender_restrictions,这意味着我证明我使用正确的邮件域发送邮件。

我认为我的postconf是完美的,但有人说smtpd_sender_restrictions应该在smtpd_recipient_restrictions

SPF应该添加到smtpd_sender_restrictions或smtpd_recipient_restrictions中吗?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2018-10-23 14:02:21

这些选项将在smtpd_sender_restrictionssmtpd_recipient_restrictions中正常工作。

应该将它们添加到smtpd_recipient_restrictions中的原因与SMTP协议本身有关。在协议的每个阶段,发件人首先使用EHLO或HELO标识自己,然后使用MAIL FROM发送发件人的电子邮件地址,然后使用RCPT发送收件人的地址。在每个阶段,后缀都可以采取行动,例如smtpd_helo_restrictionssmtpd_sender_restrictionssmtpd_recipient_restrictions。但是,如果在收到邮件后拒绝接收邮件,则不知道目标收件人是谁。如果邮件是合法的,并且收件人抱怨,则无法在日志中找到它们。通过在发送收件人地址之后等待,您可以记录有关邮件的所有可用元数据,以防稍后需要查找。

票数 6
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/936780

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档