SMTP Not Working Correctly After Install

Discussion in 'Installation/Configuration' started by Unfaiir, Jul 22, 2012.

  1. Unfaiir

    Unfaiir Member

    PHP Mail Returning False But Still Sends

    I have a fresh install of ISPConfig 3 on CentOS 6.3, thanks to the awesome tutorial here

    I'm having some issues with PHP mail not behaving well. PHP mail() is returning false, however, the mail still is being sent successfully. This is an issue however because scripts need to know that mail was successful. I'm not sure why this is happening. The php script is very simple and just sends an email using the mail() function. I'm using mod_php for the site. Here is my /var/log/maillog after this happens which I am having trouble interpreting. Can anyone help me figure out what is going on here?

    Last edited: Jul 22, 2012
  2. Unfaiir

    Unfaiir Member

    Fixed But I Still Don't Understand

    I was able to resolve the issue of PHP mail() returning false upon success and success upon failure as follows.

    In my php.ini I had:

    So the first thing I did was check the sendmail function in /usr/lib and I found three sendmail functions:

    So I just decided to follow the /usr/lib/sendmail link to see where it was going and found this:

    It appears that it eventually leads back to the old sendmail version of the sendmail function. So I went into /etc/php.ini and made the change:

    Then restarted httpd and now the PHP mail() function is returning true upon success and false upon failure as it should! Hope this helps someone else just installing ISPConfig 3 and having a similar issue.

Share This Page