您好 ServerFault 社区,
我有一个基于 MySQL 的 Postfix 和 Dovecot 邮件服务器,我遇到了 MySQL 的问题,所以我不得不重新安装它,这就是问题开始发生的地方。
RoundCube 启动器随机给我(只是几次)IMAP 服务器连接错误。有时他说他无法加载电子邮件,因为他无法连接到 IMAP,我必须重新加载页面才能使其再次工作。假设它发生了 50% 的时间。
但这不是主要问题,只是使用起来很无聊。
今天我的 SMTP 服务器开始做一些奇怪的事情。让我解释。
我的 SMTP 和 IMAP 突然停止工作。我可以通过编辑 VPS 的名称服务器来修复 IMAP,这会导致传入邮件的 DNS 解析出现问题。但 SMTP 仍然工作了一半。
SMTP 工作:
In localhost,
By doing telnet port 25 in localhost,
By doing telnet 587 also from other IPs,
With Apple's Mail Client and not PHP Mail clients. (Ports 25 and 587),
NON-PhP Mailer (I tried with www(.)gmass(.)co/smtp-test) On all the ports (25,465,587).
SMTP 不起作用:
With PHP Mailer (I tried with WHMCS (Main Issue) and www(.)smtper(.)net) ,WHMCS any port SMTPER works on 25,
Telnet to 465 Localhost and non,
Telnet port 25 from external hosts,
By doing telnet port 25 from external hosts (I tryed with Putty).
我确信这不是 99.9999% 的防火墙问题,因为即使禁用 iPTables 我也有同样的问题。要解决的主要问题是 PHPMailers 不工作,如 WHMCS。
我的 IPTables,你可以看到端口是打开的,也是因为我可以将它们与一些 SMTP 客户端一起使用:
Chain INPUT (policy ACCEPT)
target prot opt source destination
f2b-sshd tcp -- anywhere anywhere multiport dports 2233
ACCEPT udp -- anywhere anywhere udp dpt:465
ACCEPT tcp -- anywhere anywhere tcp dpt:urd
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
f2b-sshd tcp -- anywhere anywhere multiport dports 2233
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
f2b-sshd tcp -- anywhere anywhere multiport dports 2233
ACCEPT udp -- anywhere anywhere udp dpt:11334
ACCEPT tcp -- anywhere anywhere tcp dpt:11334
ACCEPT udp -- anywhere anywhere udp dpt:19999
ACCEPT tcp -- anywhere anywhere tcp dpt:19999
ACCEPT tcp -- anywhere anywhere tcp dpt:32400
ACCEPT udp -- anywhere anywhere udp dpt:32400
ACCEPT udp -- anywhere anywhere udp dpt:8888
ACCEPT udp -- anywhere anywhere udp dpt:8096
ACCEPT tcp -- anywhere anywhere tcp dpt:8096
ACCEPT tcp -- anywhere anywhere tcp dpt:8888
ACCEPT udp -- anywhere anywhere udp dpt:50315
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:webmin
ACCEPT udp -- anywhere anywhere udp dpt:10000
f2b-sshd tcp -- anywhere anywhere multiport dports 2233
ACCEPT udp -- anywhere anywhere udp dpt:10040
ACCEPT udp -- anywhere anywhere udp dpt:10023
ACCEPT udp -- anywhere anywhere udp dpt:11332
ACCEPT udp -- anywhere anywhere udp dpt:mysql
ACCEPT udp -- anywhere anywhere udp dpt:110
ACCEPT udp -- anywhere anywhere udp dpt:100
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:20
ACCEPT udp -- anywhere anywhere udp dpt:993
ACCEPT udp -- anywhere anywhere udp dpt:143
ACCEPT udp -- anywhere anywhere udp dpt:2233
ACCEPT udp -- anywhere anywhere udp dpt:465
ACCEPT udp -- anywhere anywhere udp dpt:587
ACCEPT udp -- anywhere anywhere udp dpt:1988
ACCEPT udp -- anywhere anywhere udp dpt:http-alt
ACCEPT udp -- anywhere anywhere udp dpt:22
ACCEPT udp -- anywhere anywhere udp dpt:25
ACCEPT udp -- anywhere anywhere udp dpt:80
ACCEPT udp -- anywhere anywhere udp dpt:443
ACCEPT udp -- anywhere anywhere udp dpt:2233
ACCEPT tcp -- anywhere anywhere tcp dpt:10040
ACCEPT tcp -- anywhere anywhere tcp dpt:10023
ACCEPT tcp -- anywhere anywhere tcp dpt:11332
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:100
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp dpt:2233
ACCEPT tcp -- anywhere anywhere tcp dpt:urd
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:1988
ACCEPT tcp -- anywhere anywhere tcp dpt:http-alt
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:2233
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain f2b-sshd (4 references)
target prot opt source destination
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
感谢您给我的任何帮助。再见!
PS:在几周前的 MySQL 编辑之前,即使使用基于 PHP 的邮件客户端,一切都运行良好,但我不知道这是否是邮件主机或 PHP 主机(WHMCS 和 SMTPER)的问题,就像某些网站和 SMTP 一样客户一切正常。例如 Apple 的电子邮件。
编辑:我在控制台中也有 Postfix 垃圾邮件:
Oct 30 11:06:07 mail.indst.eu systemd[1]: Starting Postfix Mail Transport Agent...
Oct 30 11:06:07 mail.indst.eu systemd[1]: Started Postfix Mail Transport Agent.
Oct 30 11:06:07 mail.indst.eu systemd[1]: Reloading Postfix Mail Transport Agent.
Oct 30 11:06:07 mail.indst.eu systemd[1]: Reloaded Postfix Mail Transport Agent.
Oct 30 11:06:07 mail.indst.eu systemd[1]: Reloading Postfix Mail Transport Agent.
Oct 30 11:06:07 mail.indst.eu systemd[1]: Reloaded Postfix Mail Transport Agent.
谢谢,我自己解决了这个问题。对于 PHP Mailer,问题在于 cPanel。我必须在 WHM 中允许外部 SMTP 服务器。
谢谢您的帮助。