By Guest on Tuesday, 17 March 2026
Posted in DirectAdmin
Replies 6
Likes 0
Views 637
Votes 0
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.
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
The customer is using a proprietary code and it's not as simple as plugging the code. Also, during the attempt of sending the e-mail, it changes the from address even though the logs show it's coming from info@domain.com, being changed to hostingpackage@domain.com. This happens between the PHP mailer and DirectAdmin/Exim.
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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:



sendmail_path = "/usr/sbin/sendmail -t -i -f info@domain.com"

(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

DA Docs
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
@patrickkasie Just curious, what one of the above did you use as a solution?
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
@patrickkasie Just curious, what one of the above did you use as a solution?

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.
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·

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 😁🙏
·
2 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post