Actually, even simpler.

Just ship postmulti.service in debian postfix package, - which is just rename 
of the
current dummy postfix.service, plus an extra line: "Alias=postfix.service", but 
not
enable it by default.  postfix-instance-generator only run when this 
postmulti.service
is enabled.  By default, ship just regular postfix.service which run `postfix 
start'
and which conflicts with postmulti.service.

If a site needs multi-instance setup, they manually enable postmulti.service 
which
replaces regular postfix.service with an alias for itself and enables multi-inst
setup as currently done.  Nothing will change in this case.  And we can try to
detect if multiple instances are enabled and to this in postinst.

The only question I have is how to change between running postfix@-.service and
postfix.service, - probably need a stop before this can happen sanely.

It should be sufficiently simple and flexible.

Additionally - independent of the actual schema used in this context - I think
we should patch postfix-script to run configure-instance.sh where appropriate,
instead of running configure-instance.sh before running `postfix start' or the
like, - this way it will work for every instance no matter how this particular
instance is started.

/mjt

Reply via email to