1

I have a server setup to use exim4 and google apps as my smarthost. But I get errors when the to address is not the one I use to authenticate to google and it seems to drop all return addresses that are not the one it uses to authenitcate.

Example: On the contact form of my server a user sets user@company1.com as their return address and uses the form to send a message.

I get an email sent to the admin's address admin@myCompany.com but the return address is also now admin@myCompany.com I have no idea of the return address the user set on the form.

I get around this by putting a bad email address in the form's default so Exim4 sends an error message to admin@myCompany.com with the user's email in the debug info.

Clearly I either have it set up wrong or do not understand how smarthosts work (probably both).

pferrel
  • 11
  • 2

2 Answers2

1

If you use Google as a smarthost, they will set the From: address to the address you used to authenticate to Google. They do this on purpose, presumably to prevent spam. If you need a smarthost to forward your mail without altering your headers, I recommend Mailhop Outbound - I used them before and never had any issues...

BenGC
  • 1,775
  • 15
  • 26
0

As the poster mentions above, Google definitely will be restricting the envelope sender and the header From, or else it would lead to widespread abuse.

This problem can solved at a couple of other places, one is your form script, where you can add the form sender in the data itself or else if you want to solve this in exim, I would suggest you write a system filter using the exim filter language which would strip out the From and envelope sender and put in the correct email address for the From and add the form email in a header like X-Form-Submitter-Email.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
Ganesh KM
  • 1
  • 1