我有一个Postfix服务器运行很短的时间,它工作,但我今天不得不重新启动服务器,我不再收到外部来源的电子邮件:
Jan 23 01:34:44 myservername postfix/smtpd[1055]: connect from db3ehsobe006.messaging.microsoft.com[213.199.154.144] Jan 23 01:34:45 myservername postfix/smtpd[1055]: warning: connect to 127.0.0.1:10023: Connection refused Jan 23 01:34:45 myservername postfix/smtpd[1055]: warning: problem talking to server 127.0.0.1:10023: Connection refused Jan 23 01:34:46 myservername postfix/smtpd[1055]: warning: connect to 127.0.0.1:10023: Connection refused Jan 23 01:34:46 myservername postfix/smtpd[1055]: warning: problem talking to server 127.0.0.1:10023: Connection refused Jan 23 01:34:46 myservername postfix/smtpd[1055]: NOQUEUE: reject: RCPT from db3ehsobe006.messaging.microsoft.com[213.199.154.144]: 451 4.3.5 Server configuration problem; from=<MyKnownWorking@EmailAccountOutside> to=<MyAccount@MyDomain.com> proto=ESMTP helo=<db3outboundpool.messaging.microsoft.com>
服务器正在侦听端口10023,但我注意到它只是通过IPv6监听:
> sudo netstat -a | grep 10023 tcp6 0 0 ip6-localhost:10023 [::]:* LISTEN
我没有防火墙规则可以否认特定的端口,地狱,我继续并刷新规则集只是为了确认它.这是我的postconf -n的输出(我编辑了我的域名代替“mydomain.com”:
> sudo postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix content_filter = amavis:[127.0.0.1]:10024 disable_vrfy_command = yes inet_interfaces = all inet_protocols = ipv4 mailBox_size_limit = 0 message_size_limit = 0 mydestination = localhost.$mydomain,localhost,mail.mydomain.com,servername.mydomain.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mynetworks_style = host myorigin = /etc/mailname readme_directory = no receive_override_options = no_address_mappings recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = mail.mydomain.com ESMTP $mail_name smtpd_delay_reject = yes smtpd_helo_required = yes smtpd_recipient_restrictions = reject_unauth_pipelining,permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_destination,check_policy_service inet:127.0.0.1:10023,permit smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous smtpd_sender_restrictions = permit_sasl_authenticated,warn_if_reject reject_non_fqdn_sender,reject_unknown_sender_domain,reject_unauth_pipelining,permit smtpd_tls_cert_file = /etc/ssl/private/mail.mydomain.com.crt smtpd_tls_key_file = /etc/ssl/private/mail.mydomain.com.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = MysqL:/etc/postfix/maps/alias.cf virtual_gid_maps = static:5000 virtual_mailBox_base = /var/spool/mail/virtual virtual_mailBox_domains = MysqL:/etc/postfix/maps/domain.cf virtual_mailBox_limit = 0 virtual_mailBox_maps = MysqL:/etc/postfix/maps/user.cf virtual_uid_maps = static:5000
正如您所看到的,我甚至试图通过inet_protocols指定它侦听ipv4连接.我已经尝试过,有没有这个命令.
任何有关故障排除的帮助将不胜感激!当然,如果你看到我的配置中的任何内容显然是愚蠢的,那么我不会高于建议或批评.
解决方法
您对smtpd_recipient_restrictions的上一次检查使用策略服务来验证收件人.通常这是一个postgrey服务,似乎与Postfix连接到它有一些问题.
smtpd_recipient_restrictions = ...,permit
如果从smtpd_recipient_restrictions中删除check_policy_service inet:127.0.0.1:10023,则应该消除该错误,但您仍应确定将在此处运行的postgrey或其他服务发生了什么.
在Unbuntu系统上检查Postgrey
通常,postgrey默认配置将在端口10023上侦听连接,并确定是允许还是拒绝它们. Unbutu服务器上的一些可以检查以确定是否安装的服务器是……
>你有/ etc / default / postgrey文件吗?这是基本的配置文件.
>你有/ etc / postgrey文件夹吗?这是您可以将元素列入白名单的地方.
>当你运行>哪个postgrey会找到二进制文件?我可以在/usr/sbin / postgrey中找到.
>你有一个/etc/init.d/postgrey脚本在启动时启动吗?这是Ubuntu守护进程的典型位置.
这些只会给你一些关于这个服务器是否曾经一次配置过postgrey的线索.如果进程在服务器上运行不正常,则需要进一步查看故障排除.