如何强制postfix使用为域configuration的ip?

我想确认SPF和DKIM,这就要求我使用写在域名DNSlogging中的IP发送电子邮件

我有两个域example1.com和example2.com分别有两个IP 100.0.0.1和100.0.0.2。

如何configurationpostfix始终使用IP 100.0.0.1时,发送地址是[email protected]和相同的为其他域名为真。

当连接到SMTP传输我使用的是本地主机,我知道我可以为每个IPconfiguration两个postfix实例,然后根据域名发送时只需连接到正确的IP,我想看看这是否可以避免。

如何才能做到这一点?

可能需要一些摆弄,但我认为你可以通过以下方式实现这一点:

  • 在master.cf中configuration原始的smtpd监听器,将发送者从每个相应的域发送到两个新的本地smtpd监听器
  • 在master.cf中设置2个附加的smtpd监听器,这些监听器有自己的main.cf文件(例如example1.main.cf和example2.main.cf): http : //www.postfix.org/master.5.html (in说master.cf文件,你可以通过-o name = value机制覆盖main.cf的各种设置)
  • 使用适当的出站接口configuration和其他相关的main.cfconfiguration来configuration新的main.cf文件

您可以指定发件人为[email protected][email protected]通过使用发件人相关的sasl身份validation从Ip / Host发送邮件。 按照这些链接。 http://www.postfix.org/SASL_README.html#client_sasl_sender而在其他方面。 http://www.cyberciti.biz/faq/postfix-multiple-isp-accounts-smarthost-smtp-client/