AWS Linux服务器的SMTP问题

我几乎没有使用SMTP的经验,并遇到一些麻烦,让我的Drupal网站发送电子邮件。 在发生错误之前进行的唯一更改是将CloudFront添加到实例。 几个月后,我们改变了电子邮件收件人,并停止工作。

从var / log / mailloglogging错误:

Feb 1 20:27:43 ip-10-0-0-127: from=apache, size=860, class=0, nrcpts=3, msgid=<2017@ip-10-0-0-127>, relay=apache@localhost Feb 1 20:27:44 ip-10-0-0-127: from=<apache@ip-10-0-0-127>, size=1043, class=0, nrcpts=3, msgid=<2017@ip-10-0-0-127>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Feb 1 20:27:44 ip-10-0-0-127: [email protected],[email protected],[email protected], ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=90860, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Message accepted for delivery) Feb 1 20:27:49 ip-10-0-0-127: STARTTLS=client, relay=mail-in.cc.l.columbia.edu., version=TLSv1/SSLv3, verify=FAIL, cipher=, bits=256/256 Feb 1 20:27:49 ip-10-0-0-127: to=<[email protected]>,<[email protected]>,<[email protected]>, ctladdr=<apache@ip-10-0-0-127> (48/48), delay=00:00:06, xdelay=00:00:05, mailer=esmtp, pri=181043, relay=mail-in.cc.l.columbia.edu. [128.00.000.000], dsn=5.6.0, stat=Data format error Feb 1 20:27:49 ip-10-0-0-127: DSN: Data format error Feb 1 20:27:49 ip-10-0-0-127: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32235, dsn=2.0.0, stat=Sent 

以下从端口25删除油门后:

 to=<[email protected]>, delay=00:16:00, xdelay=00:16:00, mailer=esmtp, pri=34406, relay=xxxxxxx.cloudfront.net. [54.192.19.124], dsn=4.0.0, stat=Deferred: Connection timed out with xxxxxxx.cloudfront.net. adsl-static.isp.belgacom.be [81.xxx.xx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Fems.dsrtg.gov.tw [117.xx.xxx.xxx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA 

在AWS的安全组中,我打开了SMTP 25和SMTPS 465的端口:

 netstat -ntlp | grep sendmail tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2180/sendmail 

参考: http : //www.golinuxhub.com/2013/06/statdeferred-connection-timed-out.html

将我的sendmail.mc文件更改为以下内容:

 DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl 

复制这些更改并使用以下命令重新启动邮件服务:

 m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf service sendmail restart 

将我的ect / host文件更改为:

 127.0.0.1 localhost 54.192.37.15 site.school.edu site 

参考: https : //www.drupal.org/node/1155

最后一件我忘了提及! 该域名指向site.cloudfront.net域名。 希望这可以帮助。

还有什么我失踪,可以帮助解决这个问题?

谢谢,

Cloudfront对SMTP没有任何影响。

Amazon将传出SMTP作为垃圾邮件拦截的一部分进行限制: https : //aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/

您可以请求将油门从该页面的链接中解除。