我有我的域名电子邮件托管在谷歌应用程序,免费版本。问题是偶尔/频繁地,发送给我的电子邮件会退回。有人给我转发了退回消息:
Delivery to the following recipient failed permanently:
steven@vanesoftware.com
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We
recommend contacting the other
我需要从ip获取主域名。我对像和这样的函数的工作原理有一些疑问。
在下面的示例中,我将反向ip一个随机域,然后尝试恢复域名:
import socket
domain = 'heroku.com'
# get ip from domain
ip = socket.gethostbyname(domain)
print('ip =', ip)
# get domain from ip
print(socket.gethostbyaddr(ip))
print(socket.getfqdn(ip))
# OUTPUT
# ip = 50.19.85.154