• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

PHP QMAIL Issues

T

tha_mink

Guest
PHP QMAIL Issues NOW FIXED~!!!

We are attempting to migrate from our old non-Plesk server to our new Plesk server (Fedora core-[3?]) and can't seem to get PHP to find the qmail wrapper for sendmail.

I can see the wrapper at /usr/sbin/sendmail which points to /var/qmail/bin/sendmail and everything is chmoded the way it should be but when you ask php if that file exists, you get a false return.

So...

PHP:
<?
include("inc/testHead.php");
if (@file_exists("/usr/sbin/sendmail")==true){
	print"<p>Got Qmail</p>";
}else{
	print"<p>No Qmail</p>";
}
include("inc/testFoot.php");
?>

Returns "No Qmail". In addition, php's native mail() funcition doesn't work. PHP.INI is reporting sendmail path to be correct to the qmail wrapper.

Can't seem to figure this one out. I've even tried to send mail with PEAR's mail classes to no avail.

Anyone?
 
I'm having the same problem. Does anyone else know the answer?
 
From the info you gave I don't konw why PHP can't find sendmail, but from experience,
file_exists("/usr/sbin/sendmail")
would give an open_basedir error as /usr/sbin/ is outside your document root.
 
hmm.... I dunno.

This is a major set back because I cant send email form php. NO BUENO!

If anyone has any suggesstions I"d appreciate it.

Thanks
 
Post or PM a link to a phpinfo file please ... or at least let us know the open_basedir value set in your php.ini.
 
I assume that I would not want to add /usr/sbin to my open_basedir directive though since that could open a whole other can of worms. Plus, I thought that PHP bypassed the open_basedir directive where sendmail is concerned.

By the way, I have been able to send mail using the pear Mail package but would still love to figure out how to make the simple mail() function work.

My open_basedir is not set to include /usr/sbin but I don't get the open_basedir error. (even if I crank error reporting all the way up.) The thing is...when I use mail(), I get NO errors...it just won't sent failing silently.
 
It's fixed. Huzzah....

UPDATE:

I have finally fixed the problem with my mail() function. Even though I had the qmail wrapper installed and linked correctly, it still didn't work. I fixed it by changing the sendmail path in php.ini to

/var/qmail/bin/qmail-inject

It's all better now. That should be documented somewhere or fixed. I wonder if it's an apache "follow_symlinks" deal or if it has something to do with php not liking to execute symlinks. Whatever it is...it's fixed now. I hope all of you with the same problem can get yours fixed as well.
 
Same error but no solution

We are getting the same error but the solutions posted here didn't get us any closer... anyone have additional things to try?
 
We got this tracked down. The new default SE Linux settings in Red Hat ES4 were messing with the permissions we were accustomed to on our ES 3 server. Once we tweaked those a bit everything started working.
 
Thanks ... We've actually got selinux disabled on our FC 3 box. PHP mail works after I edited the path to sendmail in the php.ini file, but it is extremely slow (takes a few hours to send a PHP email).

Any ideas?
 
After we figured out the SE linux was messing things up we didn't need to make any changes from the default Plesk settings.

An hour is a long time. The only thing I can think of would be this: http://kb.swsoft.com/article_22_298_en.html

We have to reset this everytime we touch the main mail settings from within Plesk.

Hope that helps.
 
Back
Top