NetBSD Problem Report #46694

From makoto@mx.ki.nu  Thu Jul 12 03:37:19 2012
Return-Path: <makoto@mx.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 93A8363B85F
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Jul 2012 03:37:19 +0000 (UTC)
Message-Id: <201207120337.q6C3bGka019279@mx.ki.nu>
Date: Thu, 12 Jul 2012 12:37:16 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: [PATCH] cf/netbsd-proto.mc for mail/sendmail
X-Send-Pr-Version: 3.95

>Number:         46694
>Category:       pkg
>Synopsis:       Add used-be-default config file netbsd-proto.mc for sendmail (cf/cf)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jnemeth
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 12 03:40:00 +0000 2012
>Closed-Date:    Sun Jun 15 20:53:06 +0000 2014
>Last-Modified:  Sun Jun 15 20:53:06 +0000 2014
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.99.4
>Organization:
KINU Corporation
>Environment:


System: NetBSD modena 6.99.4 NetBSD 6.99.4 (GENERIC) #2: Tue Apr 10 23:45:21 JST 2012 root@modena:/export/src/src/sys/arch/amd64/compile/obj/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	(1) In the old days, sendmail is default, and netbsd-proto.mc is
	default configuration setup. Revive that setup. See
           http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/gnu/usr.sbin/sendmail/cf/cf/Attic/netbsd-proto.mc
	(2) Recent MTA setup may need port 587 enabled server.
	Include that setup in netbsd-proto.mc also.
>How-To-Repeat:
	(cd /usr/pkgsrc/mail/sendmail; make package-install);
	and follow the instruction in
	/usr/pkg/share/sendmail/cf/README. 
	You may have slight difficult time which is default.
>Fix:
Index: mail/sendmail/Makefile
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/mail/sendmail/Makefile,v
retrieving revision 1.109
diff -u -r1.109 Makefile
--- mail/sendmail/Makefile	12 Mar 2010 13:19:49 -0000	1.109
+++ mail/sendmail/Makefile	12 Jul 2012 03:18:42 -0000
@@ -86,6 +86,7 @@
 	${INSTALL_DATA} ${WRKDIR}/mailer.conf \
 		${DESTDIR}${PREFIX}/share/examples/sendmail/
 	cd ${WRKSRC}/cf && pax -rw -pp -pm -s',^.*\.orig$$,,' . ${DESTDIR}${PREFIX}/share/sendmail
+	cp ${FILESDIR}/netbsd-proto.mc ${DESTDIR}${PREFIX}/share/sendmail/cf/

 	${INSTALL_DATA} ${WRKSRC}/obj.`${UNAME} -srm | tr \  . | tr \/ - | sed s/sun4./sun4/`/libsm/libsm.a \
 		${DESTDIR}${PREFIX}/lib
Index: mail/sendmail/PLIST
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/mail/sendmail/PLIST,v
retrieving revision 1.18
diff -u -r1.18 PLIST
--- mail/sendmail/PLIST	11 Jun 2011 04:44:08 -0000	1.18
+++ mail/sendmail/PLIST	12 Jul 2012 03:16:28 -0000
@@ -71,6 +71,7 @@
 share/sendmail/cf/mail.cs.mc
 share/sendmail/cf/mail.eecs.mc
 share/sendmail/cf/mailspool.cs.mc
+share/sendmail/cf/netbsd-proto.mc
 share/sendmail/cf/python.cs.mc
 share/sendmail/cf/s2k-osf1.mc
 share/sendmail/cf/s2k-ultrix4.mc
