sendmail transition: Do not pre-generate
authorJohn Marino <>
Tue, 10 Mar 2015 10:46:07 +0000 (11:46 +0100)
committerJohn Marino <>
Tue, 10 Mar 2015 11:54:37 +0000 (12:54 +0100)
Originally a starter file was created using the .mc template
files and the m4 files installed from contrib/sendmail-8.14 directory.
This starter was installed with "make distribution".  The
template files were only changed with "make upgrade" (not sure why but
maybe people tried editing them directly) and the Makefile was only
installed once.

This commit accomplishes these things:
  * No or file is created.  This was the last
    user of contrib/sendmail-8.14
  * etc/sendmail was altered to just install files
  * the README file the was recently placed in libexec/dma was relocated
    to etc/sendmail and updated
  * the /etc/mail/Makefile is now updated with installworld
  * the dragonfl*.mc templates are now updated with installworld

The suggested method to creating /etc/mail/ and
/etc/mail/ now on a new system is:
  1. cd /etc/mail
  2. type "make cf"
  3. <optional> edit new <hostname>.mc and <hostname> files
  4. <optional> type "make cf" again
  5. type "make install"

etc/sendmail/Makefile.4install [moved from etc/mail/Makefile with 100% similarity]
etc/sendmail/README [moved from libexec/dma/mailer-conf/README with 82% similarity]

index 9ab29f4..1424880 100644 (file)
@@ -60,8 +60,8 @@ MTREE=        BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
 PPPCNF=        ppp.conf
-ETCMAIL=Makefile mailer.conf access.sample virtusertable.sample \
-       mailertable.sample aliases
+ETCMAIL=aliases mailer.conf access.sample virtusertable.sample \
+       mailertable.sample
 # List of libraries in /usr/lib/compat that might have to be removed
 # from /usr/lib.
index 5e280d3..7631930 100644 (file)
@@ -1,92 +1,19 @@
-#      @(#)Makefile    8.19 (Berkeley) 1/14/97
-# $FreeBSD: src/etc/sendmail/Makefile,v 1.31 2004/01/22 17:51:02 ru Exp $
+# This installs the sendmail mc templates and the makefile used to
+# generate and  A README is also installed
-M4=            m4
-CHMOD=         chmod
-ROMODE=                444
-RM=            rm -f
+FILESDIR=      /etc/mail/
+FILESMODE=     644
-SENDMAIL_DIR=  ${.CURDIR}/../../contrib/sendmail-8.14
-SMDIR=         ${SENDMAIL_DIR}/sendmail
+FILES+=                Makefile \
+               README \
+      \
-# this is overkill, but....
-M4FILES!=      find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print
+CLEANFILES=    Makefile
-.SUFFIXES: .mc .cf
+Makefile: Makefile.4install
+       cp ${.ALLSRC} ${.TARGET} ${M4FILES}
-       ${RM} ${.TARGET}
-           ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET}
-       ${CHMOD} ${ROMODE} ${.TARGET}
-DEST_CF=       ${DESTDIR}/etc/mail/
-DEST_SUBMIT_CF=        ${DESTDIR}/etc/mail/
-# Local SENDMAIL_MC may be set in /etc/make.conf.
-# Warning!  If set, this causes 'make install' to always copy it
-# over /etc/mail/!!!
-# Caveat emptor!  Be sure you want this before you enable it.
-.if defined(SENDMAIL_MC)
-ALL+=          ${INSTALL_CF}
-.if defined(SENDMAIL_SUBMIT_MC)
-ALL+=          ${INSTALL_SUBMIT_CF}
-# Additional .cf files to build.
-${mc:T:R}.cf: ${mc}
-all: ${ALL}
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-           ${.CURDIR}/ ${DESTDIR}/etc/mail
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-           ${.CURDIR}/ ${DESTDIR}/etc/mail
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \
-           /dev/null ${DESTDIR}/var/log/
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-  ${DEST_CF}
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-           ${.CURDIR}/ ${DESTDIR}/etc/mail
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-           ${.CURDIR}/ ${DESTDIR}/etc/mail
-.if defined(INSTALL_CF) && ${INSTALL_CF} != ${DEST_CF}
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-           ${INSTALL_CF} ${DEST_CF}
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-           ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+beforedepend:  Makefile
 .include <>
similarity index 82%
rename from libexec/dma/mailer-conf/README
rename to etc/sendmail/README
index 237bdb2..54b09b3 100644 (file)
@@ -19,11 +19,14 @@ if both sendmail_enable and sendmail_submit_enable are set to "NO", you
 must do the following for command line submitted mail:
    Designate an alternative host for the submission agent to contact
-   by altering /etc/mail/ (or setting SENDMAIL_SUBMIT_MC
-   in /etc/make.conf to an alternate .mc file) and using
-   'make install-submit-cf' in /etc/mail/.  Change the FEATURE(msp) line
-   to FEATURE(msp, hostname) where hostname is the fully qualified hostname
-   of the alternative host.
+   by creating /etc/mail/<hostname> or using an alternate .mc
+   file and setting SENDMAIL_SUBMIT_MC in /etc/make.conf.  Do not edit
+ directly as it will be overwritten eventually, but
+   it certainly can be copied to be used as a template.
+   Type 'make install-submit-cf' in /etc/mail/ to generate the
+   file.  Change the FEATURE(msp) line to FEATURE(msp, hostname) where
+   hostname is the fully qualified hostname of the alternative host.
 Also, as of 8.12, a new queue-running daemon is started to make sure mail
 doesn't remain in the client mail queue.  By default, it simply runs the
index a5c20cb..1e87feb 100644 (file)
@@ -4,8 +4,7 @@
 FILESDIR=      /etc/mail/
 FILESMODE=     644
-FILES+=                README \
-               mailer.conf.dma \
+FILES+=                mailer.conf.dma \
                mailer.conf.opensmtpd \
                mailer.conf.postfix \