Outlook.com DNS太慢,postfix超时

我试图发送电子邮件,例如:[email protected][email protected]。 在这两种情况下都是Outlook邮箱。

Postfix回复:

(启用ipv6时):

06F908112E 606 Thu Jun 19 10:20:40 [email protected] (Host or domain name not found. Name service error for name=grassvalley-com.mail.protection.outlook.com type=AAAA: Host not found, try again) [email protected] 

(只有ipv4):

 6946720087D 3117 Tue Jun 17 21:41:07 [email protected] (delivery temporarily suspended: Host or domain name not found. Name service error for name=grassvalley-com.mail.protection.outlook.com type=A: Host not found, try again) [email protected] 

当检查DNS时,我得到了一个答复(我已经尝试过Google DNS,IPv6只有DNS,Leaseweb DNS,OpenDNS,总是一样的):

 grassvalley-com.mail.protection.outlook.com. 7 IN A 207.46.163.138 grassvalley-com.mail.protection.outlook.com. 7 IN A 207.46.163.170 grassvalley-com.mail.protection.outlook.com. 7 IN A 207.46.163.247 

所以有一个正确的答复。

现在,似乎导致这个问题的是7秒的可笑的低TTL,并且每个DNS对这些Outlook域的答复需要2秒钟以上: Query time: 2039 msec.

这会导致Postfix超时而不发送电子邮件。

如果我运行这个命令dig grassvalley-com.mail.protection.outlook.com && postfix flush实际发送的电子邮件,因为它发生在7秒的时间范围内(DNS仍然被caching)。

我能告诉Postfix超时没有那么快吗? 我可以告诉绑定忽略来自Outlook的TTL <7秒,并caching它,例如,2个小时?

我有options timeout:1 attempts:1在我的resolv.conf 。 更改超时时间为3秒,而不是一个解决了问题:

 options timeout:3 attempts:1 

并且确保在你的main.cfconfiguration文件中没有这一行:

 smtp_host_lookup = dns, native