我的服务器运行的是 PHP 5.3.8,存在无法接收来自以下帐户的电子邮件的问题:不是在我的服务器中。
例如,如果我通过我的博客“blog123.com”上的联系表单向类似“[电子邮件保护]' 电子邮件已收到。
但是,如果我从 Gmail 发送电子邮件到“[电子邮件保护]',没有收到电子邮件。
我可以发送从该服务器上的帐户发送消息到任何目的地都没有问题。
我检查了日志
/usr/local/psa/var/log/maillog
并且没有错误,但我时不时会看到这个
Nov 5 18:51:53 p2457330 postfix/smtp[3609]: certificate verification failed for gmail-smtp-in.l.google.com: num=27:certificate not trusted
不确定这是否与该问题有关。
有什么想法可以解决这个问题吗?
这是 postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 10240000
mydestination = localhost.$mydomain, localhost, localhost.localdomain
myhostname = excample.com
mynetworks = 127.0.0.0/8, 10.2.0.157/32
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_send_xforward_command = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8
smtpd_client_restrictions =
smtpd_proxy_timeout = 3600s
smtpd_recipient_restrictions = permit_mynetworks, check_client_access pcre:/var/spool/postfix/plesk/no_relay.re, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re
smtpd_timeout = 3600s
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = hash:/var/spool/postfix/plesk/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:31
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:110
Netstat 信息(仅供参考,出于安全原因,我的 IP“29.5.29.3”是虚拟的)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 30793/couriertcpd
tcp 0 0 0.0.0.0:225 0.0.0.0:* LISTEN 2391/xinetd
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 30810/couriertcpd
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 2619/master
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 2619/master
tcp 0 0 0.0.0.0:106 0.0.0.0:* LISTEN 2391/xinetd
tcp 0 0 0.0.0.0:2123 0.0.0.0:* LISTEN 11744/dsmcad
tcp 0 0 127.0.0.1:10027 0.0.0.0:* LISTEN 2619/master
tcp 0 0 0.0.0.0:1581 0.0.0.0:* LISTEN 11744/dsmcad
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 30801/couriertcpd
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 30783/couriertcpd
tcp 0 0 0.0.0.0:8880 0.0.0.0:* LISTEN 18708/sw-cp-serverd
tcp 0 0 127.0.0.1:10001 0.0.0.0:* LISTEN 18708/sw-cp-serverd
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 2619/master
tcp 0 0 29.5.29.3:53 0.0.0.0:* LISTEN 18417/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 18417/named
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2391/xinetd
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 1288/drwebd.real
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 18417/named
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2619/master
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 18708/sw-cp-serverd
tcp 0 0 :::3306 :::* LISTEN 20884/mysqld
tcp 0 0 :::80 :::* LISTEN 841/httpd
tcp 0 0 :::22 :::* LISTEN 11198/sshd
tcp 0 0 :::443 :::* LISTEN 841/httpd
udp 0 0 29.5.29.3:53 0.0.0.0:* 18417/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 18417/named
udp 0 0 29.5.29.3:123 0.0.0.0:* 2407/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2407/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2407/ntpd
udp 0 0 fe80::230:48ff:fefa:123 :::* 2407/ntpd
udp 0 0 ::1:123 :::* 2407/ntpd
udp 0 0 :::123 :::* 2407/ntpd
答案1
这个问题是由于我的 ISP 防火墙配置过于严格而导致的。在打电话询问并讨论各种可能性后,他们找出了防火墙问题,现在一切正常。
答案2
这里可能有几件事是错误的:
首先,您应该检查 postfix 是否在正确的接口上监听(netstat -tulpn
)。但我认为它没有监听任何 WAN 地址,因为这是配置文件中的内容:
mynetworks = 127.0.0.0/8, 10.2.0.157/32
(我真的希望您的服务器不在 LAN 中)因此,请在此列表中添加您的 WAN-IP。我看到您已经安装了 plesk,所以也许您可以在 plesk 中的某个地方配置它,但我不知道,因为我对 Plesk 一无所知。
接下来,检查您域名的 MX 设置。它是否指向您的服务器?