我一直试图通过php向我的应用程序的注册用户发送电子邮件。
我在debian(数字海洋液滴)上使用LAMP。 Sendmail和opendkim。
我已经设置了SPF,DKIM和DMARC,并确认这些服务通过第三方基于Web的服务正常运行。
我在此服务上获得了100%的分数而没有任何警告:http://www.mail-tester.com/
在Gmail上,电子邮件以垃圾邮件形式发送,在Hotmail上它们根本没有到达,但我收到了几天后我的电子邮件未被接收通知的通知。
以下是将发件人添加到我的安全发件人列表后,hotmail收到的电子邮件的来源。
x-store-info:qAUQJzZ73IJCLUJ+0n7ZQ0tyh3aLbvsRShq0lkPgv3IVOooErkSkewDsP+t1Cax/muSI9UyoB4MPpzTF7SmsHoXotERao0AMdxy/dOy2I80PlEnXiwFP/Ayeh8hnqX+UkFVWr84Ulqk=
Authentication-Results: hotmail.com; spf=pass (sender IP is <ip>; identity alignment result is pass and alignment mode is relaxed) smtp.mailfrom=challenge@<domain>; dkim=pass (identity alignment result is pass and alignment mode is relaxed) header.d=challenge.<domain>; x-hmca=pass header.id=challenge@<domain>
X-SID-PRA: challenge@<domain>
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MztHRD0zO1NDTD02
X-Message-Info: 6YO/4nwP5t1mtfSNVgWW2U47Sdk9xX1SAWUsoLSyWydDzdrrmeugrkjPJG7agB5LIyETvhvrEb6Xr8XvqMsKUN2MMCgO2BvUkt24wTtZLl+hft6A9mG1JLiWYRqqeuRiFrKOc4kGXDyuvt8lhEDkfSC0zQx6CevwL2OlyGkB+7DFMUuZiMI2/eFVv4653QhUysdXIVVT0Jqr/wP5LJ2cP+YNjWLC9Kmx
Received: from challenge.<domain> ([<ip address>]) by BAY004-MC3F17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008);
Wed, 8 Apr 2015 14:27:38 -0700
Received: from challenge.<domain> (localhost [127.0.0.1])
by challenge.<domain> (8.14.4/8.14.4/Debian-4) with ESMTP id t38LRc1D027844
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
for <henrypenny@hotmail.com>; Wed, 8 Apr 2015 21:27:38 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=challenge.<domain>; s=default; t=1428528458;
bh=fdkeB/A0FkbVP2k4J4pNPoeWH6vqBm9+b0C3OY87Cw8=;
h=Date:From:To:Subject:From;
b=PdpGBHg7bA1RKI1lGU36jCbY+/IRebFtCHQlYZvbu2s5TV5gb+/sCG9fVjybaUPKI
xN+6PC58F3V+EpPtmFVddbpfyanMy1Rs/acFrNDSZLM5XeggWN4mLxQvo48iCJxOs7
crERNaCdhU+D3tDfUmbdPfBXnP89ql9lEopiuzis=
Received: (from devops@localhost)
by <domain> (8.14.4/8.14.4/Submit) id t38LRbio027843
for henrypenny@hotmail.com; Wed, 8 Apr 2015 21:27:37 GMT
Date: Wed, 08 Apr 2015 21:27:37 +0000
From: challenge@<domain>
To: henrypenny@hotmail.com
Subject: Test from PTI server
Message-ID: <55259d49.3vDGyJdimZF+gCyx%challenge@<domain>>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: challenge@challenge.<domain>
X-OriginalArrivalTime: 08 Apr 2015 21:27:38.0574 (UTC) FILETIME=[D67E16E0:01D07242]
Test
我已成功使用相同的发件人从其他服务器发送电子邮件,他们直接通过Gmail和Hotmail。所以我必须得出结论,我的DNS和SPF设置很好。具有讽刺意味的是,其他服务器没有DKIM或DMARC。 (注意:其他服务器有后缀)
我对多个收到的标题感到有点困惑。
Received: from challenge.<domain>...
Received: from challenge.<domain>...
Received: (from devops@localhost)
by challenge.<domain>...
我已根据http://www.barracudacentral.org/lookups
The IP address 104.236.167.229 is not currently listed as "poor" on the Barracuda Reputation System.
http://mxtoolbox.com/
显示该域名没有列入黑名单。
http://www.dnsbl.info/
也完全清楚。
这是邮件日志:
Apr 8 23:27:47 challenge sendmail[28470]: t38NRlEL028470: from=challenge@<domain>, size=346, class=0, nrcpts=1, msgid=<5525b973.KWFuUvRrPkQR+tEN%challenge@<domain>>, relay=devops@localhost
Apr 8 23:27:47 challenge sendmail[28470]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
Apr 8 23:27:47 challenge sm-mta[28471]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
Apr 8 23:27:47 challenge sm-mta[28471]: t38NRlgr028471: from=<challenge@<domain>>, size=511, class=0, nrcpts=1, msgid=<5525b973.KWFuUvRrPkQR+tEN%challenge@<domain>>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Apr 8 23:27:47 challenge opendkim[24594]: t38NRlgr028471: DKIM-Signature header added (s=default, d=<domain>)
Apr 8 23:27:47 challenge sm-mta[28471]: t38NRlgr028471: Milter insert (1): header: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;\n\td=<domain>; s=default; t=1428535667;\n\tbh=g3zLYH4xKxcPrHOD18z9YfpQcnk/GaJedfustWU5uGs=;\n\th=Date:From:To:Subject:From;\n\tb=ajpBs8Y8C8oM4maqGW5ZAwdQY/mJi+p0z3tIgyRSTjNelFqRvy4O5pvOOH8N/tN0Y\n\t j8pqP32gURz57Mhpxh1HeWsZ0nyGn17y3/uKA7Kek6fBqxA+Zx0Ucyujl7URiSvKC9\n\t q3rtTcxYd562Y2zsYA/cearagZ/9uuX93PxZdyaM=
Apr 8 23:27:47 challenge sendmail[28470]: t38NRlEL028470: to=henrypenny@hotmail.com, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30346, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t38NRlgr028471 Message accepted for delivery)
Apr 8 23:27:47 challenge sm-mta[28473]: STARTTLS=client, relay=mx4.hotmail.com., version=TLSv1/SSLv3, verify=OK, cipher=ECDHE-RSA-AES256-SHA384, bits=256/256
Apr 8 23:27:48 challenge sm-mta[28473]: t38NRlgr028471: to=<henrypenny@hotmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120511, relay=mx4.hotmail.com. [65.55.33.119], dsn=2.0.0, stat=Sent ( <5525b973.KWFuUvRrPkQR+tEN%challenge@<domain>> Queued mail for delivery)
我还设置了反向DNS查找并对其进行了测试。
我在运行sendmailconfig
时收到此消息:
Creating /etc/mail/databases...
Checking filesystem, this may take some time - it will not hang!
... Done.
Checking for installed MDAs...
Creating /etc/mail/sasl/sasl.m4...
Ah, you're setup with SASL2 !
Unfortunately, there is no automagic way to migrate to /etc/sasldb2 :(
You'll want to make sure /etc/default/saslauthd is setup to start,
and has at least MECHANISMS="pam" !
If you find out what more is needed, please let me know!
Creating/Updating SSL(for TLS) information
Creating /etc/mail/tls/starttls.m4...
You already have sendmail certificates
Checking {sendmail,submit}.mc and related databases...
答案 0 :(得分:0)
除了您的源电子邮件地址以及DNS和SPF设置之外,还有其他因素,包括IP地址本身的声誉和IP地址的类型。许多邮件服务拒绝或拒绝从动态池中的IP地址或云服务中收到的电子邮件。
如果您遇到IP问题,请查看以下内容以获取线索。
假设IP不是问题,因为您在尝试传递后获得了反弹天数,我怀疑在您的服务器重试时,该电子邮件可能会卡在您的服务器中。如果是这种情况,请检查Sendmail日志以查看发生的情况。请注意,您可能需要在/etc/mail/sendmail.cf中增加Sendmail日志的详细程度
另请注意,问题可能是由于接收电子邮件服务器可能正在执行的反向DNS检查。对于数字海洋墨滴,默认设置通常会导致反向DNS检查失败,这将显示在日志中。如果我没记错液滴,你需要使用DNS控制面板并通过在控制面板中设置正确的主机名来更新你的PTR记录,这样液滴主机名就是域名,导致反向DNS有效。