Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2001 12:54:41 -0700 (PDT)
From:      brett@lariat.org
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/26299: Improvement to Makefile in /etc/mail allows library of mc's for different hosts
Message-ID:  <200104021954.f32JsfU17925@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         26299
>Category:       misc
>Synopsis:       Improvement to Makefile in /etc/mail allows library of mc's for different hosts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 02 13:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Brett Glass
>Release:        4.3-RC2
>Organization:
>Environment:
>Description:
The Makefile in /etc/mail is a great improvement over past releases.
However, it doesn't make it easy to keep a set of different .mc
files on hand for different hosts! I've added a bit of code to
the Makefile that looks at the output of `hostname` and uses
`hostname`.mc as the .mc file from which sendmail.cf is built.
This lets an administrator take a library of .mc files from host
to host; the correct one is installed according to the host name.
>How-To-Repeat:

>Fix:
The code I use is as follows (replacing the line that says 

SENDMAIL_MC?=           freebsd.mc

in the original):

# If the environment variable SENDMAIL_MC is defined, build cf from
# that. Otherwise, try to build `hostname`.mc. If there's no such
# file, fall back to freebsd.mc.

.ifndef SENDMAIL_MC
SENDMAIL_MC!=           hostname
SENDMAIL_MC:=           ${SENDMAIL_MC}.mc

.if !exists(${SENDMAIL_MC})
SENDMAIL_MC=            freebsd.mc
.endif
.endif

(and then continuing with

INSTALL_CF=             ${SENDMAIL_MC:R}.cf

etc.)

etc.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104021954.f32JsfU17925>