Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have linked the domain of our company to Google Apps and we also have a Kerio Connect (mail server) installed in our company which uses Google as SMTP relay. As google requires SMTP authentication we use one of our mail addresses for authentication. But it causes google to substitute "From" header with the address of the user used for authentication.

For example, we want to send email from user1@company.org. User smtp@company.org is used for SMTP authentication in SMTP Relay settings of Kerio Connect mail server. The mail gets delivered, but on recipient side it says that the message is from smtp@company.org, though it was actually sent from user1@company.org (Reply-to header is also set to smtp@company.org :( ).

In the "Sending mail from a different address" section of Gmail help there is an explanation of how I can send email from, say, user1@domain.com when user2@domain.com is used for authentication. - They say I need to sign up to Gmail with user2@ and add user1@ as another mail address I own (Mail settings -> Accounts -> "Send mail as" section). And it works. For example, when I sign up with smtp@company.org and add user1@company.org as another mail address I own, then I can send email from user1@company.org using smtp@company.org for authentication, and the recipient will see that the message is sent from user1@company.org.

But what if I have a hundred of email addresses on the domain? I don't want to add those 100 addresses in the settings.
I just want that any user (*@company.org) could send email using smtp@company.org user for authentication and I want recipient to see that the message is sent from *@company.org, not smtp@company.org.

Is there an easy way to do that?

share|improve this question
1  
why do you need to use gmail as your relay? –  gravyface Oct 18 '11 at 0:45
    
gravyface, well, I can't use local mail server (Kerio Connect) because many other mail server's will not accept my emails because will not count my local smtp server as trusted. And I can't use my domain hosting's (Hostgator, for example) smtp relay, because now my domain MX record points to google. So, as I understand, I have to use either gmail, or another commercial smtp relay. –  nightcoder Oct 18 '11 at 1:00
    
Why not just configure your clients to send directly to google, instead of through your relay? I don't see why you think you need your local Kerio server anymore at all. –  Jed Daniels Oct 18 '11 at 3:31
    
I would just setup SPF records and make sure you have reverse DNS setup at your office and you should be good to go to send out mail directly. Either that, or have the clients send directly out via Google in their Outlook/mail client's SMTP settings as JedDaniels suggested. –  gravyface Oct 18 '11 at 11:58

4 Answers 4

https://support.google.com/a/answer/2956491?hl=en&ref_topic=2921034

they do provide what you want if you look

share|improve this answer

Ask Google. And as they provide you a way to get this accomplished you should follow their guide. If you don't like the way they do then you have to complain to them. Or change the provider.

share|improve this answer

I've looked into the same situation and you cannot use Google Apps as an outbound relay the way you want.

The situation may be different if you sign up for Postini, I haven't really looking into that service.

Changing your MX records to send INCOMMING mail to Google Apps, doesn't have any effect on your OUTGOING mail. You can send it from any server you want, ie use your host or your ISP.

A few things to be careful of: 1) Make sure your SMTP server has a reverse lookup entry. 2) Make sure your SMTP server name resolves the the same address as the server, ie if EHLO is SMTP.yourdomain.com.au, then an nslookup for SMTP.yourdomain.com.au needs to match the address. 3) If you're using SPF, make sure you include your non-Google SMTP servers in the TXT record (as well as the Google settings). 4) Ditto if you're using DKIM.

1 & 2 will make sure you don't get flagged as spam straight away.

share|improve this answer
    
Postini will do act as a relay as the OP wanted and will not change the "from" header. –  MikeAWood Oct 18 '11 at 6:52
    
Sadly, Postini is on the way out the door. By the end of 2013 it will no longer exist. –  Sailing Judo Oct 24 '12 at 21:39
up vote 0 down vote accepted

thank you for your replies.
Although the method I described in the question works (though it's far not perfect) we have decided not to use Gmail as SMTP relay for now. For now we are using our hosting server's SMTP.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.