Question : Postfix


 I have postfix as my SMTP server. I have configured postfix to accept mails for 2 domains.
ex-> abc.com & def.com
Below the postfix  server we have 4 front end exchange servers. I want to configure the postfix such a way that mails for abc.com will be relayed to first 2 front end exchange  servers & the mails for def.com will be relayed to the remaining 2 front end exchange servers. Please let us know how this can be achieved. what configuration in post fix will address this

Answer : Postfix

/etc/postfix/transport
abc.com      smtp:[exchpool1.name.local]
def.com      smtp:[exchpool2.name.local]

/etc/postfix/main.cf
relay_domans=$transport_maps
transport_maps=hash:/etc/postfix/transport
mynetworks=127.0.0.1,192.168.1.0/24

relay_domains permits incoming mail to relay trhough the machine from anyone if addressed to abc or def.com.
mynetworks permits outgoing mail from those IP ranges to anyone.
transport maps tells postfix where to relay the mail

Your DNS will need to list the ip addresses of each exchange sever in that pool.  
DNS can round robin the servers.

$ORIGIN name.local
ex1  IN A 192.168.1.5
ex2  IN A 192.168.1.6
ex3  IN A 192.168.1.7
ex4  IN A 192.168.1.8
exchpool1  IN A 192.168.1.5
exchpool1  IN A 192.168.1.6
exchpool2  IN A 192.168.1.7
exchpool2  IN A 192.168.1.8

OR you can use MX records in your name.local domain to deliver the mail to the downstreams.

Random Solutions  
 
programming4us programming4us