ssmtp问题从命令行和php发送邮件

时间:2014-06-11 04:37:58

标签: php email sendmail ssmtp

我在命令行中遇到以下语句的问题:

echo 'Subject: test' | /usr/sbin/sendmail -v <myemail>@gmail.com

它返回以下内容:

# echo 'Subject: test' | /usr/sbin/sendmail -v <email>@gmail.com
[<-] 220 mail.xen.prgmr.com ESMTP Postfix
[->] HELO host.xen.prgmr.com
[<-] 250 mail.xen.prgmr.com
[->] MAIL FROM:<root@hostname.com>
[<-] 250 2.1.0 Ok
[->] RCPT TO:<<email>@gmail.com>
[<-] 554 5.7.1 <<email>@gmail.com>: Relay access denied
sendmail: RCPT TO:<<email>@gmail.com> (554 5.7.1 <<email>@gmail.com>: Relay access denied)

有关如何配置此实际发送的任何线索将不胜感激。这是一些/var/log/mail.log

Jun 11 02:28:47 host sendmail[29388]: alias database /etc/mail/aliases rebuilt by root
Jun 11 02:28:47 host sendmail[29388]: /etc/mail/aliases: 12 aliases, longest 10 bytes, 134 bytes total
Jun 11 02:28:48 host sm-mta[29446]: starting daemon (8.14.4): SMTP+queueing@00:10:00
Jun 11 02:29:54 host sendmail[30867]: alias database /etc/mail/aliases rebuilt by root
Jun 11 02:29:54 host sendmail[30867]: /etc/mail/aliases: 12 aliases, longest 10 bytes, 134 bytes total
Jun 11 02:29:57 host sm-mta[29446]: restarting /usr/sbin/sendmail-mta due to signal
Jun 11 02:29:57 host sm-mta[30913]: starting daemon (8.14.4): SMTP+queueing@00:10:00
Jun 11 02:33:09 host sendmail[31513]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 6: invalid argument to V line: "ERSIONID(\001Id: startt"
Jun 11 02:33:09 host sendmail[31513]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 7: invalid argument to V line: "ERSIONID(\001Id: autoco"
Jun 11 02:33:11 host sm-mta[30913]: restarting /usr/sbin/sendmail-mta due to signal
Jun 11 02:33:11 host sm-mta[30913]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 6: invalid argument to V line: "ERSIONID(\001Id: startt"

0 个答案:

没有答案