我在使用PHP在CentOS Linux 5.6上通过Postfix发送邮件时遇到了问题。
我有Postfix 2.3.3版本,安装了Yum。 我也按照教程安装了Dovecot,不过我不确定是否需要通过SMTP发送。
当PHP邮件()命令运行我得到这个在/ var / log / maillog :
Aug 22 10:30:57 ade1 postfix[5798]: error: to submit mail, use the Postfix sendmail command Aug 22 10:30:57 ade1 postfix[5798]: fatal: the postfix command is reserved for the superuser
我安装了Webmin,以下是SMTP设置页面: http : //dl.dropbox.com/u/618674/_perma/2011-08/webmin-postfix-smtp.png
根据本教程,我在/etc/postfix/main.cf中input了一些configuration设置更改: http : //wiki.centos.org/HowTos/postfix
在/etc/php.ini我有这个:
sendmail_path = /usr/sbin/postfix -t -i
任何人有关于“提交邮件,使用Postfix的sendmail命令”错误?
使用Sendmail会更好吗? 我被告知Postfix更简单!
干杯:)
也…(可能有关),
chkconfig –level 345 dovecot
返回这个:
failed to make symlink /etc/rc0.d/K74lvm2-monitor: File exists failed to make symlink /etc/rc1.d/S26lvm2-monitor: File exists failed to make symlink /etc/rc2.d/S26lvm2-monitor: File exists failed to make symlink /etc/rc3.d/S26lvm2-monitor: File exists failed to make symlink /etc/rc4.d/S26lvm2-monitor: File exists failed to make symlink /etc/rc5.d/S26lvm2-monitor: File exists failed to make symlink /etc/rc6.d/K74lvm2-monitor: File exists failed to make symlink /etc/rc0.d/K35dovecot: File exists failed to make symlink /etc/rc1.d/K35dovecot: File exists failed to make symlink /etc/rc2.d/K35dovecot: File exists failed to make symlink /etc/rc3.d/S65dovecot: File exists failed to make symlink /etc/rc4.d/S65dovecot: File exists failed to make symlink /etc/rc5.d/S65dovecot: File exists failed to make symlink /etc/rc6.d/K35dovecot: File exists failed to make symlink /etc/rc3.d/S65dovecot: File exists failed to make symlink /etc/rc4.d/S65dovecot: File exists failed to make symlink /etc/rc5.d/S65dovecot: File exists
Sendmail软件和/usr/sbin/sendmail
是发送邮件的标准化接口之间的混淆。 将sendmail_path
恢复为默认值,一切都会好起来的。 Postfix提供了一个与sendmail
兼容的包装器,它可以把邮件送入Postfix系统。
顺便说一下,不,你不需要通过SMTP发送邮件。