E-mail rewrites from address

patrickkasie

Verified User
Joined
Sep 21, 2021
Messages
245
Location
Een echte Hollander
Dear DirectAdmin,

I have a customer with a form on their website. They use an inquiry form and it looks like the e-mail is sending. However, the server rewrites the from: header to its user/hostingpackage even though it's from info@. Either exim or DirectAdmin or both are rewriting the header. I am not sure what to do here or how to properly ask the question.

Kind regards,

Patrick

 
Are they using PHP Sendmail to send the email or are they using SMTP? Personally, all my WP sites i've ever created, i've used SMTP plugin to ensure the mail sends and arrives from an authenticated email address as I don't trust PHP Sendmail function 100%. Using a plugin would 100% sort this imo.
 
I see, I think that's so that sender spoofing can't happen.

Try creating a .user.ini file in the root directory of the domain. In it, and in it put:

Bash:
sendmail_path = "/usr/sbin/sendmail -t -i -f [email protected]"
(using the correct path for your PHP version)

-t Reads the recipient from the headers, -i ignores lines with just . and -f sets the envelope sender. This is the flag that should change the address in the header being sent,

Also see this in the DA Changelogs, this may help also. This is the article on the new anti spoofing features
 
Back
Top