On 03/07/2017 02:43 PM, Peter wrote:
On 08/03/17 08:00, Robert Moskowitz wrote:
After a bit of reflection, I may have asked the wrong question. Perhaps
a better question is does the substitution take place on processing the
option?
It would take place at runtime (I believe). If you want it to hard-code
the substitution into main.cf you could do something like this:
postconf "smtpd_tls_key_file = /etc/pki/private/$(postconf -h
myhostname).key"
This did not quite work, at least in using interactive variables. I
have modified my guide by setting interactive variables in the beginning
and then using them throughout, so that it is not necessary (or much
less) to modify stuff. I came up with:
eval $(echo "postconf -e 'mydomain = "$your_domain_tld"'")
eval $(echo "postconf -e 'myhostname = "$your_host_tld"'")
The variables your_domain_tld and your_host_tld are used a lot in this
guide to customize conf files and such.
Might be a slicker way, but this works...