{"id":167,"date":"2019-05-13T11:22:38","date_gmt":"2019-05-13T11:22:38","guid":{"rendered":"https:\/\/blog.iabsolute.com\/?p=167"},"modified":"2019-05-13T11:22:38","modified_gmt":"2019-05-13T18:22:38","slug":"selinux-blocking","status":"publish","type":"post","link":"https:\/\/blog.iabsolute.com\/?p=167","title":{"rendered":"SELinux blocking"},"content":{"rendered":"\n<p>If you see an error like SMTP -&gt; ERROR: Failed to connect to server: Permission denied (13), you may be running into SELinux preventing PHP or the web server from sending email. This is particularly likely on RedHat \/ Fedora \/ Centos. Using the getsebool command we can check if the httpd daemon is allowed to make a connection over the network and send an email:<br>\ngetsebool httpd_can_sendmail<br>\ngetsebool httpd_can_network_connect<br>\nThis command will return a boolean on or off. If it\u2019s off, we can turn it on:<br>\nsudo setsebool -P httpd_can_sendmail 1<br>\nsudo setsebool -P httpd_can_network_connect 1<br>\nIf you\u2019re running PHP-FPM via fastcgi, you may need to apply this to the fpm daemon rather than httpd<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you see an error like SMTP -&gt; ERROR: Failed to connect to server: Permission denied (13), you may be running into SELinux preventing PHP or the web server from sending email. This is particularly likely on RedHat \/ Fedora &hellip; <a href=\"https:\/\/blog.iabsolute.com\/?p=167\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-google-cloud"],"_links":{"self":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167"}],"version-history":[{"count":1,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}