Ah,

On 03/09/2017 10:13 AM, Viktor Dukhovni wrote:
On Mar 9, 2017, at 9:54 AM, Robert Moskowitz <r...@htt-consult.com> wrote:

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...
That's rather convoluted, what's wrong with:

  postconf -e "mydomain = $your_domain_tld"

There appears to be a difference between what you show above and what I tested:

postconf -e 'mydomain = $your_domain_tld'

The single quote results in:

mydomain = $your_domain_tld

So I did a little googling and learned the difference:

http://stackoverflow.com/questions/6697753/difference-between-single-and-double-quotes-in-bash

This time around I am really trying to do things smarter and am expanding my rather limited skill set.

  postconf -e "myhostname = $your_host_tld"

Or when doing both:

  postconf -e \
        "mydomain = $your_domain_tld" \
        "myhostname = $your_host_tld"

which takes considerably less time, because Postfix likes to
avoid reading "hot" configuration files that have been modified
less than two seconds ago and may be in an intermediate state.

So the configuration reader sleeps for 300ms and retries, waiting
for the file to "cool down".  Therefore, modifying paramaters one
at a time takes around 1.5 seconds per parameter.


Reply via email to