![Postfix-端口 2525 上的连接超时](https://linux22.com/image/766468/Postfix-%E7%AB%AF%E5%8F%A3%202525%20%E4%B8%8A%E7%9A%84%E8%BF%9E%E6%8E%A5%E8%B6%85%E6%97%B6.png)
我正在尝试使用 Postfix 和 Dovecot 发送主要内容,但总是收到:
May 10 15:13:41 3b15 postfix/smtp[21418]: connect to gmail-smtp-in.l.google.com[64.233.162.27]:25: Connection timed out
May 10 15:13:41 3b15 postfix/smtp[21420]: connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c05::1a]:25: Connection timed out
May 10 15:13:41 3b15 postfix/smtp[21421]: connect to gmail-smtp-in.l.google.com[64.233.162.27]:25: Connection timed out
May 10 15:13:53 3b15 postfix/smtp[21508]: connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c05::1a]:25: Connection timed out
mail_version = 3.3.0
我在装有 Postfix和 Dovecot 的Ubuntu 18.04 上2.3.14 (cee3cbc0d)
,我将 Postfix 的端口更改为2525
,运行时telnet localhost 2525
收到以下信息:
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server ESMTP Postfix (Ubuntu)
但是当我使用我的域而不是本地主机运行相同的命令时,我得到了:
Trying 2606:4700:3033::ac43:c709...
Trying 2606:4700:3032::6815:2c6e...
Trying 104.21.44.110...
什么都没发生。有人知道问题可能出在哪里吗?
当我在 postfix 和 dovecot 上运行状态检查时,我收到了成功消息:
postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2021-05-10 15:12:41 EEST; 15min ago
Process: 21397 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 21397 (code=exited, status=0/SUCCESS)
May 10 15:12:41 server systemd[1]: Starting Postfix Mail Transport Agent...
May 10 15:12:41 server systemd[1]: Started Postfix Mail Transport Agent.
dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-05-10 14:50:14 EEST; 38min ago
Docs: man:dovecot(1)
https://doc.dovecot.org/
Process: 20314 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
Main PID: 20317 (dovecot)
Tasks: 5 (limit: 2359)
CGroup: /system.slice/dovecot.service
├─20317 /usr/sbin/dovecot -F
├─20318 dovecot/anvil
├─20319 dovecot/log
├─20320 dovecot/config
└─21436 dovecot/stats
May 10 14:50:14 server systemd[1]: Stopped Dovecot IMAP/POP3 email server.
May 10 14:50:14 server systemd[1]: Started Dovecot IMAP/POP3 email server.
答案1
首先,您可能已经阻止了端口 25 的传出连接,这是大多数家庭互联网的标准,以避免垃圾邮件。
其次,您的网站使用 CloudFlare 代理隐藏,因此您的连接指向的是他们的服务器而不是您自己的服务器。要强制本地连接,请在“hosts”文件中添加正确的条目,指向您的本地 IP,这样该框就可以在本地工作。
谢谢,