我试图从我的EC2实例发送电子邮件。
无论目标电子邮件地址如何,SMTP服务日志都会显示该电子邮件已发送,但在远程服务器上永远不会显示。
我做了一个黑名单检查我的域名: http : //whatismyipaddress.com/blacklist-check ,它返回正常。
电子邮件至[email protected]在/ var / log / maillog中显示以下内容:
May 6 23:52:33 ip-172-31-21-52 sendmail[10534]: r46NqXPF010534: from=root, size=236, class=0, nrcpts=1, msgid=<201305062352.r46NqXPF010534@ip-172-31-21-52.ap-southeast-2.compute.internal>, relay=root@localhost May 6 23:52:33 ip-172-31-21-52 sendmail[10535]: r46NqXit010535: from=<[email protected]>, size=571, class=0, nrcpts=1, msgid=<201305062352.r46NqXPF010534@ip-172-31-21-52.ap-southeast-2.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] May 6 23:52:33 ip-172-31-21-52 sendmail[10534]: r46NqXPF010534: [email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30236, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r46NqXit010535 Message accepted for delivery) May 6 23:52:35 ip-172-31-21-52 sendmail[10537]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128 May 6 23:52:38 ip-172-31-21-52 sendmail[10537]: r46NqXit010535: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=120571, relay=aspmx.l.google.com. [74.125.129.27], dsn=2.0.0, stat=Sent (OK 1367884358 kx5si16370724pbc.170 - gsmtp)
我们已经申请去除发送限制,亚马逊已经证实这已经完成。
我应该在哪里看?
From:地址( [email protected] )不可交付。 许多邮件服务器将不会接收邮件,而该地址不能传送。
您似乎没有弹性IP地址。 除非您获得弹性IP地址,否则将所有亚马逊的IP地址添加到Spamhaus策略黑名单 (PBL)中,除非您获得弹性IP地址,将域configuration为指向此域,然后填写此处链接的表单以使Amazonconfiguration反向DNSlogging以匹配您已经创build的转发logging。 他们还同时从策略黑名单中删除IP地址。
如果Google有一个机制来查询Spamhaus PBL或维护自己的列表,我不会感到惊讶。
这个问题似乎与他们没有服务器域的公有DNS有关。
我configurationsendmail伪装一个互联网可见的域名,这解决了这个问题。
编辑/etc/mail/sendmail.mc
MASQUERADE_AS(`mydomnain.com')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(`mydomain.com')dnl
跑
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
重新启动sendmail