[csw-devel] SF.net SVN: gar:[5751] csw/mgar/pkg/sendmail/branches/benny

bensons at users.sourceforge.net bensons at users.sourceforge.net
Thu Jul 30 20:17:23 CEST 2009


Revision: 5751
          http://gar.svn.sourceforge.net/gar/?rev=5751&view=rev
Author:   bensons
Date:     2009-07-30 18:17:23 +0000 (Thu, 30 Jul 2009)

Log Message:
-----------
sendmail: added files for my branch

Added Paths:
-----------
    csw/mgar/pkg/sendmail/branches/benny/files/
    csw/mgar/pkg/sendmail/branches/benny/files/cswsendmail
    csw/mgar/pkg/sendmail/branches/benny/files/patch-CC-M.m4
    csw/mgar/pkg/sendmail/branches/benny/files/site.config.m4

Added: csw/mgar/pkg/sendmail/branches/benny/files/cswsendmail
===================================================================
--- csw/mgar/pkg/sendmail/branches/benny/files/cswsendmail	                        (rev 0)
+++ csw/mgar/pkg/sendmail/branches/benny/files/cswsendmail	2009-07-30 18:17:23 UTC (rev 5751)
@@ -0,0 +1,111 @@
+#!/sbin/sh
+#
+# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#ident	"@(#)sendmail	1.19	01/12/05 SMI"
+# Modified for CSW by Alex Moore 01/01/2004
+
+ERRMSG1='WARNING: /var/mail is NFS-mounted without setting actimeo=0,'
+ERRMSG2='this can cause mailbox locking and access problems.'
+SERVER_PID_FILE="/var/run/sendmail.pid"
+CLIENT_PID_FILE="/opt/csw/var/spool/clientmqueue/sm-client.pid"
+DEFAULT_FILE="/opt/csw/etc/default/sendmail"
+ALIASES_FILE="/opt/csw/etc/mail/aliases"
+CSW_DIR="/opt/csw"
+
+check_queue_interval_syntax()
+{
+	default="15m"
+	if [ $# -lt 1 ]; then
+		answer=$default
+		return
+	fi
+	if echo $1 | egrep '^([0-9]*[1-9][0-9]*[smhdw])+$' >/dev/null 2>&1; then		answer=$1
+	else
+		answer=$default
+	fi
+}
+
+case "$1" in 
+'restart')
+	[ -f $SERVER_PID_FILE ] && kill -1 `head -1 $SERVER_PID_FILE`
+	[ -f $CLIENT_PID_FILE ] && kill -1 `head -1 $CLIENT_PID_FILE`
+	;;
+
+'start')
+	if [ -f $CSW_DIR/lib/sendmail -a -f $CSW_DIR/etc/mail/sendmail.cf ]; then
+		if [ ! -d $CSW_DIR/var/spool/mqueue ]; then
+			/usr/bin/mkdir -m 0750 $CSW_DIR/var/spool/mqueue
+			/usr/bin/chown root:bin $CSW_DIR/var/spool/mqueue
+		fi
+		if [ ! -f $ALIASES_FILE.db ] && [ ! -f $ALIASES_FILE.dir ] \
+		    && [ ! -f $ALIASES_FILE.pag ]; then
+			$CSW_DIR/bin/newaliases
+		fi
+		MODE="-bd"
+		[ -f $DEFAULT_FILE ] && . $DEFAULT_FILE
+		#
+		# * MODE should be "-bd" or null (MODE= or MODE="") or
+		#   left alone.  Anything else and you're on your own.
+		# * QUEUEOPTION should be "p" or null (as above).
+		# * [CLIENT]QUEUEINTERVAL should be set to some legal value;
+		#   sanity checks are done below.
+		# * [CLIENT]OPTIONS are catch-alls; set with care.
+		#
+		if [ -n "$QUEUEOPTION" -a "$QUEUEOPTION" != "p" ]; then
+			QUEUEOPTION=""
+		fi
+		if [ -z "$QUEUEOPTION" -o -n "$QUEUEINTERVAL" ]; then
+			check_queue_interval_syntax $QUEUEINTERVAL
+			QUEUEINTERVAL=$answer
+		fi
+		check_queue_interval_syntax $CLIENTQUEUEINTERVAL
+		CLIENTQUEUEINTERVAL=$answer
+		$CSW_DIR/lib/sendmail -L sm-mta $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
+		$CSW_DIR/lib/sendmail -L sm-msp -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS &
+		#
+		# ETRN_HOSTS should be of the form
+		# "s1:c1.1,c1.2        s2:c2.1 s3:c3.1,c3.2,c3.3"
+		# i.e., white-space separated groups of server:client where
+		# client can be one or more comma-separated names; N.B. that
+		# the :client part is optional; see etrn(1M) for details.
+		# server is the name of the server to prod; a mail queue run
+		# is requested for each client name.  This is comparable to
+		# running "/usr/lib/sendmail -qRclient" on the host server.
+		#
+		# See RFC 1985 for more information.
+		#
+		for i in $ETRN_HOSTS; do
+			SERVER=`echo $i | /usr/bin/sed -e 's/:.*$//'`
+			CLIENTS=`echo $i | /usr/bin/sed -n -e 's/,/ /g' \
+			    -e '/:/s/^.*://p'`
+			/usr/sbin/etrn $SERVER $CLIENTS >/dev/null 2>&1 &
+		done
+	fi	
+
+	if /usr/bin/nawk 'BEGIN{s = 1}
+	    $2 == "/var/mail" && $3 == "nfs" && $4 !~ /actimeo=0/ &&
+	    $4 !~ /noac/{s = 0} END{exit s}' /etc/mnttab; then
+
+		/usr/bin/logger -p mail.crit "$ERRMSG1"
+		/usr/bin/logger -p mail.crit "$ERRMSG2"
+	fi
+	;;
+
+'stop')
+	[ -f $SERVER_PID_FILE ] && kill `head -1 $SERVER_PID_FILE`
+	if [ -f $CLIENT_PID_FILE ]; then
+		kill `head -1 $CLIENT_PID_FILE`
+		rm -f $CLIENT_PID_FILE
+	fi
+	/usr/bin/pkill -x -u 0 sendmail
+	;;
+
+*)
+	echo "Usage: $0 { start | stop | restart }"
+	exit 1
+	;;
+esac
+exit 0
+

