Thanks for all that and from Viktor. It was occurring to me that the hard coded 
parameters in question (as Viktor mentioned) get their info from the hardware 
at runtime. So that explains my question regarding that.

I have been looking at postconf -d, -p and -n as I understand what they purport 
to show, but was having trouble understanding it.

As for MacOS server, oh no, I am far from committed to it. It was handy at the 
time although annoyingly 'special' in so many ways and then typically, 
summarily dumped by Apple, overburdened by the requirement to design new 
Animojis.

Joking aside, I have moved away from almost everything in Server, but the email 
side was running OK and I wanted to avoid having to fix something that was 
essentially not broken. In the future I will instead use FreeBSD on a different 
Mini to provide the same facilities. and didn't want to futz with the Mini 
setup until then.

However, in the meantime, I have an odd problem I cannot resolve and not being 
able to figure out how to make changes to the config. has so far got me stumped.

I'll try and run the Server admin tool on the Mini itself. That broke long ago 
for any remote operation as soon as the OS version updated on remote Mac (my 
Mac Pro) compared to that with which the (oldish) Mini server is stuck.

There are 2 LaunchDaemons that apparently start postfix, but one of them might 
be disabled. That is from com.apple etc. and does not specify a -c parameter. 
The other is from org.postfix and uses -c to point to the directory I 
mentioned, so I'm pretty sure that contains the main.cf being used and I cannot 
find any other 'includes' that might bring in config from other files that 
would influence my problem here.

Specifically, I want to add something to mydestination. I edited that main.cf, 
but the change does not appear in postconf, with or without -p or even -n. The 
change is being ignored. I did try 'reload', but that produced a strange error 
about postfix not running (or something like that) when it most definitely is. 
In any case, changes to the main.cf file should be picked up automatically and 
the file reloaded.

Ah, just a thought. Does postfix in fact only watch /etc/postfix for changes, 
even though is is actually reading its config from a different directory?

I'll post another message about the actual problem I am trying to resolve and 
keep this just about configuration source.



Ken  G i l l e t t

_/_/_/_/_/_/_/_/



> On Mon 10 Jul 2023, at 14:25, Bill Cole via Postfix-users 
> <postfix-users@postfix.org> wrote:
> 
> On 2023-07-10 at 05:34:44 UTC-0400 (Mon, 10 Jul 2023 10:34:44 +0100)
> Ken Gillett via Postfix-users <k...@groups.ukgb.net>
> is rumored to have said:
> 
>> It is many years since I set up postfix on my Mac server and it's use is now 
>> purely for local email, i.e. users on home network. However I have some 
>> issues with this and could really do with some help.
>> 
>> 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
>> 
>> So main.cf in that directory is the one being used, but changes to that file 
>> are ignored. I'm kinda stuck trying to figure out what appropriate changes 
>> to make when I don't know how to actually make any changes to the config 
>> being used.
> 
> That's apparently an installation done by Apple's "Server" product, which has 
> been abandonware for some years. Changing it through the Server.app 
> administrative tool is one strong possibility for something that will work 
> for you. As for why your changes did not take, I have 2 theories:
> 
> 1. You didn't restart Postfix after the changes (easiest fix!)
> 
> 2. When you restarted Postfix, the Apple tools rebuilt main.cf and master.cf 
> from its (hidden in a plist somewhere?) configuration and the *.cf.proto 
> files in that same directory.
> 
> I have not touched Server in quite a while, but if I recall correctly, (2) is 
> always going to happen if you use Server (or launchctl) to restart Postfix. 
> The actual .cf files are just for runtime use, not direct editing.
> 
>> What does 'postconf -d' show?
>> 
>> I know it is supposed to be the 'defaults', but from where is it getting 
>> those defaults? Hard coded into the executable?
> 
> As I understand it, yes.
> 
>> If so, how come myhostname, mydomain and mynetworks all contain data 
>> specific to my network.
> 
> All of those have programmatic defaults, and they are expanded at postconf 
> run time to give operating defaults that are likely to be right for you. You 
> may notice that 'postconf -n' gives different values if you've explicitly set 
> any of those attributes. Reading the comments in main.cf and/or the man pages 
> for postconf(1) and postconf(5) may help clarify.
> 
> 
>> 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.
> 
> Correct. It does not. OTOH, the MacOS X Server software that manages Postfix 
> does undocumented things under the hood that thwart direct editing of its 
> runtime config files.
> 
>> As I said, many years since I last played with postfix and could do with 
>> some assistance.
> 
> As someone who has run Postfix on MacOS for 17 years, my most vehement advice 
> is to get off the old unpatched Apple-customized and abandoned FOSS 
> components in the old Server package and update to current versions NOT 
> managed by Server. You can build everything on your own and I expect that you 
> can use Homebrew to build them if you prefer, but my personal preference is 
> using the MacPorts versions. Postfix, Dovecot, BIND, and all their 
> dependencies have working ports.
> 
> If you were "all in" committed to the Server environment, with its integrated 
> calendar, directory, push notification, and other tools, it is extremely 
> painful  to reconstruct that all by yourself with the underlying FOSS tools, 
> but that's the best choice at this point.
> 
> 
> 
> 
> -- 
> Bill Cole
> b...@scconsult.com or billc...@apache.org
> (AKA @grumpybozo and many *@billmail.scconsult.com addresses)
> Not Currently Available For Hire
> _______________________________________________
> Postfix-users mailing list -- postfix-users@postfix.org
> To unsubscribe send an email to postfix-users-le...@postfix.org

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

Reply via email to