使用在AWS Elastic Beanstalk上运行的Wordpress的电子邮件问题

时间:2015-04-27 03:42:01

标签: wordpress email amazon-web-services elastic-beanstalk elasticsearch

我在AWS Elastic Beanstalk上运行Wordpress 4.2。我正在使用一个使用WP电子邮件API发送电子邮件的插件,该电子邮件API使用服务器(即Elastic Beanstalk)的内部邮件系统。

问题:应用尝试发送到我的大学电子邮件(我们称之为.uni.edu)的电子邮件失败,并且在发送到我的标准Gmail时它们确实有效。

有趣的是,我在本地运行相同的应用程序没有问题。与应用程序关联的电子邮件发送正常 - 显然,Elastic Beanstalk特别试图将消息中继到.uni.edu服务器的方式存在一些问题。也许.uni.edu服务器将其作为垃圾邮件发送(当从Elastic Beanstalk发送时,而不是通过我的本地系统发送时)并将其弹回,但我没有足够的经验来诊断它。

是否有人建议直接对此问题应用某种修复方法,或者创建某种解决方案的设置(例如,在Elastic Beanstalk上设置一些内容以非默认方式发送电子邮件的可能性较小有问题与大学电子邮件服务器一起工作)?

这是来自/ var / mail的日志:

From MAILER-DAEMON@ip-172-31-41-109.ec2.internal  Fri Apr 24 21:39:52 2015
Return-Path: <MAILER-DAEMON@ip-172-31-41-109.ec2.internal>
Received: from localhost (localhost)
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4) id t3OLdq1k026047;
    Fri, 24 Apr 2015 21:39:52 GMT
Date: Fri, 24 Apr 2015 21:39:52 GMT
From: Mail Delivery Subsystem <MAILER-DAEMON@ip-172-31-41-109.ec2.internal>
Message-Id: <201504242139.t3OLdq1k026047@ip-172-31-41-109.ec2.internal>
To: <webapp@ip-172-31-41-109.ec2.internal>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
    boundary="t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal

The original message was received at Fri, 24 Apr 2015 21:39:42 GMT
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<univstudent@uni.edu>
    (reason: 553 5.1.8 <webapp@ip-172-31-41-109.ec2.internal>... Domain of sender address webapp@ip-172-31-41-109.ec2.internal does not exist)

   ----- Transcript of session follows -----
... while talking to apathy.uni.edu.:
>>> MAIL From:<webapp@ip-172-31-41-109.ec2.internal> SIZE=1191
<<< 553 5.1.8 <webapp@ip-172-31-41-109.ec2.internal>... Domain of sender address webapp@ip-172-31-41-109.ec2.internal does not exist
501 5.6.0 Data format error

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal
Content-Type: message/delivery-status

Reporting-MTA: dns; ip-172-31-41-109.ec2.internal
Received-From-MTA: DNS; localhost
Arrival-Date: Fri, 24 Apr 2015 21:39:42 GMT

Final-Recipient: RFC822; univstudent@uni.edu
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <webapp@ip-172-31-41-109.ec2.internal>... Domain of sender address webapp@ip-172-31-41-109.ec2.internal does not exist
Last-Attempt-Date: Fri, 24 Apr 2015 21:39:52 GMT

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal
Content-Type: message/rfc822

Return-Path: <webapp@ip-172-31-41-109.ec2.internal>
Received: from ip-172-31-41-109.ec2.internal (localhost [127.0.0.1])
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4) with ESMTP id t3OLdg1k026045
    for <univstudent@uni.edu>; Fri, 24 Apr 2015 21:39:42 GMT
Received: (from webapp@localhost)
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4/Submit) id t3OLdgcq026044;
    Fri, 24 Apr 2015 21:39:42 GMT
To: univstudent@uni.edu
Subject: [classifiedads] Password Reset
X-PHP-Originating-Script: 498:class-phpmailer.php
Date: Fri, 24 Apr 2015 21:39:42 +0000
From: WordPress <wordpress@classifiedads-test.elasticbeanstalk.com>
Message-ID: <bace4f13cdc099117cd4ac9c70e2531c@classifiedads-test.elasticbeanstalk.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Someone requested that the password be reset for the following account:

http://classifiedads-test.elasticbeanstalk.com/

Username: univstudentseas

If this was a mistake, just ignore this email and nothing will happen.

To reset your password, visit the following address:

<http://classifiedads-test.elasticbeanstalk.com/wp-login.php?action=rp&key=dzaUvJpcjAe243gNOysZ&login=univstudentseas>


--t3OLdq1k026047.1429911592/ip-179-35-41-109.ec2.internal--

1 个答案:

答案 0 :(得分:0)

这听起来与另一个关于电子邮件的近期问题非常相似:

http://stackoverflow.com/questions/29808262/unable-to-send-emails-from-linux/29810884#29810884

您的ec2实例是否有关联的外部DNS?是否有与之相关的公共IP。您需要应用某种类型的修复,以便您的外发电子邮件的域名不是webapp@ip-172-31-41-109.ec2.internal