I have successfully setup my server to relay outgoing mail through gmail. The problem is I only need this for two accounts. So i setup Code: sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay and in it i have Code: [email protected] [smtp.gmail.com:587] [email protected] [smtp.gmail.com:587] *@domain.com [domain.com] this last part is what im having trouble with. I tried my domain and localhost, but it still uses the relay. how do I only get user1 and user2 to use the relay?
Hello, You just need to give user1 & user2 only into sender_relay file, for which you need to enable relay, all other users will not have relay enabled automatically. (Basically, it is sender dependent relay parameter, so if you do not want relay you not need to mentioned it in configuration file.) Hope this works. Dipesh