解决CentOS下无法发送邮件的问题 + selinux
2017-09-28 15:34
363 查看
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.
相关文章推荐
- 解决CentOS下无法发送邮件的问题
- 解决CentOS下无法发送邮件的问题
- 解决Domino双网卡无法发送Internet邮件的问题
- MediaWiki无法发送邮件问题的解决($wgSMTP 及邮箱设置)
- TD无法发送邮件问题的解决
- 解决Sendmail无法发送邮件的问题
- Centos安装Postfix解决Contact Form7无法发送邮件
- 终于完全解决了,关于Mail无法发送邮件的问题(转载)
- 解决WordPress邮件无法发送问题
- 解决Exchange 2007 无法在虚拟机发送邮件的问题
- OJ系统-解决无法发送邮件的问题
- 使用 Mailx 通过 SMTP 在 Centos 上发送邮件,解决 WordPress 发送邮件问题,解决centos7不能发送邮件的问题
- phpMailer在CentOS 6.5下无法发送邮件的解决办法
- 关于GMAIL无法发送邮件问题解决的办法
- 解决wordpress无法发送邮件的问题|配置好WP-Mail-SMTP的前提
- 关于在使用Exchange2003系统时无法向sina,yahoo,hotmail等邮箱发送邮件问题的解决方法
- 2个方法解决LINODE VPS无法发送邮件的问题
- 解决在CentOS6.5下安装OpenStack(Icehouse版本 )出现的glance服务无法正常工作的问题
- MaCfee导致Asp.net无法发送邮件的解决办法
- 解决windows系统下php.ini邮件配置正确不发送邮件的问题