Postfix拒绝发件人地址

在我的LAN上有两个服务器:mail.example.com和alpha.example.com。 alpha.example.com上的脚本将电子邮件发送到[email protected]。 alpha.example.com上的Sendmail MTA将此电子邮件发送到mail.example.com。 来自[email protected]的“发件人”地址

mail.example.com上的Postfix拒绝这个,邮件日志说“ 发件人地址被拒绝:域未find

Sep 29 13:58:20 mail postfix/smtpd[22938]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<alpha.example.com> 

我不明白为什么mail.example.com找不到域alpha.example.com。 mail.example.com上的/ etc / hosts有一个条目

 1.2.3.4 alpha alpha.example.com 

我可以ping mail.example.com这些名称中的任何一个

这是Postfix main.cf

 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no command_directory = /usr/sbin daemon_directory = /usr/lib/postfix mydestination = mail.localdomain, mail.localdomain, localhost.localdomain, localhost, /etc/postfix/mydomains unknown_local_recipient_reject_code = 550 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases recipient_delimiter = + home_mailbox = Mail/ mailbox_size_limit = 0 disable_vrfy_command = yes smtpd_helo_required = yes smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination reject_unauth_pipelining reject_invalid_hostname reject_non_fqdn_sender reject_unknown_sender_domain reject_non_fqdn_recipient reject_unknown_recipient_domain reject_rbl_client dnsbl.njabl.org reject_rbl_client dnsbl.sorbs.net reject_rbl_client bl.spamcop.net permit smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache myhostname = bubba.localdomain myorigin = /etc/mailname relayhost = mail.<my ISP>.com inet_interfaces = all smtp_sasl_security_options = noplaintext, noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_auth_enable = no 

我简要回顾了在serverfault.com上的类似问题,但在我的main.cf中,我没有看到smtp_sender_restrictions部分,所以我不清楚如何让postfix停止从[email protected]中拒绝邮件。

添加alpha.example.com到/ etc / postfix / mydomains修复了这个问题。

在一个有数十或数百台服务器的局域网上,这会让人烦恼,可能还有一个更通用的解决scheme?