Re: PHP mail() w/ postfix problem in FC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mo, den 10.01.2005 schrieb Nathaniel Price um 17:21:

> I recently did a clean install of FC3 on a server that was running RH8. 
> There were a number of PHP scripts that I had configured to send out 
> email for notices or passwords or the like. However, now that I've 
> upgraded I can't send mail through the mail() command in PHP.
> 
> My problem is exactly like what I found here, but unfortunately that 
> question was left unanswerd: 
> https://www.redhat.com/archives/fedora-list/2004-December/msg06708.html
> 
> To summarize, I have no problem sending email via SMTP (one of the apps 
> I run has the option to choose between using PHP mail() or using it's 
> own SMTP client). Whenever I try to send mail with mail(), apache logs 
> the following error:
>     sendmail: fatal: chdir /var/spool/postfix: Permission denied
> Postfix logs nothing.
> 
> I have checked the permissions on the /var/spool/postfix directory, and 
> they seem to be in order:
>     drwxr-xr-x  16 root   root    4096 Nov 23 05:11 postfix
> 
> php.ini is configured with:
>     sendmail_path = /usr/sbin/sendmail -t -i
> 
> /usr/sbin/sendmail is a link to /etc/alternatives/mta which is a link to 
> /usr/sbin/sendmail.postfix. All of these are world readable and executable.
> 
> This setting is not overriden anywhere else (tested with phpinfo()).
> 
> Does anyone know what's wrong and how to fix it? If not, is there a 
> drop-in replacement for the sendmail command that will just forward the 
> request to postfix via SMTP?

> Nathaniel

The "problem" is SELinux. You will find audit / avc messages in the
/var/log/messages syslog log file when you get above mentioned
permission denied message in the Apache log. This is because Apache is
not allowed to use the Postfix sendmail binary.

http://fedora.redhat.com/docs/selinux-apache-fc3/

Else, if above does not help to modify the default policy, I would think
the question may be best asked on the

Fedora SELinux support list for users & developers.
<fedora-selinux-list@xxxxxxxxxx>

mailing list - if this posting does not come to the real SELinux
professionals' attention.

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp 
Serendipity 17:28:17 up 18 days, 19:12, load average: 0.44, 0.48, 0.54 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux