Postfix不接受本地主机的中继

尽pipemynetworks_style=host ,Postfix似乎不想接受来自本地机器的中继。 当debug_peer_list启用时,这里(修剪)mail.log输出:

 postfix/smtpd[23247]: resolve_clnt: `' -> `[email protected]' -> transp=`error' host=`externaldomain.com' rcpt=`[email protected]' flags= class=default postfix/smtpd[23247]: ctable_locate: install entry key [email protected] postfix/smtpd[23247]: extract_addr: in: [email protected], result: [email protected] postfix/smtpd[23247]: >>> START Client host RESTRICTIONS <<< postfix/smtpd[23247]: generic_checks: name=permit_mynetworks postfix/smtpd[23247]: permit_mynetworks: localhost 127.0.0.1 postfix/smtpd[23247]: match_hostname: localhost ~? 127.0.0.1/32 postfix/smtpd[23247]: match_hostaddr: 127.0.0.1 ~? 127.0.0.1/32 postfix/smtpd[23247]: match_list_match: permit_mynetworks: no match postfix/smtpd[23247]: generic_checks: name=permit_mynetworks status=1 postfix/smtpd[23247]: >>> END Client host RESTRICTIONS <<< postfix/smtpd[23247]: >>> START Recipient address RESTRICTIONS <<< postfix/smtpd[23247]: generic_checks: name=permit_mynetworks postfix/smtpd[23247]: permit_mynetworks: localhost 127.0.0.1 postfix/smtpd[23247]: match_hostname: localhost ~? 127.0.0.1/32 postfix/smtpd[23247]: match_hostaddr: 127.0.0.1 ~? 127.0.0.1/32 postfix/smtpd[23247]: match_list_match: permit_mynetworks: no match postfix/smtpd[23247]: generic_checks: name=permit_mynetworks status=1 postfix/smtpd[23247]: >>> END Recipient address RESTRICTIONS <<< postfix/smtpd[23247]: >>> CHECKING RECIPIENT MAPS <<< ... postfix/smtpd[23247]: mail_addr_find: [email protected] -> (not found) postfix/smtpd[23247]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: externaldomain.com; from=<[email protected]> to=<[email protected]> proto=SMTP postfix/smtpd[23247]: > localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: externaldomain.com 

据我所知,127.0.0.1不被接受为“mynetwork”? 这里是postconf -n的输出:

 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix debug_peer_list = 127.0.0.1 default_transport = error inet_interfaces = loopback-only inet_protocols = ipv4 mailbox_size_limit = 0 mydestination = gretl.mindjumpers.com, gretl, localhost.localdomain, localhost myhostname = gretl mynetworks_style = host myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relay_transport = error relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_client_restrictions = permit_mynetworks, reject smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes 

以下两行不允许从外部发送和接收消息:

 default_transport = error relay_transport = error 

relay_transportdefault_transport用于远程传递到中继域和其他目的地。 error邮件反弹所有收件人。

更多信息: http : //www.postfix.org/transport.5.html和http://www.postfix.org/error.8.html