Hello,

I'm trying to install failover multi instances of postfix on a 2 machines Centos 6, with postfix 2.6, corosync and pacemaker and use of virtual IP.
No SElinux enable.

Each instance use a virtual IP, and each virtual IP comes from pacemaker. So only one machine have vip. In my configuration, 192.168.1.100 is the virtual ip for the instance postfix-mta (vip-mta.mydomain.fr).
and the result of postconf :

############## /etc/postfix/main.cf
alias_database =
alias_maps =
config_directory = /etc/postfix
inet_interfaces = loopback-only
inet_protocols = ipv4
local_recipient_maps =
local_transport = error:5.1.1 Mailbox unavailable
master_service_disable = inet
multi_instance_directories = /etc/postfix-mta
multi_instance_enable = yes
multi_instance_wrapper = ${command_directory}/postmulti -p --
mydestination =
mydomain = mydomain.fr
myhostname = vm-test-postmulti.mydomain.fr
mynetworks = 127.0.0.1
myorigin = $mydomain
relayhost = [smtp.mydomain.fr]
transport_maps = hash:/etc/postfix/transport

############## /etc/postfix-mta/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
authorized_submit_users =
config_directory = /etc/postfix-mta
data_directory = /var/lib/postfix-mta
debug_peer_level = 2
default_destination_concurrency_limit = 20
default_destination_recipient_limit = 200
inet_interfaces = 192.168.1.100
inet_protocols = ipv4
master_service_disable =
multi_instance_enable = no
multi_instance_group = mta
multi_instance_name = postfix-mta
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = mydomain.fr
myhostname = vip-mta.mydomain.fr
mynetworks = 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0/24, 192.168.5.0/24
mynetworks_style = host
queue_directory = /var/spool/postfix-mta
smtpd_banner = $myhostname - Serveur MTA
smtpd_client_restrictions = check_client_access hash:/etc/postfix-mta/client_access transport_maps = hash:/etc/postfix-mta/transportList, ldap:/etc/postfix-mta/ldap-transport-1.cf, ldap:/etc/postfix-mta/ldap-transport-2.cf
unknown_local_recipient_reject_code = 450
virtual_alias_maps = hash:/etc/postfix-mta/virtual, ldap:/etc/postfix-mta/ldap-reecriture-listes.cf


Each instance is marked as disable, there is a script to activate instances (postmulti -i postfix-mta -e enable ; postmulti -i postfix-mta -e start) for using with pacemaker.

The problem is when i use postfix start. The default instance start without any problem, but postfix reports "fatal: parameter inet_interfaces: no local interface found for 192.168.1.100", and the init script is marked as failed... This is normal because the vip is not up, but my instance postfix-mta is disabled.

Is there a way to configure all my instances with virtual ip, and when starting postfix just start primary instance without failed message ? The other instances will be started with pacemaker after starting vip on one machine.

Thanks in advance...

--
Olivier Brousselle
Rectorat de Rouen - DSI - Equipe Infrastructures

Reply via email to