Php Debian服务器的邮件功能问题

Php Debian服务器的邮件功能问题,php,email,server,debian,postfix,Php,Email,Server,Debian,Postfix,我有一台Debian服务器。我安装了postfix,并尝试执行以下命令: echo testing | mail -s Bla myemail@somewhere.com 这是有效的 但当我尝试使用PHP邮件功能时,它不会发送任何邮件 <?php // the message $msg = "First line of text\nSecond line of text"; // send email mail("myemail@somewhere.com","My subject"

我有一台Debian服务器。我安装了postfix,并尝试执行以下命令:

echo testing | mail -s Bla myemail@somewhere.com
这是有效的

但当我尝试使用PHP邮件功能时,它不会发送任何邮件

<?php
// the message
$msg = "First line of text\nSecond line of text";


// send email
mail("myemail@somewhere.com","My subject",$msg);
?>

有没有人有什么解决办法,或者我遗漏了什么?我遵循已经提出的问题,但它们并不能解决我的问题

Feb 27 12:26:53 vanni postfix/pickup[5702]: 96C259FC2B: uid=33 from=<www-data>
Feb 27 12:26:53 vanni postfix/cleanup[6377]: 96C259FC2B: message-id=<20170227112653.96C259FC2B@xxxx>
Feb 27 12:26:53 vanni postfix/qmgr[20579]: 96C259FC2B: from=<www-data@xxxx.ch>, size=363, nrcpt=1 (queue active)
Feb 27 12:26:54 vanni postfix/smtp[6379]: 96C259FC2B: to=<mymail@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1a]:25, delay=0.4, delays=0.03/0.01/0.19/0.18, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1a] said: 550-5.7.1 [2001:41d0:8:bda7::1] Our system has detected that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and 550-5.7.1 authentication. Please review 550-5.7.1  https://support.google.com/mail/?p=IPv6AuthError for more information 550 5.7.1 . 52si21027306wra.235 - gsmtp (in reply to end of DATA command))
Feb 27 12:26:54 vanni postfix/cleanup[6377]: 05E4DA0AB5: message-id=<20170227112654.05E4DA0AB5@vannitec>
Feb 27 12:26:54 vanni postfix/bounce[6380]: 96C259FC2B: sender non-delivery notification: 05E4DA0AB5
Feb 27 12:26:54 vanni postfix/qmgr[20579]: 05E4DA0AB5: from=<>, size=2760, nrcpt=1 (queue active)
Feb 27 12:26:54 vanni postfix/qmgr[20579]: 96C259FC2B: removed
Feb 27 12:26:54 vanni postfix/local[6381]: 05E4DA0AB5: to=<www-data@xxxx.ch>, relay=local, delay=0.02, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 27 12:26:54 vanni postfix/qmgr[20579]: 05E4DA0AB5: removed
Feb 27 12:26:53瓦尼后缀/拾取[5702]:96C259FC2B:uid=33 from=
Feb 27 12:26:53 vanni后缀/清除[6377]:96C259FC2B:消息id=
Feb 27 12:26:53 vanni后缀/qmgr[20579]:96C259FC2B:from=,size=363,nrcpt=1(队列活动)
2月27日12:26:54 vanni postfix/smtp[6379]:96C259FC2B:to=,relay=gmail smtp in.l.google.com[2a00:1450:400c:c07::1a]:25,delay=0.4,delays=0.03/0.01/0.19/0.18,dsn=5.7.1,status=bounched(主机gmail smtp位于.l.google.com[2a00:1450:400c:c07::1a]中)说:550-5.7.1[2001:41d0:8:bda7::1]我们的系统检测到此消息不符合有关PTR记录和550-5.7.1身份验证的IPv6发送指南。请查看550-5.7.1https://support.google.com/mail/?p=IPv6AuthError 有关更多信息,请参见550 5.7.1.52si21027306wra.235-gsmtp(回复数据结束命令))
Feb 27 12:26:54 vanni后缀/清除[6377]:05E4DA0AB5:消息id=
2月27日12:26:54 vanni后缀/跳出[6380]:96C259FC2B:发件人未送达通知:05E4DA0AB5
Feb 27 12:26:54 vanni后缀/qmgr[20579]:05E4DA0AB5:from=,size=2760,nrcpt=1(队列活动)
Feb 27 12:26:54 vanni后缀/qmgr[20579]:96C259FC2B:已删除
2月27日12:26:54瓦尼后缀/本地[6381]:05E4DA0AB5:to=,中继=本地,延迟=0.02,延迟=0/0.01/0/0,dsn=2.0.0,状态=已发送(已发送到邮箱)
2月27日12:26:54 vanni后缀/qmgr[20579]:05E4DA0AB5:已删除

php.ini sendmail路径配置是否正确?是否有/var/log/maillog或类似文件?里面有什么?@klepzers我没有配置任何东西。我直接与“邮件-s Bla”联系myemail@somewhere.com". 它成功了。可能是@klepzers的副本。我遵循本教程并添加了sendmail的路径。添加了“sendmail\u path=/usr/sbin/sendmail”和“sendmail\u from=”info@xxxx.com“在/etc/php5/apache2/php.ini中