#892698 Add master.cf.d directory to postfix to avoid manual master.cf configuration for packages

Package:
postfix
Source:
postfix
Description:
High-performance mail transport agent
Submitter:
Magnus Danielson
Date:
2024-12-03 09:33:02 UTC
Severity:
wishlist
Tags:
#892698#5
Date:
2018-03-11 23:34:09 UTC
From:
To:
When adding other packages to a Debian installed postfix, manual edit of
master.cf is needed to connect them. This is not the modern style of
Debian packaging, which have added separate directory for which other
package maintainers can add their configuration for each package.
I thus propose that the postfix package also adds a master.cf.d for
which other packages can add their specific hooks into postfix
configuration.

Among packages that should be relevant to add their hooks into
master.cf.d I find spamassassin, amavis, openspf, opendkim, opendmarc,
milter. Thus, it would enable much more of a drop-in configuration than
the current state of affairs.

The existing master.cf would remain, but the service script should upon
postfix start or reload of configuration append any of the files in
master.cf.d into a generated master.cf which is then used. The generated
file should have a first line of comment
"# Do not edit this file, automatically generated"
and then for each file included, the included part should be prepended
with a comment with filename for the source.
This will ease debugging.

With this in place, package maintainers can drop in the package
maintained master.cf.d file suitable, for instance the openspf package
would add master.cf.d/openspf. The user doing "apt-get install openspf"
would then not need to alter the postfix configuration by hand, but get
the openspf operating.

The expected implementation impact would be creating a directory and
some selected scripting to build the aggregated master.cf file and then
change the postfix call to use the aggregated master.cf file.

Similarly may main.cf need main.cf.d. This may however need some more
work, since some packages wants to add values into the middle of
existing values lists. Beyond that the same logic applies.

Best Regards,
Magnus

#892698#10
Date:
2024-12-03 09:29:59 UTC
From:
To:
Control: tag -1 + upstream wontfix
...

This has been discussed multiple times over the years, mostly on
postfix-users mailing list.

Postfix upstream does not implement this for a number of reasons.
There is no need to suggest implementing this in debian without
having it upstream first.

Thanks,

/mjt