【问题标题】:Email issues with Wordpress running on AWS Elastic Beanstalk在 AWS Elastic Beanstalk 上运行的 Wordpress 的电子邮件问题
【发布时间】:2015-07-05 09:05:08
【问题描述】:

我在 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--

【问题讨论】:

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


    【解决方案1】:

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

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

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

    【讨论】:

    • 工作,谢谢!就像做“sudo hostname [正常的主机名”一样简单。一个更永久的解决方法是进入配置文件(位置因您的系统而异)并更改主机名变量,以便它在重新启动时使用它。
    猜你喜欢
    • 2020-09-28
    • 1970-01-01
    • 2022-01-18
    • 2019-08-11
    • 2014-10-19
    • 2015-04-10
    • 2019-07-28
    • 2020-12-31
    • 2017-12-30
    相关资源
    最近更新 更多