I have created the following smtp load balancing setup lb1 (keepalived server) host mx... ip .249 || || || ======================== || || || || || || host mx1... ip .244 (postfix smtp) host mx2... ip .245 (postfix smtp)
On each m1... and mx2... mail servers I added interfaceces ------------------ auto lo:(depending on machine 244 or 245) iface lo:(depending on machine 244 or 245) or inet static address 192.168.0.(depending on machine 244 or 245) netmask 255.255.255.255 broadcast 192.168.0.255 pre-up echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore; echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce /etc/sysctl.conf ----------------------- net.ipv6.conf.all.disable_ipv6 = 1 /etc/postfix/main.cf ________________ inet_interfaces = 127.0.0.1, 192.168.0.(depending on machine 244 or 245) smtp_bind_address = 192.168.0.(depending on machine 244 or 245) inet_protocols = ipv4 smtp_address_preference = ipv4 so that when I do telnet mx... 25, I should connect to the next available server either .244 or .245. I have confirmed that lb1 keepalived server is working. The problem is mx1... and mx2... are not accepting connection. There is one other item that supposedly I should have added. But postfix doesn't like when I add this line to master.cf. 192.168.0.249:smtp inet n - n - - smtpd -o myhostname=mx... -o smtp_helo_name=mx...