> On Dec 28, 2018, at 11:47 AM, Robert Chalmers <racu...@gmail.com> wrote:
> 
> Thanks,
> Well, I was almost correct:-)
> Mail looked for sendmail in /user/sbin which in turn, being the Apple 
> version, looked for the /etc/postfix config files. 
> 
> So I now:
> 1. Removed the sym link from /etc/postfix -> /user/local/etc/postfix
> 2. Moved /usr/sbin/sendmail to /usr/sbin/sendmail.OFF
> 3. Symlinked:  ln -s /usr/local/sbin/sendmail -> /usr/sbin/sendmai

You don't need to do this, that will break every upgrade, and changing
it requires to disable Apple's system-integrity protection (at least
temporarily, and reboot to change it back and forth).

Instead, it is sufficient to:

Build your Postfix with binaries in 
/usr/local/{sbin,libexec/postfix,lib/postfix}, *but*
configuration in /etc/postfix.  Leave /usr/sbin/sendmail alone.

In /etc/postfix/main.cf, explicitly record your build parameters,
presumably something like:

        command_directory = /usr/local/sbin
        daemon_directory = /usr/local/libexec/postfix
        meta_directory = /usr/local/libexec/postfix
        shlib_directory = /usr/local/lib/postfix

With this, Apple's "/usr/sbin/sendmail" will invoke your "postdrop"
executable, and the interface between sendmail(1) and postdrop(1)
is stable enough to allow this to work.  The sendmail(1) program
writes a queue file via a pipe to postdrop(1), and postdrop(1)
will understand the queue file format, which is quite stable, and
when change does happen, it evolves in such a way that new Postfix
versions understand older formats.

-- 
        Viktor.

Reply via email to