Solved E-mail rewrites from address

patrickkasie

Verified User
Joined
Sep 21, 2021
Messages
246
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

(mail-tester removed)
 
Last edited:
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
 
The one with the love reaction. I found the sendmail function sitting there in the default php.ini location and httpd.conf. I've edited both locations which led to the e-mails being fully verified. Thank you for the clue.
Thank you, appreciated. I remember doing something similar with the sendmail a while back which is why I mentioned it, but wasn't sure if it was also dependent on the new spoofing protection implemented by DA. I can add that to my little black book of tips and tricks now as working 😊

Glad you've got it sorted 😁🙏
 
Back
Top