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 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题