Index: mail/sendmail/files/netbsd-proto.mc
===================================================================
RCS file: mail/sendmail/files/netbsd-proto.mc
diff -N mail/sendmail/files/netbsd-proto.mc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mail/sendmail/files/netbsd-proto.mc	12 Jul 2012 03:29:19 -0000
@@ -0,0 +1,66 @@
+# $NetBSD$
+
+divert(-1)
+#
+# Copyright (c) 1994 Adam Glass
+# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1988, 1993
+#	The Regents of the University of California.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#	This product includes software developed by the University of
+#	California, Berkeley and its contributors.
+# 4. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+
+#
+#  This is the prototype file for a configuration that supports SMTP
+#  connections via TCP and some commonly required features.
+#
+
+include(`../m4/cf.m4')
+VERSIONID(`@(#)netbsd-proto.mc	$Revision$')
+OSTYPE(bsd4.4)dnl
+DOMAIN(generic)dnl
+FEATURE(genericstable,DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`genericstable')
+FEATURE(mailertable,  DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`mailertable')
+FEATURE(virtusertable,DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`virtusertable')
+FEATURE(domaintable,  DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`domaintable')
+FEATURE(access_db,    DATABASE_MAP_TYPE` -T<TMPF> -o 'MAIL_SETTINGS_DIR`access')
+FEATURE(`redirect')
+FEATURE(`no_default_msa')
+MAILER(local)dnl
+MAILER(smtp)dnl
+
+# Enable port 587 also to serve as local submission server
+DAEMON_OPTIONS(`Family=inet, address=127.0.0.1, Name=MTA, Modifiers=O, Port=smtp')dnl
+DAEMON_OPTIONS(`Family=inet, address=127.0.0.1, Name=MSA, Modifiers=O, Port=submission')dnl
+# Enable IPv6.  IPv6 is marked as optional so the configuration file
+# can be used on IPV4-only kernel as well.
+DAEMON_OPTIONS(`Family=inet6, address=::1, Name=MTA6, Modifiers=O, Port=smtp')dnl
+DAEMON_OPTIONS(`Family=inet6, address=::1, Name=MSA6, Modifiers=O, Port=submission')dnl
+# Above setup is outgoing service only, replace
+# 127.0.0.1 by 0.0.0.0  and  ::1 by :: to accept incoming mails.

>Release-Note:

>Audit-Trail:
From: "John Nemeth" <jnemeth@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46694 CVS commit: pkgsrc/mail/sendmail
Date: Sun, 15 Jun 2014 20:48:50 +0000

 Module Name:	pkgsrc
 Committed By:	jnemeth
 Date:		Sun Jun 15 20:48:50 UTC 2014

 Modified Files:
 	pkgsrc/mail/sendmail: Makefile Makefile.common PLIST distinfo
 	    options.mk
 	pkgsrc/mail/sendmail/files: sendmail.sh site.config.m4 smmsp.sh
 	pkgsrc/mail/sendmail/patches: patch-aa patch-af patch-ai
 Added Files:
 	pkgsrc/mail/sendmail: TODO
 	pkgsrc/mail/sendmail/files: netbsd-proto.mc site.config.m4-ffr_tls
 	    site.config.m4-stdbool sm_os_netbsd.h
 	pkgsrc/mail/sendmail/patches: patch-ao patch-ap patch-aq patch-ar
 	    patch-as patch-at patch-au patch-av patch-aw patch-ax patch-ay
 	    patch-az
 Removed Files:
 	pkgsrc/mail/sendmail/files: site.config.m4-ffr_tls_1
 	pkgsrc/mail/sendmail/patches: patch-ab patch-ac patch-ad patch-ae
 	    patch-al patch-am

 Log Message:
 Update to sendmail 8.14.9: this fixes a minor potential security issue

 pkgsrc changes:

 - consolidate several patches into site.config.m4
   - pkgsrc LDFLAGS should always be used
 - don't bother specifying file owner/group anywhere except in Makefile
 - create include/sm/os/sm_os_netbsd.h to fix warnings and OS specific stuff
 - install mail.local and rmail
 - convert to use res_n* functions
   - allows for linking against threaded libraries
 - add a TODO file
 - PR/35249 - Loren M. Lang
   - can't find libraries on Linux, this should be fixed by using pkgsrc LDFLAGS
 - PR/46694 - Makoto Fujiwara
   - bring back netbsd-proto.mc from when sendmail was part of the base system
 - PR/47207 - Richard Palo
   - let pkgsrc infrastructure handle file ownership and group
 - PR/48566 - Emmanuel Dreyfus
   - always set _FFR_USE_GETPWNAM_ERRNO on NetBSD
   - roll ffr_tls_1 and the suggested ffr_tls_ec into one new ffr_tls option
     - not enabled by default because it changes behaviour

 8.14.9/8.14.9   2014/05/21
         SECURITY: Properly set the close-on-exec flag for file descriptors
                 (except stdin, stdout, and stderr) before executing mailers.
         Fix a misformed comment in conf.c: "/*" within comment
                 which may cause a compilation error on some systems.
                 Problem reported by John Beck of Oracle.
         DEVTOOLS: Fix regression in auto-detection of libraries when only
                 shared libraries are available.  Problem reported by
                 Bryan Costales.


 To generate a diff of this commit:
 cvs rdiff -u -r1.120 -r1.121 pkgsrc/mail/sendmail/Makefile
 cvs rdiff -u -r1.60 -r1.61 pkgsrc/mail/sendmail/Makefile.common
 cvs rdiff -u -r1.19 -r1.20 pkgsrc/mail/sendmail/PLIST
 cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/TODO
 cvs rdiff -u -r1.50 -r1.51 pkgsrc/mail/sendmail/distinfo
 cvs rdiff -u -r1.20 -r1.21 pkgsrc/mail/sendmail/options.mk
 cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/files/netbsd-proto.mc \
     pkgsrc/mail/sendmail/files/site.config.m4-ffr_tls \
     pkgsrc/mail/sendmail/files/site.config.m4-stdbool \
     pkgsrc/mail/sendmail/files/sm_os_netbsd.h
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/sendmail/files/sendmail.sh \
     pkgsrc/mail/sendmail/files/smmsp.sh
 cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/sendmail/files/site.config.m4
 cvs rdiff -u -r1.1 -r0 pkgsrc/mail/sendmail/files/site.config.m4-ffr_tls_1
 cvs rdiff -u -r1.20 -r1.21 pkgsrc/mail/sendmail/patches/patch-aa
 cvs rdiff -u -r1.12 -r0 pkgsrc/mail/sendmail/patches/patch-ab
 cvs rdiff -u -r1.6 -r0 pkgsrc/mail/sendmail/patches/patch-ac
 cvs rdiff -u -r1.7 -r0 pkgsrc/mail/sendmail/patches/patch-ad
 cvs rdiff -u -r1.5 -r0 pkgsrc/mail/sendmail/patches/patch-ae \
     pkgsrc/mail/sendmail/patches/patch-al
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/mail/sendmail/patches/patch-af
 cvs rdiff -u -r1.8 -r1.9 pkgsrc/mail/sendmail/patches/patch-ai
 cvs rdiff -u -r1.3 -r0 pkgsrc/mail/sendmail/patches/patch-am
 cvs rdiff -u -r0 -r1.3 pkgsrc/mail/sendmail/patches/patch-ao
 cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/patches/patch-ap \
     pkgsrc/mail/sendmail/patches/patch-aq \
     pkgsrc/mail/sendmail/patches/patch-ar \
     pkgsrc/mail/sendmail/patches/patch-as \
     pkgsrc/mail/sendmail/patches/patch-at \
     pkgsrc/mail/sendmail/patches/patch-au \
     pkgsrc/mail/sendmail/patches/patch-av \
     pkgsrc/mail/sendmail/patches/patch-aw \
     pkgsrc/mail/sendmail/patches/patch-ax \
     pkgsrc/mail/sendmail/patches/patch-ay \
     pkgsrc/mail/sendmail/patches/patch-az

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->jnemeth
Responsible-Changed-By: jnemeth@NetBSD.org
Responsible-Changed-When: Sun, 15 Jun 2014 20:53:06 +0000
Responsible-Changed-Why:
I fixed it.


State-Changed-From-To: open->closed
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Sun, 15 Jun 2014 20:53:06 +0000
State-Changed-Why:
netbsd-proto.mc added and now installed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.