Templating master.cf

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Templating master.cf

Matt Saladna

Hello all,

I provide a base master.cf part of an RPM release that I'd like to give users the ability to customize without overwriting each RPM release. Use case would be allowing per-sender bind/helos using sender_dependent_default_transport_maps or setting content milters beyond the basics the RPM provides.

postmulti is one approach to this, but requires duplication of main.cf. Further updates or reconfiguration to main.cf would need to be propagated to each multi instance. Servers may be running over 50 sender-dependent SMTP services, which can add unnecessary overhead.

Are there any downsides with shipping master.cf.in + Makefile, adding a install/update hook to make master.cf (cat master.cf.in master.cf.local > master.cf)? Users could store their per-server overrides in master.cf.local, master.cf.in would be distribution, and master.cf continues to live happily ever after. Any other approaches to explore as well?

- Matt



Reply | Threaded
Open this post in threaded view
|

Re: Templating master.cf

Peter Ajamian
On 6/04/20 6:26 pm, Matt Saladna wrote:
> Hello all,
>
> I provide a base master.cf part of an RPM release that I'd like to give
> users the ability to customize without overwriting each RPM release.

You do realize that all you have to do is properly set the master.cf
file as a config file for rpm and it won't overwrite it, right?


Peter
Reply | Threaded
Open this post in threaded view
|

Re: Templating master.cf

Matt Saladna

I do intend on overwriting it when changes are made to the master.cf, but I do not want to clobber any custom services a user may have added nor do I want their intervention to manually reconcile changes from .rpmsave. I don't want to maintain a history of sed/awk scripts that may break and Ansible is overkill.

- Matt

On 4/6/2020 1:35 AM, Peter wrote:
On 6/04/20 6:26 pm, Matt Saladna wrote:
Hello all,

I provide a base master.cf part of an RPM release that I'd like to give users the ability to customize without overwriting each RPM release.

You do realize that all you have to do is properly set the master.cf file as a config file for rpm and it won't overwrite it, right?


Peter
Reply | Threaded
Open this post in threaded view
|

Re: Templating master.cf

Wietse Venema
Matt Saladna:
> I do intend on overwriting it when changes are made to the master.cf,

That would be a mistake. Postfix has a command

        postfix upgrade-configuration

that takes existing main/master.cf and makes necessary changes after
a new release.

Been that way for, oh, 10 years or so. Please catch up. Thanks.

        Wietse