PHP mail() function

Discussion in 'ISPConfig 3 Priority Support' started by BobGeorge, Sep 13, 2017.

  1. BobGeorge

    BobGeorge Member

    There's a contact form on one of the websites that I've moved over to our servers, which is basically using the PHP "mail()" function to send the messages to a designated email address, but the emails aren't getting there.

    When I set up postfix - following a "perfect server" tutorial for Ubuntu 16.04 - I remember adding a line "permit_sasl_authenticated, reject" in the "master.cf" file. I'm wondering if this is the problem, as the raw PHP mail() function will be being sent from nobody - the server itself - and, thus, I guess is not permitted, as it can't authenticate as anyone.

    I'd like to solve this at the Postfix / PHP mail() function level - rather than a specific solution for this one contact form - so that when, inevitably, someone else wants to have a contact form or whatever on their website too in future, it should "just work".
     
  2. BobGeorge

    BobGeorge Member

    I just tried "sendmail" from the command line and then looked at the "mail.log". Amavis is blocking it as spam, I think.

    Although, I changed it to "D_PASS" instead of "D_DISCARD" in the settings and restarted, so it ought to be just tagging mails it thinks are spam, not just throwing them away.

    Still not seeing it. Unless maybe the receiving mail server is also throwing it away as spam too.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP mail() functions works fine here on my perfect server systems, there are no further settings required. Please post the complete lines from mail.log file that you get when you send an email with php mail() function on the server.
     

Share This Page