macports postfix vs. OSX postfix (was: Postfix, CAfile and Macports)

Johannes Kastl mail at ojkastl.de
Fri Jan 27 10:33:48 UTC 2017


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27.01.17 10:13 Rainer Müller wrote:
> On 2017-01-27 09:07, Johannes Kastl wrote:
>> I found the reason. Somehow the postfix started via macports 
>> 'port load postfix' and with all paths in main.cf pointing to 
>> /opt/ used some configuration in /etc/postfix/. Or maybe 
>> /opt/local/bin/mailx used it.
> 
> Are you sure it is actually the postfix from MacPorts?

I am sure it was not. That was the whole problem. I guess it was not
postfix loading the wrong files, I guess you are right and mailx was
not picking the right sendmail...

> mailx would submit mail via /usr/bin/sendmail, which then calls 
> /usr/sbin/postdrop, dropping the mail into 
> /var/spool/postfix/maildrop. This event is then picked up by 
> launchd and it starts the postfix master process.

I guess somehow mail must have used OSX' sendmail, I do not know why.

> Probably should disable this launchd daemon to avoid running the
>  system postfix.

I would like to:
>> sudo launchctl unload -w
> /System/Library/LaunchDaemons/com.apple.postfix.master.plist
results in:
> /System/Library/LaunchDaemons/com.apple.postfix.master.plist: 
> Operation not permitted while System Integrity Protection is 
> engaged

I'll have to dig how to work around that "System Integrity
Protection"...

> Then you would need to tell mailx to use the right sendmail,
> 'mailx -S sendmail=/opt/local/sbin/sendmail ...' or put it into 
> ~/.mailrc.

This is what I used.

> Other software might still just use the default
> /usr/sbin/sendmail, so to handle all mails system-wide all
> software supposed to send mails would need to be instructed
> accordingly.

I guess I'll link macports sendmail to /usr/sbin/sendmail to avoid
that. But how to avoid OSX overwriting that during upgrades?

> Maybe this could be solved with a small compatibility launchd 
> daemon just moving all dropped mails from 
> /var/spool/postfix/maildrop to wherever the MacPorts postfix has
>  its maildrop spool.

That would be nice.

Johannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAliLIgwACgkQzi3gQ/xETbIMRQCfTFCviVZOsX3CTV4OcOsbNTCU
iVoAnicB6dC95avgo0uaWrRelmGGDbV+
=5RrE
-----END PGP SIGNATURE-----



More information about the macports-dev mailing list