我没有任何问题,从Gmail收到电子邮件,或任何邮件列表,我已经注册,但出于某种原因,Outlook拒绝发送任何电子邮件到我的邮件服务器。
_handle_client readline: b'EHLO NAM02-BN1-obe.outbound.protection.outlook.com\r\n' │
('52.100.160.208', 55618) >> b'EHLO NAM02-BN1-obe.outbound.protection.outlook.com' │
('52.100.160.208', 55618) << b'250-0.0.0.0' │
('52.100.160.208', 55618) << b'250-SIZE 33554432' │
('52.100.160.208', 55618) << b'250-8BITMIME' │
EHLO from 'NAM02-BN1-obe.outbound.protection.outlook.com' │
('52.100.160.208', 55618) << b'250-AUTH PLAIN\n250-MAIL\n250 HELP' 最初,我认为这可能是因为outlook在TLS中搞恶作剧--但是从响应中完全删除STARTTLS没有帮助。不管有没有STARTTLS,都可以连接到我的邮件服务器,发出EHLO命令,然后.放弃?其实我也不知道。
但它确实告诉我一个谎言:
1/29/2022 4:39:30 PM - Server at BYAPR05MB6069.namprd05.prod.outlook.com returned '550 5.4.317 Message expired, cannot connect to remote server(451 4.4.0
Socket error SocketError)'
1/29/2022 4:27:02 PM - Server at waynewerner.com (104.236.246.170) returned '450 4.4.317 Cannot connect to remote server [Message=451 4.4.0 Socket error
SocketError] [LastAttemptedServerName=waynewerner.com] [LastAttemptedIP=104.236.246.170:25] [BN7NAM10FT066.eop-nam10.prod.protection.outlook.com](451 4.4.0
Socket error SocketError)'我的服务器没有返回我可以在日志中看到的任何450 4.4.317。在我的服务器源代码中,我甚至没有看到支持响应的地方。Outlook在失败电子邮件中提供https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/mail-flow-intelligence-in-office-365?view=o365-worldwide,但下列信息:
Error code: 450 4.4.317 Cannot connect to remote server
Typically, this error means Microsoft 365 connected to the destination email server, but the server responded with an immediate error, or doesn't meet the connection requirements. The error details will explain the problem. For example:
The destination email server responded with a "Service not available" error, which indicates the server is unable to maintain communication with Microsoft 365.
The connector is configured to require TLS, but the destination email server doesn't support TLS.而且,Outlook似乎做了一些不正确的事情。将其与谷歌的完全合理的方法进行比较:
_handle_client readline: b'EHLO mail-vk1-f175.google.com\r\n'
('209.85.221.175', 42948) >> b'EHLO mail-vk1-f175.google.com'
('209.85.221.175', 42948) << b'250-0.0.0.0'
('209.85.221.175', 42948) << b'250-SIZE 33554432'
('209.85.221.175', 42948) << b'250-8BITMIME'
('209.85.221.175', 42948) << b'250-STARTTLS'
EHLO from 'mail-vk1-f175.google.com'
('209.85.221.175', 42948) << b'250-AUTH PLAIN\n250-STARTTLS\n250 HELP'
_handle_client readline: b'STARTTLS\r\n'
('209.85.221.175', 42948) >> b'STARTTLS'
('209.85.221.175', 42948) << b'220 Ready to start TLS'
_handle_client readline: b'EHLO mail-vk1-f175.google.com\r\n'
('209.85.221.175', 42948) >> b'EHLO mail-vk1-f175.google.com'
('209.85.221.175', 42948) << b'250-0.0.0.0'
('209.85.221.175', 42948) << b'250-SIZE 33554432'
('209.85.221.175', 42948) << b'250-8BITMIME'
('209.85.221.175', 42948) << b'250-AUTH LOGIN PLAIN'
EHLO from 'mail-vk1-f175.google.com'
('209.85.221.175', 42948) << b'250-AUTH PLAIN\n250-STARTTLS\n250-MAIL\n250 HELP'
_handle_client readline: b'MAIL FROM:<me@gmail.com> SIZE=3159\r\n'这里我们看到了Gmail:
与Outlook相比,只有:
我甚至已经检查过了,而且看起来Outlook甚至没有再发送一个字节的数据。
几分钟后,连接看起来超时,等待Outlook发送数据:
[2022-01-31 18:04:54,355][mail.log][INFO] ('40.107.93.71', 64992) >> b'EHLO NAM10-DM6-obe.outbound.protection.outlook.com'
[2022-01-31 18:04:54,356][mail.log][DEBUG] ('40.107.93.71', 64992) << b'250-0.0.0.0'
[2022-01-31 18:04:54,356][mail.log][DEBUG] ('40.107.93.71', 64992) << b'250-SIZE 33554432'
[2022-01-31 18:04:54,357][mail.log][DEBUG] ('40.107.93.71', 64992) << b'250-8BITMIME'
[2022-01-31 18:04:54,358][mail.log][DEBUG] ('40.107.93.71', 64992) << b'250-STARTTLS'
[2022-01-31 18:04:54,359][mail.log][DEBUG] ('40.107.93.71', 64992) << b'250-AUTH PLAIN\n250-MAIL\n250 HELP'
[2022-01-31 18:04:54,359][mail.log][DEBUG] ('40.107.93.71', 64992) reading data...
[2022-01-31 18:04:54,360][mail.log][DEBUG] ('40.107.93.71', 64992) peeking
[2022-01-31 18:09:54,356][mail.log][INFO] ('40.107.93.71', 64992) connection timeout
[2022-01-31 18:09:54,358][mail.log][INFO] ('40.107.93.71', 64992) connection lost有什么线索,Outlook可能会在这里寻找,我没有提供?
发布于 2022-02-01 01:01:48
事实上,答案一直摆在我面前:
('209.85.221.175', 42948) << b'250-AUTH PLAIN\n250-STARTTLS\n250 HELP'Outlook在响应位之间严格强制执行'\r\n'。
解决了我的问题
https://serverfault.com/questions/1091875
复制相似问题