Ubuntu – Using Exim and Google Apps email as smarthost

emaileximg-suitesmarthostUbuntu

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).

Best Answer

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...

Related Topic