In the newer Fedoras (and perhaps other Linux installations). SELinux is set to enforce by default, one of the areas you'll notice this causing issues is with mail (whether connecting via port 25 to SMTP, or using PHP mail().
The solution to both of these scenarios is as follows:
To allow PHP/Apache to connect to port 25 issue the following commands as root:
setsebool -P httpd_can_network_connect=1
To allow PHP mail() to work issue the following command as root:
setsebool -P httpd_can_sendmail=1
This should fix both issues.
The solution to both of these scenarios is as follows:
To allow PHP/Apache to connect to port 25 issue the following commands as root:
setsebool -P httpd_can_network_connect=1
To allow PHP mail() to work issue the following command as root:
setsebool -P httpd_can_sendmail=1
This should fix both issues.
本文介绍了解决Fedora系统中SELinux限制邮件发送的方法。通过设置SEBool参数,允许Apache或PHP通过端口25发送邮件,并启用PHP mail()函数。这些步骤能够帮助用户解决邮件发送受阻的问题。

310

被折叠的 条评论
为什么被折叠?



