我正在使用CentOS,我正在尝试使用谷歌应用程序为我网站上的联系人提交页面发送邮件。我设置了sendmail.mc文件和auth文件以使用google apps帐户,如果我转到命令行并输入echo“test”|邮件myemail@gmail.com它发送罚款。但是,当我使用php做同样的事情时,它不会发送。以下是我的maillog文件的最后几个日志,2165-68是命令行,之后是php邮件功能:
May 11 22:51:17 mydomain sendmail[2165]: p4C2pHQj002165: from=root, size=29, class=0, nrcpts=1, msgid=<201105120251.p4C2pHQj002165@mydomain.com>, relay=root@localhost
May 11 22:51:17 mydomain sendmail[2166]: p4C2pHJT002166: from=<root@mydomain.com>, size=305, class=0, nrcpts=1, msgid=<201105120251.p4C2pHQj002165@mydomain.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 11 22:51:17 mydomain sendmail[2165]: p4C2pHQj002165: to=myemail@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30029, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p4C2pHJT002166 Message accepted for delivery)
May 11 22:51:17 mydomain sendmail[2168]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128
May 11 22:51:18 mydomain sendmail[2168]: p4C2pHJT002166: to=<myemail@gmail.com>, ctladdr=<root@mydomain.com> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120305, relay=smtp.gmail.com [74.125.45.109], dsn=2.0.0, stat=Sent (OK 1305168678 h44sm419042yhm.46)
May 11 22:51:42 mydomain sendmail[2170]: p4C2pgmR002170: Authentication-Warning: mydomain.com: apache set sender to contactForm@mydomain.com using -f
May 11 22:51:42 mydomain sendmail[2170]: p4C2pgmR002170: from=contactForm@mydomain.com, size=79, class=0, nrcpts=1, msgid=<201105120251.p4C2pgmR002170@mydomain.com>, relay=apache@localhost
May 11 22:51:42 mydomain sendmail[2171]: p4C2pgqd002171: from=<contactForm@mydomain.com>, size=434, class=0, nrcpts=1, msgid=<201105120251.p4C2pgmR002170@mydomain.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 11 22:51:42 mydomain sendmail[2170]: p4C2pgmR002170: to=webmaster@mydomain.com, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30079, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p4C2pgqd002171 Message accepted for delivery)
May 11 22:51:42 mydomain sendmail[2172]: p4C2pgqd002171: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30626, dsn=2.0.0, stat=Sent