Php

無法讓 Postfix 在 Centos 上執行

  • August 22, 2011

我在讓 PHP 在 CentOS Linux 5.6 上通過 Postfix 發送郵件時遇到問題。

我有 Postfix 2.3.3 版,它是隨 Yum 一起安裝的。我還按照教程安裝了 Dovecot,但我不確定我是否需要這個來通過 SMTP 發送。

當 PHP mail() 命令執行時,我在**/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**中輸入了一些配置設置更改: http ://wiki.centos.org/HowTos/postfix

在**/etc/php.ini**我有這個:

sendmail_path = /usr/sbin/postfix -t -i

有人對此*“送出郵件,使用 Postfix sendmail 命令”*錯誤有任何想法嗎?

使用 Sendmail 會更好嗎?我被告知 Postfix 更簡單!

乾杯:)

另外…(可能相關),

chkconfig –level 345 dovecot on

返回這個:

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 系統。

而且,順便說一句,不,您不需要 Dovecot 通過 SMTP 發送郵件。

引用自:https://serverfault.com/questions/303718