Fix for postfix not launching reliably at boot time

Bill Cole macportsusers-20171215 at
Sun Nov 29 18:55:40 UTC 2020

On 29 Nov 2020, at 6:02, Gerben Wierda via macports-users wrote:

> I think I shared this before, but I’m not certain so I am doing so 
> now (again).
> The MacPorts postfix master process will not launch reliably at boot 
> if it is set up with ‘port load postfix’. The reason for the 
> unreliable boot is that macOS during boot for about 60 seconds or so 
> claims port 25 (and 587) because it launches its own postfix, then 
> quickly kills it. When Apple’s postfix master launches first (there 
> is no control in launchd what launches first) this can block the 
> MacPorts version, which then fails.
> By changing /etc/postfix/ of Apple’s postfix the boot by 
> MacPorts launches reliably.
> This means patching Apple’s files, which I frown upon, but I’m 
> still using Mojave and I think Apple updates leave alone and 
> macOS itself doesn’t really use postfix, it is a leftover. I don’t 
> know if this is still possible in later versions of macOS. If it 
> isn’t because Apple has locked these down, a more intelligent 
> startup command could be written that works around this macOS 
> behaviour.

Another approach is to boot into "Recovery Mode" and disable the launchd 

    launchctl unload -w 

If you've persistently disabled SIP (which you really shouldn't...) you 
can do that as root without booting into Recovery Mode.

Bill Cole
bill at or billcole at
(AKA @grumpybozo and many * addresses)
Not Currently Available For Hire

More information about the macports-users mailing list