Actually, I would like to use it as outbound load. Ah... I see what you are saying (smtpd).
I guess the master.cf changes are irrelevant. In any case, to test I issue telnet 192.168.0.249 25 from a workstation on this lan. I am expecting to connect to postfix on 192.168.0.244. If issue telnet 192.168.0.244 25 or telnet 192.168.0.245 25 from a workstation on lan or from 192.168.0.249, it works. Any help is appreciated. On Wed, Nov 20, 2013 at 11:56 AM, /dev/rob0 <r...@gmx.co.uk> wrote: > On Wed, Nov 20, 2013 at 11:34:45AM -0500, Roman Gelfand wrote: >> I have created the following smtp load balancing setup > > What kind of load do you wish to balance? Inbound load? > >> 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 > [snip irrelevant parts] > >> /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) > > Do you need these? Why? Why not defaults? > >> 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. > > Ah, you are talking about inbound load, then. > >> I have confirmed that lb1 keepalived server is working. The >> problem is mx1... and mx2... are not accepting connection. > > How did you test this? And they logged ... ? > > http://www.postfix.org/DEBUG_README.html#mail > >> 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 > > Why do you think you need this? What's wrong with the default > smtpd(8) command line? > >> -o myhostname=mx... > > myhostname is global. This won't work as you might expect. > >> -o smtp_helo_name=mx... > > smtp_* settings are only applicable to the smtp(8) client. > -- > http://rob0.nodns4.us/ -- system administration and consulting > Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: