It does, but you have to make sure all instances are bound to specific IPs. If any one of those instances bind to * or 0.0.0.0 it will bind to all IP addresses, which means that another instance cannot bind to one of the IP/port combinations anymore (it's already in use).it doesn't seem to bind to the aliased IPs
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
postfix postscreen 64369 6 tcp4 192.168.1.11:2525 *:*
unbound unbound 46046 4 udp4 127.0.0.1:53 *:*
unbound unbound 46046 5 tcp4 127.0.0.1:53 *:*
unbound unbound 46046 6 udp4 192.168.0.11:53 *:*
unbound unbound 46046 7 tcp4 192.168.0.11:53 *:*
unbound unbound 46046 8 udp4 192.168.1.11:53 *:*
unbound unbound 46046 9 tcp4 192.168.1.11:53 *:*
root master 25573 13 tcp4 192.168.1.11:2525 *:*
root master 25573 26 tcp4 192.168.0.11:5871 *:*
spamd perl 88130 6 tcp4 127.0.0.1:783 *:*
spamd perl 87899 6 tcp4 127.0.0.1:783 *:*
root perl 87741 6 tcp4 127.0.0.1:783 *:*
postgrey perl 86599 5 tcp4 127.0.0.1:10023 *:*
root dovecot 83374 41 tcp4 *:993 *:*
root sshd 81063 5 tcp4 *:22 *:*
postgres postgres 71470 7 tcp4 127.0.0.1:5432 *:*
postgres postgres 71470 8 tcp4 192.168.0.11:5432 *:*
postgres postgres 71470 9 tcp4 192.168.0.12:5432 *:*
postgres postgres 71470 13 tcp4 192.168.1.11:5432 *:*
postgres postgres 71470 14 tcp4 192.168.1.12:5432 *:*
ntpd ntpd 68465 21 udp4 *:123 *:*
ntpd ntpd 68465 22 udp4 192.168.1.11:123 *:*
ntpd ntpd 68465 23 udp4 192.168.1.12:123 *:*
ntpd ntpd 68465 27 udp4 192.168.0.11:123 *:*
ntpd ntpd 68465 28 udp4 192.168.0.12:123 *:*
ntpd ntpd 68465 34 udp4 127.0.0.1:123 *:*
telnet 192.168.1.11 2525
Trying 192.168.1.11...
Connected to localhost.
Escape character is '^]'.
220 mail.abc.com ESMTP Postfix
telnet 192.168.1.12 2526
Trying 192.168.1.12...
em0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=481249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER,NOMAP>
ether 00:22:4d:aa:e0:9d
inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.12 netmask 0xffffffff broadcast 192.168.1.12
media: Ethernet 1000baseT <full-duplex>
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
ether ec:08:6b:02:e6:c1
inet 192.168.0.11 netmask 0xffffff00 broadcast 192.168.0.255
inet 192.168.0.12 netmask 0xffffffff broadcast 192.168.0.12
media: Ethernet 1000baseT <full-duplex>
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ifconfig_em0="inet 192.168.1.11 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex"
ifconfig_em0_alias0="inet 192.168.1.12/32"
ifconfig_re0="inet 192.168.0.11 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex"
ifconfig_re0_alias0="inet 192.168.0.12/32"
192.168.1.11:2525 inet n - n - 1 postscreen
smtpd pass - - n - - smtpd
dnsblog unix - - n - 0 dnsblog
tlsproxy unix - - n - 0 tlsproxy
192.168.0.11:5871 inet n - n - - smtpd -o syslog_name=postfix ....
192.168.1.12:2526 inet n - n - 1 postscreen
smtpd pass - - n - - smtpd
dnsblog unix - - n - 0 dnsblog
tlsproxy unix - - n - 0 tlsproxy
192.168.0.12:5872 inet n - n - - smtpd -o syslog_name=postfix ...
::1 localhost
127.0.0.1 localhost
192.168.0.11 localhost
192.168.0.12 localhost
192.168.1.11 localhost
192.168.1.12 localhost
::1 localhost.abc.com
::1 localhost.xyz.com
::1 localhost
127.0.0.1 localhost.abc.com
127.0.0.1 localhost.xyz.com
192.168.0.11 localhost.abc.com
192.168.0.12 localhost.xyz.com
192.168.1.11 mail.abc.com
192.168.1.11 mail
192.168.1.11 mail.abc.com.
192.168.1.12 mail.xyz.com
192.168.1.12 mail.xyz.com.
192.168.0.11 localhost
192.168.0.12 localhost
192.168.1.11 localhost
192.168.1.12 localhost
192.168.1.11 mail.abc.com
192.168.1.11 mail
192.168.1.11 mail.abc.com.
192.168.1.11 mail mail.abc.com
They're not the same? One interface has 192.168.0.0/24 addresses, the other 192.168.1.0/24. Same host address though, but they're both on different subnets.You have the same two IP addresses configured on two physical interfaces?
I don't see anything listening on 192.168.1.12:2526. DoesI can telnet locally to the first domain as its IP is the real IP. See below:
I cannot telnet locally to the second domain as its IP is an aliased one:Code:telnet 192.168.1.11 2525 Trying 192.168.1.11... Connected to localhost. Escape character is '^]'. 220 mail.abc.com ESMTP Postfix
Code:telnet 192.168.1.12 2526 Trying 192.168.1.12...
telnet 192.168.1.12 5432
work? What does netstat -nr
report?Jose, yes you are right. The aliased IPs are not getting bound by Postfix. netstat is not listing it. Postfix support will help me out today after looking at my configs.I don't see anything listening on 192.168.1.12:2526. Doestelnet 192.168.1.12 5432
work? What doesnetstat -nr
report?
Thanks sko I did go that route first before settling for Postmulti. In fact I have not detsroyed the jails yet, just disabled them for nowthis is a prime use case for jail(8)s, especially if this is a mail server which greatly benefits from the increased security by containing each service (postfix, dovecot, postgresql, etc...) in its own jail.
I wonder why you would need multiple postfix instances on the same host. Postfix spawns worker processes as needed and does its own load adaption, so "load balancing" on a single host is rather pointless as a single postfix instance can easily scale up until it brings your host to its knees.Thanks sko I did go that route first before settling for Postmulti. In fact I have not detsroyed the jails yet, just disabled them for nowI got stumped at which reverse proxy to use for mail servers... haproxy apparently doesn't reverse proxy smtp, it can only load balance afaik. I didn't try nginx. Maybe I should post another question on recomendation for a reverse proxy in production for mail servers. I will do that.
# RDR ROUND ROBIN
# Translate incoming web server connections to a group of web servers on
# the internal network.
rdr on $ext_if proto tcp from any to any port 80 \
-> { 10.1.2.155, 10.1.2.160, 10.1.2.161 } round-robin
So are you suggesting not to use postscreen? My problems started while using postscreen in master.cf for each of the domains. If I left it with just smtpd, there were no banner issues, but with postcreen enabled it always fell back to the primary domain. But as you say, I am perhaps wasting my time on a non-issue. SirDice also had advised the same to me.because all checks that postfix can do to detect spam are comparably expensive in terms of system resources