I have a server with sendmail and I need to send email througt PHP. I have an internal SMTP server on the same subnet, so I configured sendmail with FEATURE(
nullclient', mail.server.local')dnl
where mail.server.local is solved with an internal IP in /etc/hosts
There is no way that I can change the from
address and domain. It's always root@nameoftheserver.localhost.localdomain.
Mar 20 16:18:48 nameoftheserver sm-mta[16402]: v2KFImVi016402: from=<www-data@nameoftheserver.localdomain.local>, size=406, class=0, nrcpts=1, msgid=<201703201518.v2KFImVD016401@nameoftheserver.localdomain.local>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
The output of /etc/mail/sendmail.mc
:
(short domain name) $w = nameoftheserver
(canonical domain name) $j = nameoftheserver.localdomain.local
(subdomain name) $m = localdomain.local
(node name) $k = nameoftheserver
How I can change this values?