我试图在Ubuntu上设置一个邮件服务器(postfix&dovecot)。 但是,我无法发送/接收电子邮件,并得到类似的错误,如发布在Postfix:失去与* somehost *的连接,而收到初始服务器问候语 。 我的错误消息如下所示:
Jan 5 03:46:49 oakwise-12752 postfix/smtp[22531]: 48079C08F4: conversation with gmail-smtp-in.l.google.com[74.125.25.27] timed out while receiving the initial server greeting
当我尝试telnet到谷歌邮件服务器,我可以连接到主机,但没有得到问候消息(220)。 喜欢这个:
$ telnet gmail-smtp-in.l.google.com 25 Trying 74.125.25.27... Connected to gmail-smtp-in.l.google.com. Escape character is '^]'.
当我尝试telnet到我自己的邮件服务器时,我可以成功获取问候消息。
$ telnet localhost 25 Trying 127.0.0.1... Connected to myhost.mydomain.com Escape character is '^]'. 220 myhost.mydomain.com ESMTP Postfix (Ubuntu)
你知道我的主机configuration是否有问题吗? 请告诉我,如果您需要任何进一步的信息。
UPDATE
这是tcpdump一些结果,而telnet gmail-smtp-in.l.google.com 25 。
tcpdump host 74.125.25.26 09:20:39.856647 IP myhost.mydomain.com.53742 > fa-in-f26.1e100.net.smtp: Flags [S], seq 2040695833, win 14600, options [mss 1460,sackOK,TS val 274530380 ecr 0,nop,wscale 7], length 0 09:20:40.013693 IP fa-in-f26.1e100.net.smtp > myhost.mydomain.com.53742: Flags [S.], seq 1029741075, ack 2040695834, win 14180, options [mss 1430,sackOK,TS val 128311508 ecr 274530380,nop,wscale 6], length 0 09:20:40.013747 IP myhost.mydomain.com.53742 > fa-in-f26.1e100.net.smtp: Flags [.], ack 1, win 115, options [nop,nop,TS val 274530420 ecr 128311508], length 0 09:20:51.837739 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 1931780617:1931780622, ack 3676242651, win 115, options [nop,nop,TS val 274533376 ecr 3949456046], length 5 09:22:52.157741 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274563456 ecr 3949456046], length 5 09:24:52.477713 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274593536 ecr 3949456046], length 5 09:26:52.797732 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274623616 ecr 3949456046], length 5 09:28:53.117719 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274653696 ecr 3949456046], length 5 09:30:53.437729 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274683776 ecr 3949456046], length 5
更新2
谷歌告诉我,ISP的日志将阻止端口25,以防止垃圾邮件。 我正在使用我公司云提供的虚拟主机。 这可能是25端口被公司的防火墙或ISP阻止的吗? 我怎么知道它是否被封锁?
我同意这很可能是谷歌使用的反垃圾邮件技术:
以下是另一个IP的telnet输出:
> telnet gmail-smtp-in.l.google.com 25 Trying 173.194.70.26... Connected to gmail-smtp-in.l.google.com. Escape character is '^]'. 220 mx.google.com ESMTP j49si145368071eep.45 quit 221 2.0.0 closing connection j49si145368071eep.45 Connection closed by foreign host.
和你提到的ip相同的telnet:
> telnet 74.125.39.27 25 Trying 74.125.39.27... telnet: connect to address 74.125.39.27: Operation timed out telnet: Unable to connect to remote host
这可能是谷歌使用的反垃圾邮件技术。 其他smtp服务器的行为类似于谷歌MX? 可能是tcpdump获取一些线索