08.12.2024 19:59, Viktor Dukhovni via Postfix-users wrote:

https://bugs.debian.org/882141 -- this is what we have in debian, and
the current solution:

ln -s "$SERVICEFILE" "$WANTDIR/postfix@-.service"
for DIR in $(postconf -h multi_instance_directories); do
     ln -s "$SERVICEFILE" "$WANTDIR/postfix@$(postconf -o inet_interfaces= -hc 
"$DIR" multi_instance_name).service"
done

That should be "postconf -hx multi_instance_directories".  But
it is possible to make "postmulti -l" work without loading
any parameters, if that'd really help.  Unclear what problem
you're really trying to solve there.  If it is just to
not have to run "postconf" the win is unclear.

If you want each instance to be a separate systemd job, then clearly
"postmult" is not really your tool of choice.  Postfix actually
has a pluggable multi-instance framework, and someone could write
something else that actually integrates with systemd in some manner,
if they were motivated.  Postmulti is not that complex really, just
a small C program and a shell script.
Yes, I know it's like that indeed.  I'm dealing with existing setup.
This is how things are done in debian since stretch (postfix 3.1).
With postmulti used to run default instance or other instances as
separate systemd units.  This is less flexible than postfix own
implementation (no support for disabled units, not support for
groups), and somewhat confusing (main postfix instance is
postfix@-, not postfix).  But this is how it works now and what
I'm trying to stay compatible with, somehow.. or not, --
https://bugs.debian.org/1088862 is where I tried to sum it up
and have a proposed solution, - for anyone interested.

postmulti is used here just to run particular instance easily,
that's all, - no other functionality of postmulti is used.

Myself, I don't think this is actually needed at distribution level, --
systemd units like this are rather trivial, and whole thing can be
managed by systemd by enabling/disabling postfix@instance.service
manually without looking at postmulti -l output.  These unit
instances can be grouped at systemd level too, or placed into
slices, or other fun things.  The only thing needed is an easy
way to run a given instance, that's where postmulti tool is
handy.

Thanks,

/mjt
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to