Added: csw/mgar/pkg/sendmail/branches/benny/files/patch-CC-M.m4
===================================================================
--- csw/mgar/pkg/sendmail/branches/benny/files/patch-CC-M.m4	                        (rev 0)
+++ csw/mgar/pkg/sendmail/branches/benny/files/patch-CC-M.m4	2009-07-30 18:17:23 UTC (rev 5751)
@@ -0,0 +1,10 @@
+--- sendmail-8.14.3.orig/devtools/M4/depend/CC-M.m4	1999-05-28 00:03:28.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/depend/CC-M.m4	2009-07-30 17:49:02.234202786 +0200
+@@ -3,6 +3,6 @@
+ 	@mv Makefile Makefile.old
+ 	@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
+ 	@echo "# Do not edit or remove this line or anything below it." >> Makefile
+-	${CC} -M ${COPTS} ${SRCS} >> Makefile
++	${CC} -xM ${COPTS} ${SRCS} >> Makefile
+ 
+ #	End of $RCSfile: CC-M.m4,v $

Added: csw/mgar/pkg/sendmail/branches/benny/files/site.config.m4
===================================================================
--- csw/mgar/pkg/sendmail/branches/benny/files/site.config.m4	                        (rev 0)
+++ csw/mgar/pkg/sendmail/branches/benny/files/site.config.m4	2009-07-30 18:17:23 UTC (rev 5751)
@@ -0,0 +1,72 @@
+dnl adapted site.config.m4 from the REV=2007.12.17 build
+
+dnl ### we are using SUN Studio and OpenCSW
+define(`confCC', `%OCSWCC%')
+APPENDDEF(`confCCOPTS', `%CFLAGS%')
+define(`confEBINDIR',`/opt/csw/lib')
+define(`confMANROOT',`/usr/csw/share/man')
+define(`confMANROOTMAN',`/usr/csw/share/man')
+define(`confMBINDIR',`/opt/csw/bin')
+define(`confSBINDIR',`/opt/csw/sbin')
+define(`confUBINDIR',`/opt/csw/bin')
+define(`confNO_STATISTICS_INSTALL',`True')
+define(`confHFDIR', `/opt/csw/share/mail')
+
+dnl ### add OpenCSW lib and include directories
+APPENDDEF(`confLIBDIRS', `-L/opt/csw/lib -R/opt/csw/lib')
+APPENDDEF(`confINCDIRS', `-I/opt/csw/include')
+APPENDDEF(`conf_sendmail_ENVDEF', `-I/opt/csw/include')
+dnl we should not need this..
+dnl APPENDDEF(`confLIBDIRS', `-L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib')
+dnl APPENDDEF(`confINCDIRS', `-I/opt/csw/bdb44/include')
+
+dnl ### add NIS/NIS+ support
+APPENDDEF(`confENVDEF', `-DNIS')
+APPENDDEF(`confENVDEF', `-DNISPLUS')
+
+dnl ### add LDAP support
+APPENDDEF(`conf_libsm_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DLDAPMAP')
+
+dnl ### add SASL support
+APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL=2')
+APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1')
+APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')
+
+dnl ### add STARTTLS support
+APPENDDEF(`confENVDEF',`-DSTARTTLS')
+APPENDDEF(`confLIBS', `-lssl -lcrypto')
+
+dnl ### add because they were already compiled in
+APPENDDEF(`confENVDEF', `-DSOCKETMAP')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DTCPWRAPPERS')
+APPENDDEF(`conf_sendmail_LIBS', `-lwrap')"
+APPENDDEF(`conf_sendmail_ENVDEF', `-DNETINET6')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DNETINET6')
+APPENDDEF(`conf_libsm_ENVDEF', `-I/opt/csw/include')
+APPENDDEF(`conf_libsm_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_libsm_LIBS', `-lldap')
+APPENDDEF(`conf_libsm_LIBS', `-llber')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_sendmail_LIBS', `-lldap')
+APPENDDEF(`conf_sendmail_LIBS', `-llber')
+APPENDDEF(`conf_editmap_LIBS', `-lldap')
+APPENDDEF(`conf_editmap_LIBS', `-llber')
+APPENDDEF(`conf_mail_local_LIBS', `-lldap')
+APPENDDEF(`conf_mail_local_LIBS', `-llber')
+APPENDDEF(`conf_mailstats_LIBS', `-lldap')
+APPENDDEF(`conf_mailstats_LIBS', `-llber')
+APPENDDEF(`conf_makemap_LIBS', `-lldap')
+APPENDDEF(`conf_makemap_LIBS', `-llber')
+APPENDDEF(`conf_praliases_LIBS', `-lldap')
+APPENDDEF(`conf_praliases_LIBS', `-llber')
+APPENDDEF(`conf_rmail_LIBS', `-lldap')
+APPENDDEF(`conf_smrsh_LIBS', `-lldap')
+APPENDDEF(`conf_smrsh_LIBS', `-llber')
+APPENDDEF(`conf_vacation_LIBS', `-lldap')
+APPENDDEF(`conf_vacation_LIBS', `-llber')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL=1')
+APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_WORKERS_POOL=1')


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list