Allow for setting any Postfix variables in the config file (both main.cf and master.cf)
dgraziotin opened this issue · 0 comments
dgraziotin commented
This is a followup from #74, which would be closed by #75 but it seems to be stalled since July 2020.
I'm working to a similar solution that allows to change options for main.cf and master.cf through environment variables.
This is the extract from README.md that explains the added features.
Custom postfix configuration
SMF allows to use environment variables to add or change lines to postfix main.cf
and master.cf
configuration files.
-
SMF_POSTFIXMAIN_*
variables will edit postfixmain.cf
entries.- Format:
SMF_POSTFIXMAIN_option_name=value
- Example:
SMF_POSTFIXMAIN_soft_bounce=yes
will callpostconf -e soft_bounce=yes
and add the option.
- Format:
-
SMF_POSTFIXMASTER_*
variables will edit postfixmaster.cf
.- Format:
SMF_POSTFIXMASTER_service__name__type__parameter_name=value
Please note the double underscore__
to differentiate service and type (which require a/
as separation symbol) and the single underscore_
used only by parameter names. - Example:
SMF_POSTFIXMASTER_submission__inet__smtpd__recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
will callpostconf -P submission/inet/smtpd/recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
and add the option.
- Format: