后缀:如何接受来自特定的非现有域的电子邮件?

我们需要接受来自使用不存在的域发出的服务器的电子邮件。 那台服务器不在我的控制之下。

在我的main.cf我有

smtpd_client_restrictions = permit_mynetworks, hash:/etc/postfix/access, permit_sasl_authenticated 

在/ etc / postfix / access中我有

 <server's ip> OK vps1.nonexistingdomain.com OK 

但是,当我从日志中收到来自服务器的消息时,我看到:

 Jul 26 10:30:07 mail3 postfix/smtpd[24044]: NOQUEUE: reject: RCPT from vps1.nonexistingdomain.com[ip address]: 554 5.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<vps1.nonexistingdomain.com> 

作为另一种解决方法,我尝试手动硬编码这个主机名:IP到我的/ etc / hosts,但没有区别。

/etc/postfix/main.cf ,将服务器的IP地址放在mynetworks中 。

示例(IP地址为198.51.100.43):

 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 198.51.100.43 

现在,可能是:

〜$ sudo postconf smtpd_sender_restrictions
smtpd_sender_restrictions = reject_unknown_sender_domain

应该?

〜$ sudo postconf smtpd_sender_restrictions
smtpd_sender_restrictions = check_sender_access reject_unknown_sender_domain

main.cf设置的选项
如果你还没有,你需要postalias /etc/postfix/access

此外,惩罚发件人不拥有他们发送的域名(或没有创build适当的子域名)。