Greetings
There are several servers on centos 6 with the same network configuration and the same postfix (v2.11.7) configs with corrections to host names. With this configuration, most hosts send mail from the address to bond0 (in this example, 192.168.2.191), but there are a couple of hosts that persist in sending mail from eth1 (192.168.1.1) which is not correct. Is there any logical explanation for this phenomenon? Examples of configs below.
PS It is important for me to explain exactly why this happens, and not advice to use smtp_bind_address in the postfix config.
ip a:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 19:62:ad:f3:81:d1 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 19:62:ad:f3:81:d2 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/30 brd 192.168.1.3 scope global eth1 valid_lft forever preferred_lft forever 4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 19:62:ad:f3:81:d1 brd ff:ff:ff:ff:ff:ff 5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 19:62:ad:f3:81:d3 brd ff:ff:ff:ff:ff:ff 6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 19:62:ad:f3:81:d1 brd ff:ff:ff:ff:ff:ff inet 192.168.2.191/22 brd 192.168.2.255 scope global bond0 valid_lft forever preferred_lft forever 7: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/void 8: bond0.101@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 19:62:ad:f3:81:d1 brd ff:ff:ff:ff:ff:ff inet 77.1.14.155/24 brd 77.1.14.255 scope global bond0.101 valid_lft forever preferred_lft forever /etc/postfix/main.cf:
queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix myhostname = test-host-1.domain.local mydomain = domain.local myorigin = $myhostname inet_interfaces = localhost, 192.168.2.191 inet_protocols = ipv4 mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 mynetworks = 127.0.0.0/8 relay_domains = $mydestination alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases home_mailbox = Maildir/ debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man maximal_backoff_time = 6h maximal_queue_lifetime = 3d bounce_queue_lifetime = $maximal_queue_lifetime message_size_limit = 26214400 mailbox_size_limit = 134217728 virtual_mailbox_limit = $mailbox_size_limit in_flow_delay = 1 allow_min_user = yes relayhost = my-own-relay.domain.local smtpd_helo_required = yes smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination html_directory = no setgid_group = postdrop mail_owner = postfix