On Sun, 01 Jan 2017, Scott Kitterman wrote:
> I've been looking at this some more and while I agree we need to do
> something to control multiple instances, I think for single instance
> having to use postfix@- is both surprising and suboptimal.
> 
> If you have an input on how we can use postfix for the primary instance
> and, maybe something like postfix-multi to perform the function that the
> postfix service is performing now, I'd love to hear it.

It's a question of trade-off (as usual). It seemed easier and cleaner to
handle everything in a single service file as the postinst snippet deal
with a single service file and do a single reload operation.

But you can certainly create postfix.service as the current [email protected]
except that you replace "%i" with "-" and then create another
postfix-multi.service + [email protected] like the current files.
You would then change the generator to:
- use postfix-multi@* instead of postfix@*
- not create "postfix-multi@-" by default (since it would be handled by
  postfix.service)

You should then also override dh_systemd_enable and dh_systemd_start to
run two times, one for postfix.service and one for postfix-multi.service
to make sure that any upgrade restarts both the main instance and the
other instances.

> Having studied the current design, I think it's over complicated for
> single instance usage, which I believe is the predominant use case .

You will not simplify the design by using even more service files. It
might be less surprising for users unaware of the multiple instance setup
but definitely not simpler for you or people who want to override the
systemd configuration of the postfix service in general (i.e. covering all
possible instances).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/

Reply via email to