Postfix:连接被拒收邮件

我运行一个后缀服务器 – 几个星期没有问题,但现在邮件反弹。 有一天,当我试图发送邮件到我的服务器时,我从Gmail收到以下邮件:

[...] Delivery to the following recipient has been delayed: <the mailadress>@<myserver> Message will be retried for 2 more day(s) [...] [mx.<myserver>. (0): Connection refused] 

日志mail.logmail.errmail.warn是空的,除了一些奇怪的错误forms:

 postfix/trivial-rewrite[22141]: warning: regexp map /etc/postfix/virtual, line 12: ignoring unrecognized request 

虚拟别名也是我在上一次改变的唯一的东西(但之后它仍然在工作)。

任何提示如何解决这个问题?

请注意,从本地用户发送邮件到本地用户的工作。

也有一个开放的端口虽然“127.0.0.2”看起来很奇怪,我…

 $ netstat -a|grep smtp tcp 0 0 127.0.0.2:smtp *:* LISTEN tcp 0 0 localhost.localdom:smtp *:* LISTEN 

我的main.cf:

 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # TLS parameters 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:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = <my servername> alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases #virtual_alias_maps = regexp:/etc/postfix/virtual virtual_alias_maps = hash:/etc/postfix/virtual myorigin = /etc/mailname mydestination = <myserver>, localhost relayhost = <my external smtp> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = loopback-only default_transport = smtp relay_transport = smtp inet_protocols = ipv4 

您的inet_interfaces参数设置为loopback-only 。 这就是本地邮件发送正常的原因。

将其更改为all ,并将在所有接口上进行侦听。

显然,您的电子邮件服务器正在监听环回地址,因为它是由netstat输出显示的。 您可以尝试在您的configuration中注释以下行。

 #inet_interfaces = loopback-only 

不要忘记重新加载/重新启动您的后缀进程。 使用netstat确认这个更改是成功的。