无法验证Outlook server的电子邮件。mail()参数issu

2024-10-01 00:19:20 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我最后一个问题的继续Unable to check mx records for domains such as yahoo and outlooks etc 我有个例外

outlook-com.olc.protection.outlook.com.
mail() takes at least 2 arguments (1 given)

对于雅虎,我也得到了同样的例外

mta5.am0.yahoodns.net.
mail() takes at least 2 arguments (1 given)


脚本验证的完整代码如下:
https://github.com/Rwarlock/mxrecordchecker/blob/master/mxrecord.py

我应该使用哪些参数才能连接到此(outlook)域?
我错过了什么?


更新 我更新了参数,
server.mail('bhanu@krenovate.com',email)

现在我得到一个错误:

outlook-com.olc.protection.outlook.com.
Connection unexpectedly closed


更新2 我可以连接到雅虎,但仍然无法调试outlook。
outlook-com.olc.protection.outlook.com.
connect: ('outlook-com.olc.protection.outlook.com.', 25)
connect: ('outlook-com.olc.protection.outlook.com.', 25)
reply: '220 DB5EUR01FT021.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Thu, 14 Feb 2019 07:47:10 +0000\r\n'
reply: retcode (220); Msg: DB5EUR01FT021.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Thu, 14 Feb 2019 07:47:10 +0000
connect: DB5EUR01FT021.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Thu, 14 Feb 2019 07:47:10 +0000
send: 'helo www.outlook.com\r\n'
reply: '250 DB5EUR01FT021.mail.protection.outlook.com Hello [14.143.8.238]\r\n'
reply: retcode (250); Msg: DB5EUR01FT021.mail.protection.outlook.com Hello [14.143.8.238]
send: 'mail FROM:<bhanukrsingh@outlook.com>\r\n'
reply: '550 5.7.1 Service unavailable, Client host [14.143.8.238] blocked using Spamhaus. To request removal from this list see https://www.spamhaus.org/query/ip/[14.143.8.238] (AS3130). [DB5EUR01FT021.eop-EUR01.prod.protection.outlook.com]\r\n'
reply: retcode (550); Msg: 5.7.1 Service unavailable, Client host [14.143.8.238] blocked using Spamhaus. To request removal from this list see https://www.spamhaus.org/query/ip/[14.143.8.238] (AS3130). [DB5EUR01FT021.eop-EUR01.prod.protection.outlook.com]
send: 'rcpt TO:<bhanukrsingh@outlook.com>\r\n'
Connection unexpectedly closed

我收到这个调试数据。 列表中的一个测试域也抛出了这个

mail.pmrelocations.com.
connect: ('mail.pmrelocations.com.', 25)
connect: ('mail.pmrelocations.com.', 25)
reply: '451-The server has reached its limit for processing requests from your host. \r\n'
reply: '451 Please try again later.\r\n'
reply: retcode (451); Msg: The server has reached its limit for processing requests from your host.
Please try again later.
connect: The server has reached its limit for processing requests from your host.
Please try again later.
send: 'helo www.outlook.com\r\n'
Connection unexpectedly closed

Tags: fromcomhostforserverconnectservicemail