Postfix, CAfile and Macports

Rainer Müller raimue at macports.org
Fri Jan 27 09:13:02 UTC 2017


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?

> After renaming the /etc/postfix/ directory I got lots of errors when
> calling mailx. And I could not get mailx to work, without putting an
> /etc/postfix/main.cf in place.

The system postfix is invoked automatically via launchd, see its
configuration in /System/Library/LaunchDaemons/org.postfix.master.plist.

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.

Probably should disable this launchd daemon to avoid running the system
postfix. Then you would need to tell mailx to use the right sendmail,
'mailx -S sendmail=/opt/local/sbin/sendmail ...' or put it into ~/.mailrc.

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.

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.

Rainer


More information about the macports-dev mailing list