I am setting up a Science Fair in a Box server that uses apache2, PHP5, and sendmail (although we've uninstalled sendmail and installed postfix with no change in problem ) to send participants their login / registration number.
When the PHP mail() is called it has the properly formatted FROM: address but because sendmail authenticates and is receiving it from www-data@localhost it is stripping out the email address and replacing it with <@> which causes the mail to be sent but filtered out by any server it sends to.
Here is the PHP output verbatim as what is sent to PHP mail():
2018-01-23,1516725176,[email protected],[email protected],Registration for Kiwanis Southeast Alberta Regional Science Fair,We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below Registration Number: 380285
This is the /var/mail/mail.log excerpt:
Jan 23 16:28:36 localhost sendmail: w0NGSaU2000813: Authentication-Warning: seab-sciencefair.com: www-data set sender to @ using -f Jan 23 16:28:36 localhost sendmail: w0NGSaU2000813: from=@, size=259, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost Jan 23 16:28:36 localhost sm-mta: w0NGSasq000814: from=<>, size=575, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=ip6-localhost [127.0.0.1] Jan 23 16:28:36 localhost sendmail: w0NGSaU2000813: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30259, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w0NGSasq000814 Message accepted for delivery) Jan 23 16:28:36 localhost sm-mta: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128 Jan 23 16:28:37 localhost sm-mta: w0NGSasq000814: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120575, relay=gmail-smtp-in.l.google.com. [126.96.36.199], dsn=2.0.0, stat=Sent (OK 1516724916 i8si684450iof.207 - gsmtp)
We have sent mail from the command line in the past so sendmail can send.
It is sending mail but the FROM: needs to be changed. So I interpret this as either a configuration problem or an apache2 alias problem.
I note this server is located on digitalocean, is this a cloud configuration issue?
What should I try next? Which software is the likely culprit?