doucan8521 2014-02-14 10:36
浏览 98
已采纳

无法在CentOS VM上使用PHP 5.3发送带有sendmail的电子邮件

I have a longstanding issue on my CentOS 5.6 VM where I am unable to send email from my PHP application.

This is the last bunch of lines from my /var/log/maillog file.

Feb 14 10:29:16 dev53 sendmail[4637]: s1EATEEo004637: Authentication-Warning: www.craig.dev-crmpicco.lan: apache set sender to client.care@crmpicco.co.uk using -f
Feb 14 10:29:16 dev53 sendmail[4637]: s1EATEEo004637: from=client.care@crmpicco.co.uk, size=11017, class=0, nrcpts=0, msgid=<1392373753.d4a897919a124958e699170b2b1dc8f2@PHPMAILSERVER>, relay=apache@localhost
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: Authentication-Warning: www.craig.dev-crmpicco.lan: apache set sender to client.care@crmpicco.co.uk using -f
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: from=client.care@crmpicco.co.uk, size=9507, class=0, nrcpts=1, msgid=<1392373756.8e5e15c4e6d09c8333a17843461041a9@PHPMAILSERVER>, relay=apache@localhost
Feb 14 10:29:16 dev53 sendmail[5135]: s1EATGpY005135: from=<client.care@crmpicco.co.uk>, size=9684, class=0, nrcpts=1, msgid=<1392373756.8e5e15c4e6d09c8333a17843461041a9@PHPMAILSERVER>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: to=cmorton@crmpicco.co.uk, ctladdr=client.care@crmpicco.co.uk (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=39507, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s1EATGpY005135 Message accepted for delivery)
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATGpY005135: to=<cmorton@crmpicco.co.uk>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=129684, relay=smx1.crmpiccov3.co.uk. [217.158.143.122], dsn=5.7.1, stat=User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATGpY005135: s1EATIpY005199: DSN: User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpY005199: to=<client.care@crmpicco.co.uk>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=40917, relay=smx1.crmpiccov3.co.uk. [217.158.143.122], dsn=5.7.1, stat=User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpY005199: s1EATIpZ005199: return to sender: User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpZ005199: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=41941, dsn=2.0.0, stat=Sent

I know for certain that the issue is not with the PHP code as the exact same code works in the office, however when WFH (on a seperate VM with the same code) I am unable to send emails.

I am trying to establish if this is because of my sendmail setup, IP whitelisting at the mail server end or hosts file setup or anything like that?

Note: I have masked the true name of the domain for security reasons for this post.

  • 写回答

1条回答 默认 最新

  • doubushi0031 2014-02-28 11:19
    关注

    This turned out to be an issue with the company mail server having a list of trusted relays.

    It required me to connect to a company VPN via my VM (by installing vpnc) and then providing the company with the VPN IP to add to the list of trusted relays.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