• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

how to disable selinux? PHP Qmail problem

T

tommyw

Guest
I've tried several things to get the PHP mail function to run on my server. I think I've tracked the issue to Selinux.

I would like to disable it - I know, it's better not too, but I need this fixed and I'm not a linux guru..

I can't seem to login to my SSH shell, is there a way through Virtuozzo to disable Selinux?

And can anyone clue me into why will my SSH client not log me in? it opens the Java window, but can't connect.
 
just to clarify, I'm on Virtuozzo on a server with Fedora-core 4, PHP 5, Qmail.
If that helps.

I've already set the PHP.ini sendMail_path to "/var/qmail/bin/sendmail" and "/var/qmail/bin/qmail-inject", neither of which worked.
 
I have the same problem, and wasn't able to fix it, as qmail maintainers are not interested in SELinux, or so I was told in chat. It is too bad I cannot install grsecurity (for some reason, system with patched kernel won't boot) and cannot afford ART's great pre-compiled kernels right now, because this leaves SELinux as my only option to add a bit of protection to some critical services.

Chrooting apache in Plesk seems also not to be an easy thing to do.

Anyhow, I investigated this permission problems a bit, and it seems that the domain transition specified in plesk.te (Plesk SELinux policy) is causing some trouble with sendmail when it is used from a php script.
 
I never did disable Selinux, or get the mail function to work. But I was able to install PHPMailer (open source & free!) and got that to work.

http://phpmailer.sourceforge.net/

Which makes me feel better, because I still have the security of Selinux, and a host of added features that PHPMailer provides.

To get PHPMailer to work, I had to set the include path like this:

ini_set('include_path', '/var/www/vhosts/mydomain.com/httpdocs/phpMailer');

Hope that helps anyone else with this issue.
 
Yes, this can be done. You are basically using the SMTP server instead than sendmail in this way, if I am not wrong.

But SWSoft should also update their policy, as the problem seems to lie in the domain transition of the plesk.te policy from httpd script type to sendmail type. It is like sendmail is trying to perform actions that should be done by httpd.
 
Back
Top