John Beck wrote: > The programmatic interface to sendmail involves exec'ing a program > named /usr/lib/sendmail (or, outside Solaris, /usr/sbin/sendmail). > Administrators wishing to use an alternate MTA have to replace that > binary, which generally doesn't play all that well with packaging > and upgrade (sendmail isn't an editable file; multiple packages > delivering the same file is considered a no-no, etc.,). > > * Solution > > The common BSD distributions (FreeBSD, NetBSD, OpenBSD) include a > program called "mailwrapper" which allows for easy, packaging-safe > selection of the shell-command level interface to the default system > MTA. /usr/sbin/sendmail is a symlink to the mailwrapper binary, and > the "real" sendmail is installed somewhere else (on the *BSDs, > this is /usr/libexec/sendmail/sendmail). > > A default mailer.conf is delivered so that mailwrapper exec's > through to the real sendmail binary; an admin wishing to select > an alternate MTA will install it wherever they like (/opt, /usr/pkg, > etc.) and then edit the mailer.conf file as appropriate for the > new MTA.
What is the advantage of mailwrapper versus merely moving the sendmail binary to somewhere else and placing default symlinks at /usr/sbin/sendmail and usr/lib/sendmail pointing to it, which symlinks can be replaced as required by the installer of an alternate MTA? - Jeremy Harris
