💾 Archived View for chirale.org › 2013-04-24_1078.gmi captured on 2024-07-08 at 23:28:27. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-12)

-=-=-=-=-=-=-

Apache CentOS 6 cannot send email and Drupal get HTTP request status fails

I’m installing a Pressflow 6 on a new machine running CentOS I’m using Apache MPM Worker with FastCGI. Then I get the classical e-mail error:

Unable to send e-mail. Please contact the site administrator if the problem persists.

Then I try to use sendmail:

 sendmail -v yourmail@example.com < testmail 

Where testmail is a file containing these lines:

Subject: test mail Ozu Yasujiro Ozu [blank line here]

And i get the message. PHP cannot send email through apache!

Trying a simple php script to send mail like drupal core do I got this error:

simple php script to send mail like drupal core

sendmail: fatal: chdir /var/spool/postfix: Permission denied

Then I check this variable following this awesome post:

this awesome post

# /usr/sbin/getsebool httpd_can_sendmail httpd_can_sendmail --> off

Enable httpd_can_sendmail solve this issue:

setsebool -P httpd_can_sendmail 1

And wait. It will be a long wait using the -P option. And then PHP and Drupal can send mail.

Then check again the variable:

# /usr/sbin/getsebool httpd_can_sendmail httpd_can_sendmail --> on

Now httpd can send mail. Try your script again.

The SMTP Authentication Support module is not working. This is another of these variables, the same that causes Drupal to show the “HTTP request status fails” message.

setsebool -P httpd_can_network_connect 1

And wait again. Both the SMTP module and the base Drupal networking are now working and Status report is all green.

https://web.archive.org/web/20130424000000*/http://pastebin.com/v0ZfWQ3T

https://web.archive.org/web/20130424000000*/http://www.simplemachines.org/community/index.php?topic=446074.0