diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2001-05-15 16:01:40 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2001-05-15 16:01:40 +0000 |
commit | 6f3eff710681ba79fd764a5d21243597a6a89c35 (patch) | |
tree | c775f19980f7a66da477bf9f8370349650ef1969 | |
parent | 1d1fcd5758ba41a96d7817083b2cc25c90d4a866 (diff) | |
download | FreeBSD-src-6f3eff710681ba79fd764a5d21243597a6a89c35.zip FreeBSD-src-6f3eff710681ba79fd764a5d21243597a6a89c35.tar.gz |
Make the default .mc file be `hostname`.mc if SENDMAIL_MC make.conf knob
is not set. This allows admins to create a per-machine configuration file
while leaving the freebsd.mc template pristine. Provide a rule to create
`hostname`.mc from freebsd.mc if it doesn't exist.
PR: misc/26299
MFC after: 8 days
-rw-r--r-- | etc/mail/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/etc/mail/Makefile b/etc/mail/Makefile index b04c73a..930efee 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -25,11 +25,13 @@ # # ------------------------------------------------------------------------ # -# This makefile uses `freebsd.mc' as the default .mc file. This can +# This makefile uses `<HOSTNAME>.mc' as the default .mc file. This can # be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.: # # SENDMAIL_MC=/etc/mail/myconfig.mc # +# If '<HOSTNAME>.mc' does not exist, it is created using 'freebsd.mc' +# as a template. # ------------------------------------------------------------------------ # # The Makefile knows about the following maps: @@ -37,7 +39,14 @@ # uucpdomain, virtusertable # -SENDMAIL_MC?= freebsd.mc +.ifndef SENDMAIL_MC +SENDMAIL_MC!= hostname +SENDMAIL_MC:= ${SENDMAIL_MC}.mc + +${SENDMAIL_MC}: freebsd.mc + cp freebsd.mc ${SENDMAIL_MC} +.endif + INSTALL_CF= ${SENDMAIL_MC:R}.cf SENDMAIL_ALIASES?= /etc/mail/aliases |