A Few Words About Setting Up Postfix Multi Instance

By eric

I work with email and Postfix. On every mailing machine I have Postfix setup on, I have at least 2 instances, sometimes more (in fact, sometimes its as many as 6 instances). I was recently setting up a new set of mailers and decided to give Postfix multi-instance seutp a try. It was excellent. There really isn’t too many complex setups that have a simple installation. And to that end, I give Postfix credit where credit is due. It usually takes a little more than just following the README.

Finally, it didn’t. I started up Postfix multi and created an instance using postmulti for each instance I wanted to create. Then I took my Postfix configuration files from each instance on the previous machine and copied them into their respective directories. I replaced the Postmulti lines and voila.

More specifically, create the Postfix multi-instance.

# postmulti -e init
# postmulti -I postfix-bounce -G pfbounce -e create

If you want the Postfix instance to listen on a TCP port, make sure the master_service_disable variable is unset (as below) and that the inet_interfaces variable is set to the IPs that you want the instance to listen on. Also, after copying over your main.cf and master.cf files, you will lose the Postfix multi settings. Just make sure the following settings are in the instance specific main.cf.

master_service_disable =
authorized_submit_users =
multi_instance_group = pfbounce
multi_instance_name = postfix-bounce
multi_instance_enable = yes

If you are editing the files by hand, make sure you don’t lose the main Postfix instance multi-instances settings (I know that was a mouthful):

command_directory = /usr/sbin
multi_instance_wrapper = ${command_directory}/postmulti -p --
multi_instance_enable = yes
multi_instance_directories = /etc/postfix-bounce, /etc/postfix-return

Then you can fire up the instance by executing the following command:

# postmulti -i postfix-bounce -e enable
# postmulti -i postfix-bounce -p start

From there on in, you can control all instances, a specific instance or even group the instances. Its about time complex setups got easy.

Follow My Travels

Buy My Book


  • 2020
  • 2019
  • 2017
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006

New Posts By Email