summaryrefslogtreecommitdiffstats
path: root/etc/sendmail
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2002-04-14 19:20:26 +0000
committergshapiro <gshapiro@FreeBSD.org>2002-04-14 19:20:26 +0000
commitb7ddd3c1a92f5a06e9889839c02f07c72af84352 (patch)
tree7f0caf6aafa657815db43e70fde05e8de921c2a9 /etc/sendmail
parentde25faf452e88d5a25f663bbd76770858c7ee863 (diff)
downloadFreeBSD-src-b7ddd3c1a92f5a06e9889839c02f07c72af84352.zip
FreeBSD-src-b7ddd3c1a92f5a06e9889839c02f07c72af84352.tar.gz
Provide a new make.conf knob, SENDMAIL_SUBMIT_MC to allow users to pick
the .mc file used for /etc/mail/submit.cf. By default, /etc/mail/freebsd.submit.mc is installed and used. Requested by: fenner Submitted by: ume MFC after: 1 week
Diffstat (limited to 'etc/sendmail')
-rw-r--r--etc/sendmail/Makefile42
1 files changed, 36 insertions, 6 deletions
diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile
index 3a39a1c..6cc5256 100644
--- a/etc/sendmail/Makefile
+++ b/etc/sendmail/Makefile
@@ -37,9 +37,16 @@ INSTALL_CF= ${SENDMAIL_CF}
.endif
.endif
+.ifndef SENDMAIL_SET_USER_ID
+.if defined(SENDMAIL_SUBMIT_MC)
+INSTALL_SUBMIT_CF=${SENDMAIL_SUBMIT_MC:R}.cf
+.endif
+.endif
+
DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf
+DEST_SUBMIT_CF= ${DESTDIR}/etc/mail/submit.cf
-ALL+= ${INSTALL_CF}
+ALL+= ${INSTALL_CF} ${INSTALL_SUBMIT_CF}
# Make sure we don't remove /etc/mail/sendmail.cf on make clean
# since this will break a running system during a buildworld.
@@ -49,6 +56,12 @@ CLEANFILES+= ${INSTALL_CF}
.endif
.endif
+.if defined(INSTALL_SUBMIT_CF)
+.if ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF}
+CLEANFILES+= ${INSTALL_SUBMIT_CF}
+.endif
+.endif
+
# Additional .cf files to build
.if defined(SENDMAIL_ADDITIONAL_MC)
SENDMAIL_ADDITIONAL_CF= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g}
@@ -60,7 +73,7 @@ all: ${ALL}
depend:
-install: ${INSTALL_CF}
+install: ${INSTALL_CF} ${INSTALL_SUBMIT_CF}
.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
@echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
@false
@@ -70,14 +83,22 @@ install: ${INSTALL_CF}
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
${DEST_CF}
.endif
+.endif
.if defined(SENDMAIL_ADDITIONAL_CF)
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 \
${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail
.endif
+.ifndef SENDMAIL_SET_USER_ID
+.if defined(INSTALL_SUBMIT_CF)
+.if ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF}
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF}
+.endif
+.endif
.endif
# Helper for src/etc/Makefile
-distribution: freebsd.cf freebsd.mc ${INSTALL_CF}
+distribution: freebsd.cf freebsd.mc ${INSTALL_CF} ${INSTALL_SUBMIT_CF}
.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
@echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
@false
@@ -97,11 +118,20 @@ distribution: freebsd.cf freebsd.mc ${INSTALL_CF}
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
${DEST_CF}
.endif
-.ifndef SENDMAIL_SET_USER_ID
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${CFDIR}/cf/submit.mc \
- ${DESTDIR}/etc/mail/submit.mc
+ ${DESTDIR}/etc/mail/freebsd.submit.mc
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${CFDIR}/cf/submit.cf \
- ${DESTDIR}/etc/mail/submit.cf
+ ${DESTDIR}/etc/mail/freebsd.submit.cf
+.ifndef SENDMAIL_SET_USER_ID
+.if defined(INSTALL_SUBMIT_CF)
+.if ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF}
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF}
+.endif
+.else
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${CFDIR}/cf/submit.cf \
+ ${DEST_SUBMIT_CF}
+.endif
.endif
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \
${DESTDIR}/etc/mail/helpfile
OpenPOWER on IntegriCloud