Tuesday, February 10, 2015

CentOS 7 send email when hosting Drupal or Magento

Get the current SELinux setting:
# getsebool httpd_can_sendmail
# sestatus -b | grep httpd_can

Set the SELinux setting:
# setsebool httpd_can_sendmail 1
# setsebool httpd_can_network_connect 1

Set the SELinux setting (permanently):
# setsebool -P httpd_can_sendmail 1
# setsebool -P httpd_can_network_connect 1

Send a testing email:
# cat testmail
Subject: test
test

# sendmail -v yourmail@example.com < testmail

Check mail queue:
# mailq

Reference:

https://www.drupal.org/node/1593684
http://www.how2centos.com/disable-selinux-centos-6/

No comments: