我在从 Linux 向 Exchange 服务器发送邮件时遇到了麻烦。当我通过端口 25 从 Linux 远程登录到 Windows 时,我没有收到任何来自 Exchange 的消息。等待几秒钟后,连接会自动终止。
使用 tcpdump 我可以看到 Windows 不断发送 SYN+ACK 并最终关闭连接。即使 Linux 以 ACK 消息响应,Windows 也看不到它。如果我发送一些消息(telnet 测试)而不等待 Exchange“问候”,则连接有效。
我已经验证 Windows 防火墙和来自 Linux 机器的连接是被允许的,并且在防火墙日志中找不到任何数据包丢弃消息。
从 Windows 到 Linux 端口 25 的连接工作正常。
细节:
Windows:xxx243/255.255.255.128;网关 = xxx129
Linux:xxx145/255.255.255.128;网关=xxx129
Linux 到 Windows tcpdump
root@yy01:~# tcpdump -nni eth0 host x.x.x.243 and port 25
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
05:03:58.846266 IP x.x.x.145.45104 > x.x.x.243.25: Flags [S], seq 3228055127, win 29200, options [mss 1000,sackOK,TS val 659649138 ecr 0,nop,wscale 7], length 0
05:03:58.849071 IP x.x.x.243.25 > x.x.x.145.45104: Flags [S.], seq 37978062, ack 3228055128, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 316999749 ecr 659649138], length 0
05:03:58.849097 IP x.x.x.145.45104 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659649139 ecr 316999749], length 0
05:04:01.858960 IP x.x.x.243.25 > x.x.x.145.45104: Flags [S.], seq 37978062, ack 3228055128, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 317000050 ecr 659649138], length 0
05:04:01.859001 IP x.x.x.145.45104 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659649891 ecr 316999749], length 0
05:04:07.874811 IP x.x.x.243.25 > x.x.x.145.45104: Flags [S.], seq 37978062, ack 3228055128, win 65535, options [mss 1460,sackOK,TS val 317000651 ecr 659649138], length 0
05:04:07.874872 IP x.x.x.145.45104 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659651395 ecr 316999749], length 0
05:04:19.875384 IP x.x.x.243.25 > x.x.x.145.45104: Flags [R], seq 37978063, win 0, length 0
Linux 到 Windows tcpdump 发送一些数据而不等待问候
root@yy01:~# tcpdump -nni eth0 host x.x.x.243 and port 25
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
05:06:30.521152 IP x.x.x.243.25 > x.x.x.145.45234: Flags [R], seq 1489851708, win 0, length 0
05:06:31.253677 IP x.x.x.145.45246 > x.x.x.243.25: Flags [S], seq 3514263924, win 29200, options [mss 1000,sackOK,TS val 659687240 ecr 0,nop,wscale 7], leng
th 0
05:06:31.256475 IP x.x.x.243.25 > x.x.x.145.45246: Flags [S.], seq 3020263353, ack 3514263925, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 317014
989 ecr 659687240], length 0
05:06:31.256520 IP x.x.x.145.45246 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659687241 ecr 317014989], length 0
05:06:34.255733 IP x.x.x.243.25 > x.x.x.145.45246: Flags [S.], seq 3020263353, ack 3514263925, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 317015
289 ecr 659687240], length 0
05:06:34.255782 IP x.x.x.145.45246 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659687990 ecr 317014989], length 0
05:06:36.720344 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659688607 ecr 317014989], length 2: SMTP:
05:06:36.924198 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659688658 ecr 317014989], length 2: SMTP:
05:06:37.176212 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659688721 ecr 317014989], length 2: SMTP:
05:06:37.680210 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659688847 ecr 317014989], length 2: SMTP:
05:06:38.688207 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659689099 ecr 317014989], length 2: SMTP:
05:06:40.271716 IP x.x.x.243.25 > x.x.x.145.45246: Flags [S.], seq 3020263353, ack 3514263925, win 65535, options [mss 1460,sackOK,TS val 317015890 ecr 659687240], length 0
05:06:40.271765 IP x.x.x.145.45246 > x.x.x.243.25: Flags [.], ack 1, win 229, options [nop,nop,TS val 659689494 ecr 317014989], length 0
05:06:40.708211 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659689604 ecr 317014989], length 2: SMTP:
05:06:44.748217 IP x.x.x.145.45246 > x.x.x.243.25: Flags [P.], seq 1:3, ack 1, win 229, options [nop,nop,TS val 659690614 ecr 317014989], length 2: SMTP:
05:06:44.751495 IP x.x.x.243.25 > x.x.x.145.45246: Flags [P.], seq 1:93, ack 3, win 65533, options [nop,nop,TS val 317016338 ecr 659690614], length 92: SMTP: 220 EXxx.yyyy.local Microsoft ESMTP MAIL Service ready at Thu, 4 Feb 2016 05:06:44 +0100
请告知该问题的可能原因。
注意:我曾在 stackoverflow 上问过同样的问题,他们建议在这里提问。
谢谢你,
答案1
在 Exchange 管理控制台 (EMC) > 服务器配置 > 集线器传输 >“接收连接器的名称”中配置您的接收连接器
要在 25 上接受通信,请设置您的本地地址以在端口 25 上接收来自所有 v4 IP 的邮件,以及在 Linux 计算机上具有您的 IP 的远程服务器:xxx145
对于基本测试,请使用 auth TLS 和匿名权限。
fqdn 设置您的公共域名。(fqdn 应指向您的 Windows IP 的 DNS A 记录:xxx243)
测试期间还有一件事 - 在接收连接器的第一个选项卡上将协议日志记录级别设置为详细。
然后您可以轻松检查 Windows 端发生的情况。日志位于:C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive
为了测试目的,请使用:telnet xxx243 25
你至少应该能够连接到服务器