PDA

View Full Version : Need help with postfix and relay


boast
13th December 2008, 00:16
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 sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

and in it i have
user1@domain.com [smtp.gmail.com:587]
user2@domain.com [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?

dipeshmehta
16th December 2008, 06:02
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