我想为某些(并非所有)域的外发邮件启用强制 TLS 加密。
如果我设置,我解决了传入邮件的问题:
smtp_tls_security_level = may
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
Run Code Online (Sandbox Code Playgroud)
并在 tls_policy
example.com encrypt
Run Code Online (Sandbox Code Playgroud)
来自接收域 example.com 的所有连接都通过 TLS。
如何为某些域的外发邮件强制执行此操作?
您需要查看 TLS 策略映射功能。它是针对特定场景而设计的。它允许您指定“可以”或“必须”来分隔域;像这样:
example.net secure match=example.net:.example.net
anotherexample.net may match=anotherexample.com:.anotherexample.com
Run Code Online (Sandbox Code Playgroud)
在这里阅读更多相关信息:
http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps