S.N.Grigoriev wrote:
I would like to know if there is a way to completely replace the base sendmail with a ports one. The goal is to have corresponding files on the traditional places (not in /usr/local) and to use the system sendmail startup script but not /usr/local/etc/rc.d/sendmail.sh.
That's not the usual approach with sendmail, unlike several other software packages.Because of the existence of mailer.conf(5) you can achieve equivalent functionality without overwriting the base system sendmail. With the
following contents:% cat /etc/mail/mailer.conf # $FreeBSD: src/etc/mail/mailer.conf,v 1.3.36.1 2009/08/03 08:13:06 kensmith Exp $
# # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail # sendmail /usr/local/sbin/sendmail send-mail /usr/local/sbin/sendmail mailq /usr/local/sbin/sendmail newaliases /usr/local/sbin/sendmail hoststat /usr/local/sbin/sendmail purgestat /usr/local/sbin/sendmail all sendmail related commands are mapped onto the ports version of sendmail,installed under LOCALBASE=/usr/local as usual. These commands are in fact exactly the same wrapper scripts as used with the system sendmail. With this setup it is not necessary to use the init script provided by the sendmail port: simply adding
sendmail_enable="YES"to /etc/rc.conf will now cause the ports version of sendmail to be started using /etc/rc.d/sendmail. In addition, the following entries in /etc/make.conf will allow rebuild sendmail configurations and db maps using the Makefile in /etc/mail:
WITH_SENDMAIL_PORT= yes SENDMAIL_CF_DIR= /usr/local/share/sendmail/cf MAKEMAP= /usr/local/sbin/makemapFinally, adding WITHOUT_SENDMAIL=yes
to /etc/src.conf will suppress building sendmail as part of the base system,
while still building and installing the mailwrapper commands.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature
