Bug 44256

Summary: /etc/mail/Makefile doesn't build submit.cf file
Product: Base System Reporter: matt
Component: binAssignee: Gregory Neil Shapiro <gshapiro>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description matt 2002-10-19 05:10:01 UTC
	When issuing a 'make' from /etc/mail, the sendmail.cf file 
	(or `hostname`.cf file) is generated from the corresponding .mc
	file, and if `hostname`.mc doesn't exist, freebsd.mc is used as
	a template.

	According to the makefile, the same should hold true for the
	generation of the submit.cfg file, but this does not occur.

How-To-Repeat: 
	Touch freebsd.submit.mc, issue 'make'.  No `hostname`.submit.mc
	or submit.cf is created.
Comment 1 matt 2002-10-24 00:22:11 UTC
My report is slightly inaccurate, as the makefile *will* create a submit.cf,
but it doesn't create it in the `hostname`.submit.cf format that sendmail.cf
is created in, and will not use a `hostname`.submit.mc as a template if it
exists.

I still believe that using `hostname`.submit.mc as a template is a good
idea -- not only does it help people like me who deploy handfuls of boxes at
one (each with custom configs), but it keeps things symmetric.
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2002-10-25 02:53:34 UTC
On 2002-10-23 16:30, Matthew Emmerton wrote:
> My report is slightly inaccurate, as the makefile *will* create a
> submit.cf, but it doesn't create it in the `hostname`.submit.cf
> format that sendmail.cf is created in, and will not use a
> `hostname`.submit.mc as a template if it exists.

It does.  At least, after setting the proper make.conf variables:
	SENDMAIL_MC
	SENDMAIL_SUBMIT_MC
	SENDMAIL_ADDITIONAL_MC

A small change to /etc/mail/Makefile can make SENDMAIL_SUBMIT_MC
default to `hostname`.submit.mc too, if that's what you are after:

%%%
--- Makefile.orig	Fri Oct 25 04:49:43 2002
+++ Makefile	Fri Oct 25 04:51:27 2002
@@ -69,7 +69,13 @@
 	cp freebsd.mc ${SENDMAIL_MC}
 .endif

-SENDMAIL_SUBMIT_MC?=	freebsd.submit.mc
+.ifndef SENDMAIL_SUBMIT_MC
+SENDMAIL_SUBMIT_MC!=	hostname
+SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc
+
+${SENDMAIL_SUBMIT_MC}:
+	cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC}
+.endif

 INSTALL_CF=		${SENDMAIL_MC:R}.cf

%%%

Giorgos.
Comment 3 matt 2002-10-26 03:28:41 UTC
> On 2002-10-23 16:30, Matthew Emmerton wrote:
> > My report is slightly inaccurate, as the makefile *will* create a
> > submit.cf, but it doesn't create it in the `hostname`.submit.cf
> > format that sendmail.cf is created in, and will not use a
> > `hostname`.submit.mc as a template if it exists.
> 
> It does.  At least, after setting the proper make.conf variables:
> SENDMAIL_MC
> SENDMAIL_SUBMIT_MC
> SENDMAIL_ADDITIONAL_MC
> 
> A small change to /etc/mail/Makefile can make SENDMAIL_SUBMIT_MC
> default to `hostname`.submit.mc too, if that's what you are after:
> 
> %%%
> --- Makefile.orig Fri Oct 25 04:49:43 2002
> +++ Makefile Fri Oct 25 04:51:27 2002
> @@ -69,7 +69,13 @@
>   cp freebsd.mc ${SENDMAIL_MC}
>  .endif
> 
> -SENDMAIL_SUBMIT_MC?= freebsd.submit.mc
> +.ifndef SENDMAIL_SUBMIT_MC
> +SENDMAIL_SUBMIT_MC!= hostname
> +SENDMAIL_SUBMIT_MC:= ${SENDMAIL_SUBMIT_MC}.submit.mc
> +
> +${SENDMAIL_SUBMIT_MC}:
> + cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC}
> +.endif
> 
>  INSTALL_CF= ${SENDMAIL_MC:R}.cf
> 
> %%%
> 
> Giorgos.

How is this patch different from the one in my PR?

--
Matt Emmerton
Comment 4 Gregory Neil Shapiro freebsd_committer freebsd_triage 2003-02-08 19:46:21 UTC
Responsible Changed
From-To: freebsd-bugs->gshapiro

Over to sendmail maintainer
Comment 5 Gregory Neil Shapiro freebsd_committer freebsd_triage 2003-07-06 20:11:12 UTC
State Changed
From-To: open->patched

Your patch has been applied to the HEAD.  The PR will be closed 
when it is MFC'ed into RELENG_4.
Comment 6 Gregory Neil Shapiro freebsd_committer freebsd_triage 2003-07-13 00:36:04 UTC
State Changed
From-To: patched->closed

The change has been MFC'ed to RELENG_4.