From root@gits.dyndns.org  Sat Jul 13 17:02:08 2002
Return-Path: <root@gits.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9C2F137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Jul 2002 17:02:08 -0700 (PDT)
Received: from smtp.noos.fr (verlaine.noos.net [212.198.2.73])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5E14243E58
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Jul 2002 17:02:07 -0700 (PDT)
	(envelope-from root@gits.dyndns.org)
Received: (qmail 31930190 invoked by uid 0); 14 Jul 2002 00:02:04 -0000
Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.229.153]) (envelope-sender <root@gits.dyndns.org>)
          by 212.198.2.73 (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 14 Jul 2002 00:02:04 -0000
Received: from gits.gits.dyndns.org (xq0ugmpt64yrpzne@localhost [127.0.0.1])
	by gits.gits.dyndns.org (8.12.5/8.12.5) with ESMTP id g6E023dT055768;
	Sun, 14 Jul 2002 02:02:03 +0200 (CEST)
	(envelope-from root@gits.dyndns.org)
Received: (from root@localhost)
	by gits.gits.dyndns.org (8.12.5/8.12.5/Submit) id g6E023PG055767;
	Sun, 14 Jul 2002 02:02:03 +0200 (CEST)
	(envelope-from root)
Message-Id: <200207140002.g6E023PG055767@gits.gits.dyndns.org>
Date: Sun, 14 Jul 2002 02:02:03 +0200 (CEST)
From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Reply-To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Gregory Neil Shapiro <gshapiro@freebsd.org>
Subject:
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         40540
>Category:       bin
>Synopsis:       allow multiple alias file to be defined in SENDMAIL_ALIASES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gshapiro
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 13 17:10:01 PDT 2002
>Closed-Date:    Mon Feb 17 11:15:59 PST 2003
>Last-Modified:  Mon Feb 17 11:15:59 PST 2003
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
ACME
>Environment:
System: FreeBSD gits 4.6-STABLE FreeBSD 4.6-STABLE #16: Sat Jul 6 19:06:54 CEST 2002 root@gits:/disk2/freebsd/stable/src/sys/compile/CUSTOM i386
>Description:
	this patch allow multiple alias file to be defined in SENDMAIL_ALIASES.
>How-To-Repeat:
	make SENDMAIL_ALIASES="/etc/mail/aliases /etc/mail/majordomo"
	kaboum!
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/etc/mail/Makefile,v
retrieving revision 1.9.2.19
diff -u -r1.9.2.19 Makefile
--- Makefile	24 May 2002 15:41:04 -0000	1.9.2.19
+++ Makefile	13 Jul 2002 23:54:54 -0000
@@ -89,6 +89,8 @@
 SENDMAIL_CF_DIR?=	/usr/src/contrib/sendmail/cf
 .endif
 
+M4FLAGS=	-D_CF_DIR_=${SENDMAIL_CF_DIR}/
+
 #
 # The sendmail startup script
 #
@@ -156,16 +158,18 @@
 .SUFFIXES:	.cf .mc
 
 .mc.cf:		${M4FILES}
-	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
+	${M4} ${M4FLAGS} ${SENDMAIL_M4_FLAGS} \
 		${SENDMAIL_CF_DIR}/m4/cf.m4 ${@:R}.mc > ${.TARGET}
 
 #
 # Aliases are handled separately since they normally reside in /etc
 # and can be rebuild without the help of makemap.
 #
-${SENDMAIL_ALIASES}.db:	${SENDMAIL_ALIASES}
-	${SENDMAIL} -bi
+.for _f in ${SENDMAIL_ALIASES}
+${_f}.db:	${_f}
+	${SENDMAIL} -bi -OAliasFile=${.ALLSRC}
 	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
+.endfor
 
 #
 # ------------------------------------------------------------------------
@@ -203,7 +207,7 @@
 .endif
 .endif
 
-aliases:	${SENDMAIL_ALIASES}.db
+aliases:	${SENDMAIL_ALIASES:%=%.db}
 
 maps:		${SENDMAIL_MAP_OBJ}
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->gshapiro 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Sun Jul 14 01:26:25 PDT 2002 
Responsible-Changed-Why:  
Over to sendmail maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40540 

From: Adrian Filipi-Martin <adrian@ocean.us>
To: freebsd-gnats-submit@FreeBSD.org, cyrille.lefevre@laposte.net
Cc: adrian@ubergeeks.com
Subject: =?iso-8859-1?Q?Re: bin/40540: allow multiple alias file to be defined in SENDMAIL=5fALIASES?=
Date: Tue, 19 Nov 2002 21:14:12 -0500 (EST)

 This simpler patch also fixes the problem.  It still allows sendmail to
 process all of the alias files in one fell swoop.
 
 	Adrian
 
 --- Makefile	2002/11/11 16:25:26	1.1
 +++ Makefile	2002/11/20 02:05:13
 @@ -163,7 +163,7 @@
  # Aliases are handled separately since they normally reside in /etc
  # and can be rebuild without the help of makemap.
  #
 -${SENDMAIL_ALIASES}.db:	${SENDMAIL_ALIASES}
 +${SENDMAIL_ALIASES:S/$/.db/}:	${SENDMAIL_ALIASES}
  	${SENDMAIL} -bi
  	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
  

From: Ceri Davies <ceri@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/40540: allow multiple alias file to be defined in SENDMAIL=5fALIASES?=
Date: Mon, 2 Dec 2002 19:54:21 +0000

 Adding to audit trail:
 
 Message-Id: <20021126025751.GF5560@gits.dyndns.org>
 Date: Tue, 26 Nov 2002 03:57:51 +0100
 From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
 To: Adrian Filipi-Martin <adrian@ocean.us>
 Cc: freebsd-gnats-submit@FreeBSD.org, adrian@ubergeeks.com
 In-Reply-To: <200211200214.gAK2ECIY062595@atlantic.omnet.com>
 Subject: pending/45740: Re: =?us-ascii?B?PT9pc28tODg1OS0xP1E/UmU6?=
 	=?us-ascii?Q?_bin=2F40540=3A_allo?=
 	=?us-ascii?Q?w?= multiple alias file to be defined in SENDMAIL=5fALIASES?=
 References: <200211200214.gAK2ECIY062595@atlantic.omnet.com>
 
  On Tue, Nov 19, 2002 at 09:14:12PM -0500, Adrian Filipi-Martin wrote:
  > This simpler patch also fixes the problem.  It still allows sendmail to
  > process all of the alias files in one fell swoop.
  
  no, this patch won't work as expected. if one alias file is modified,
  only this one should be rebuild, not all. also, you forgot the
  -OAliasFile=${.TARGET} parameter to sendmail.
  
  Cyrille.
  -- 
  Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
State-Changed-From-To: open->patched 
State-Changed-By: gshapiro 
State-Changed-When: Sat Feb 8 13:56:48 PST 2003 
State-Changed-Why:  
Thanks for the patch, it has been applied to CURRENT and will be MFC'ed in 
a few days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40540 
State-Changed-From-To: patched->closed 
State-Changed-By: gshapiro 
State-Changed-When: Mon Feb 17 11:15:26 PST 2003 
State-Changed-Why:  
The change has been MFC'ed to RELENG_4. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40540 
>Unformatted:
