On 10 Feb 2021, at 07:03, ludic...@gmail.com wrote:
>> It would be really handy if I could get postfix to use the value returned by
>> the dnsdomainname command for its mydomain value as I could then use the
>> same main.cf file in several headless 'send only'
>> systems where postfix is used solely for sending error messages from cron
>> and similar.
> Can't this be simply done by bash/cron?

Yes. Or even just sed. Create the case file with a placeholder my domain and 
then replace it. I'm not sure why you would need to do this though, unless 
myhostname is not getting set properly.

> postfix reload

Ah, yes, a shell script would be the simplest way to reload after making the 
change.

> Not sure about startup / system boot.

Unless the hostname is changing at boot that shouldn't be any issue, but If it 
is it should be trivial to hook into the rc.d startup script to do this. A 
trivial script of a couple of lines should do the trick.


-- 
If there's a bustle in your hedgerow don't be alarmed now.

Reply via email to