doucao1066 2018-11-12 19:58
浏览 119

无法通过php邮件,AWS ubuntu实例,sendmail发送邮件

I have AWS ubuntu instance. I am trying to send simple mail through PHP mail function. Mail function returns true but mail is not delivered neither to gmail nor to my host. I also tried sending email through command but that also doesnt work. I am attaching sendmail service status here. Kindly help me to fix this problem.

  1. sendmail status for gmail:

Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128 Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021444: to=<mymail@gmail.com>, ctladdr=<www-data@ip-172-31-51-198.ec2.internal> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021444: wACJfNOM021446: DSN: Service unavailable Nov 12 14:41:23 ip-172-31-51-198 sm-mta[21446]: wACJfNOM021446: to=<www-data@ip-172-31-51-198.ec2.internal>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

  1. send mail status for mydomain.com

    Nov 12 14:40:02 ip-172-31-51-198 systemd[1]: Stopped LSB: powerful, efficient, and scalable Mail Transport Agent. Nov 12 14:40:02 ip-172-31-51-198 systemd[1]: Starting LSB: powerful, efficient, and scalable Mail Transport Agent... Nov 12 14:40:02 ip-172-31-51-198 sendmail[21348]: * Starting Mail Transport Agent (MTA) sendmail Nov 12 14:40:02 ip-172-31-51-198 sm-mta[21388]: starting daemon (8.15.2): SMTP+queueing@00:10:00 Nov 12 14:40:04 ip-172-31-51-198 sendmail[21348]: ...done. Nov 12 14:40:04 ip-172-31-51-198 systemd[1]: Started LSB: powerful, efficient, and scalable Mail Transport Agent. Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlI021408: <myemail@mydomain.com>... User unknown Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlI021408: from=<www-data@ip-172-31-51-198.ec2.internal>, size=596, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21408]: wACJeHlK021408: from=<>, size=2592, class=0, nrcpts=1, msgid=<201811121940.wACJeHpa021407@ip-172-31-51-198.ec2.internal>, proto=ESMTP, daemon=MTA, r Nov 12 14:40:17 ip-172-31-51-198 sm-mta[21409]: wACJeHlK021408: to=<www-data@ip-172-31-51-198.ec2.internal>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32835, dsn=2.0.0, stat=Sent

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 vhdl+MODELSIM
    • ¥20 simulink中怎么使用solve函数?
    • ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
    • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
    • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
    • ¥15 知识蒸馏实战博客问题
    • ¥15 用PLC设计纸袋糊底机送料系统
    • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
    • ¥15 用C语言输入方程怎么
    • ¥15 网站显示不安全连接问题