On Mon, Jul 10, 2023 at 10:34:44AM +0100, Ken Gillett via Postfix-users wrote:

> First of all, changes I have made in main.cf are not being used.
> AFAICT I am editing the main.cf that is used:-
> 
>       ps ax | grep master => master -c /Library/Server/Mail/Config/postfix

Yes, with "-c" the provided option value becomes the configuration
directory.

> So main.cf in that directory is the one being used, but changes to
> that file are ignored.

How did you arrive at that conclusion?

> What does 'postconf -d' show?

The compiled-in defaults.

> I know it is supposed to be the 'defaults', but from where is it
> getting those defaults? Hard coded into the executable?

Yes.

> If so, how come myhostname, mydomain and mynetworks all contain data
> specific to my network.

Three of the "compiled-in" defaults, are obtained via functions rather
than static values, and get their values from basic system-environment
information.

    myhostname
    mydomain
    mynetworks

All the rest are compile-time constants (but the value may include
$mydomain, $myhostname, ... for recursive expansion)


> It is almost as if the configuration being used is an amalgam of
> main.cf in the above directory and also from /etc/postfix, but I don't
> believe postfix does that sort of thing.

To see the effective configuration, use "postconf -n" not "postconf -d".
To see even parameters you haven't touched, use "postconf" with no
arguments.  For folding of long lines add a "-f" option.

    # Custom (non-default) settings, with folded lines for readability.
    $ postconf -nf

    # One per line, for machine post-processing
    $ postconf -n | grep -E '^smtp_'

    # Show original and changed values
    $ diff -U0 <(postconf -d) <(postconf) | less

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to