diff options
514 files changed, 25139 insertions, 23854 deletions
diff --git a/contrib/sendmail/BuildTools/M4/depend/BSD.m4 b/contrib/sendmail/BuildTools/M4/depend/BSD.m4 new file mode 100644 index 000000000000..661f69ec12ec --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/BSD.m4 @@ -0,0 +1,8 @@ +# @(#)BSD.m4 8.3 (Berkeley) 2/9/98 +depend: ${BEFORE} + @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 + mkdep -a -f Makefile ${COPTS} *.c + +# End of BSD.m4 diff --git a/contrib/sendmail/BuildTools/M4/depend/CC-M.m4 b/contrib/sendmail/BuildTools/M4/depend/CC-M.m4 new file mode 100644 index 000000000000..01d82662b1bc --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/CC-M.m4 @@ -0,0 +1,8 @@ +# @(#)CC-M.m4 8.2 (Berkeley) 2/19/98 +depend: ${BEFORE} + @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} *.c >> Makefile + +# End of CC-M.m4 diff --git a/contrib/sendmail/BuildTools/M4/depend/NCR.m4 b/contrib/sendmail/BuildTools/M4/depend/NCR.m4 new file mode 100644 index 000000000000..03e0c10dd387 --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/NCR.m4 @@ -0,0 +1,8 @@ +# @(#)NCR.m4 8.3 (Berkeley) 2/19/98 +depend: ${BEFORE} + @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} -w0 -Hmake ${COPTS} *.c >> Makefile + +# End of NCR.m4 diff --git a/contrib/sendmail/BuildTools/M4/depend/Solaris.m4 b/contrib/sendmail/BuildTools/M4/depend/Solaris.m4 new file mode 100644 index 000000000000..cbdc618abfc8 --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/Solaris.m4 @@ -0,0 +1,8 @@ +# @(#)Solaris.m4 8.1 (Berkeley) 3/5/98 +depend: ${BEFORE} + @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} -xM ${COPTS} *.c >> Makefile + +# End of Solaris.m4 diff --git a/contrib/sendmail/BuildTools/M4/depend/X11.m4 b/contrib/sendmail/BuildTools/M4/depend/X11.m4 new file mode 100644 index 000000000000..27f90361f4c3 --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/X11.m4 @@ -0,0 +1,5 @@ +# @(#)X11.m4 8.1 (Berkeley) 4/8/98 +depend: ${BEFORE} + makedepend -- ${COPTS} -- *.c + +# End of X11.m4 diff --git a/contrib/sendmail/BuildTools/M4/depend/generic.m4 b/contrib/sendmail/BuildTools/M4/depend/generic.m4 new file mode 100644 index 000000000000..e7452d9e3297 --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/depend/generic.m4 @@ -0,0 +1,8 @@ +# @(#)generic.m4 8.2 (Berkeley) 2/9/98 +# dependencies +# gross overkill, and yet still not quite enough.... +${OBJS}: ${SRCDIR}/sendmail.h ${SRCDIR}/conf.h + +# give a null "depend" list so that the startup script will work +depend: +# End of generic.m4 diff --git a/contrib/sendmail/BuildTools/M4/header.m4 b/contrib/sendmail/BuildTools/M4/header.m4 new file mode 100644 index 000000000000..df216bb96714 --- /dev/null +++ b/contrib/sendmail/BuildTools/M4/header.m4 @@ -0,0 +1,32 @@ +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Definitions for Makefile construction for sendmail +# +# @(#)header.m4 8.14 (Berkeley) 5/19/98 +# +changecom(^A) +undefine(`format') +undefine(`hpux') +ifdef(`pushdef', `', + `errprint(`You need a newer version of M4, at least as new as +System V or GNU') + include(NoSuchFile)') +define(`confABI', `') +define(`confCC', `cc') +define(`confSHELL', `/bin/sh') +define(`confBEFORE', `') +define(`confLIBDIRS', `') +define(`confINCDIRS', `') +define(`confLIBSEARCH', `db bind resolv 44bsd') +define(`confSITECONFIG', `site.config') +define(`confBUILDBIN', `../../BuildTools/bin') +define(`PUSHDIVERT', `pushdef(`__D__', divnum)divert($1)') +define(`POPDIVERT', `divert(__D__)popdef(`__D__')') +define(`APPENDDEF', `define(`$1', ifdef(`$1', `$1 $2', `$2'))') +define(`PREPENDDEF', `define(`$1', ifdef(`$1', `$2 $1', `$2'))') diff --git a/contrib/sendmail/BuildTools/OS/386BSD b/contrib/sendmail/BuildTools/OS/386BSD new file mode 100644 index 000000000000..34af745c8a57 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/386BSD @@ -0,0 +1,7 @@ +# @(#)386BSD 8.1 (Berkeley) 1/30/98 +define(`confENVDEF', ` -DMIME') +define(`confLIBS', `-lutil') +define(`confLINKS', `/usr/sbin/sendmail /usr/bin/newaliases \ + /usr/sbin/sendmail /usr/bin/mailq \ + /usr/sbin/sendmail /usr/bin/hoststat \ + /usr/sbin/sendmail /usr/bin/purgestat') diff --git a/contrib/sendmail/BuildTools/OS/A-UX b/contrib/sendmail/BuildTools/OS/A-UX new file mode 100644 index 000000000000..782106d7e155 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/A-UX @@ -0,0 +1,11 @@ +# @(#)A-UX 8.4 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-D_POSIX_SOURCE ') +define(`confLIBS', `-ldbm -lposix -lUTIL') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/AIX b/contrib/sendmail/BuildTools/OS/AIX new file mode 100644 index 000000000000..ebf1f123262a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/AIX @@ -0,0 +1,10 @@ +# @(#)AIX 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-D_AIX3 ') +define(`confOPTIMIZE', `-g') +define(`confLIBS', `-ldbm') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `system') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/ucb/install') diff --git a/contrib/sendmail/BuildTools/OS/AIX.2 b/contrib/sendmail/BuildTools/OS/AIX.2 new file mode 100644 index 000000000000..3838e893631a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/AIX.2 @@ -0,0 +1,18 @@ +# @(#)AIX.2 8.8 (Berkeley) 3/12/98 +PUSHDIVERT(1) +SMROOT= /usr/local/newmail +POPDIVERT +define(`confMAPDEF', `-DNIS') +define(`confENVDEF', `-DBSD -DBSD_INCLUDES -DBSD_REMAP_SIGNAL_TO_SIGVEC \ + -D_PATH_SENDMAILCF=\"${SMROOT}/sendmail.cf\"\ + -D_PATH_SENDMAILPID=\"${SMROOT}/sendmail.pid\"') +define(`confOPTIMIZE', `-g') +define(`confINCDIRS', `-I/u/markw/src/db.1.85/PORT/aixrt/include -I/u/markw/src/db.1.85/PORT/aixrt -I/fs/work/src/bind/include') +define(`confLIBS', `-lbsd /u/markw/src/db.1.85/PORT/aixrt/libdb.a /usr/local/lib/libgldavg.a /fs/work/src/bind/res/libresolv.a') +define(`confMBINDIR', `${SMROOT}/bin') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `system') +define(`confSTDIR', `${SMROOT}') +define(`confHFDIR', `${SMROOT}') +define(`confINSTALL', `/usr/ucb/install') diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.2 b/contrib/sendmail/BuildTools/OS/AIX.4.2 new file mode 100644 index 000000000000..e302f5a11369 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/AIX.4.2 @@ -0,0 +1,11 @@ +# @(#)AIX.4.2 8.5 (Berkeley) 3/14/98 +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-D_AIX4=40200 ') +define(`confOPTIMIZE', `-O3') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/ucb/install') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `system') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.3 b/contrib/sendmail/BuildTools/OS/AIX.4.3 new file mode 100644 index 000000000000..75a4272f04b0 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/AIX.4.3 @@ -0,0 +1,12 @@ +# @(#)AIX.4.3 8.4 (Berkeley) 3/14/98 +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-D_AIX4=40300 ') +define(`confOPTIMIZE', `-O3') +define(`confCC', `/usr/bin/xlc') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/ucb/install') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `system') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.x b/contrib/sendmail/BuildTools/OS/AIX.4.x new file mode 100644 index 000000000000..f08bfcb4a357 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/AIX.4.x @@ -0,0 +1,10 @@ +# @(#)AIX.4.x 8.7 (Berkeley) 3/14/98 +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-D_AIX4 ') +define(`confOPTIMIZE', `-O3') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/ucb/install') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `system') diff --git a/contrib/sendmail/BuildTools/OS/Altos b/contrib/sendmail/BuildTools/OS/Altos new file mode 100644 index 000000000000..9c1f301d18d0 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Altos @@ -0,0 +1,12 @@ +# @(#)Altos 8.6 (Berkeley) 2/19/98 +define(`confCC', `gcc') +define(`confENVDEF', `-DALTOS_SYSTEM_V ') +define(`confLIBS', `-lsocket -lrpc') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/BSD-OS b/contrib/sendmail/BuildTools/OS/BSD-OS new file mode 100644 index 000000000000..58586dd596f3 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/BSD-OS @@ -0,0 +1,8 @@ +# @(#)BSD-OS 8.8 (Berkeley) 6/3/98 +define(`confMAPDEF', `-DNEWDB -DMAP_REGEX') +define(`confENVDEF', `-DNETISO') +define(`confLIBS', `-lutil -lkvm') +define(`confOPTIMIZE', `-O2') +define(`confMAN1EXT', `0') +define(`confMAN5EXT', `0') +define(`confMAN8EXT', `0') diff --git a/contrib/sendmail/BuildTools/OS/BSD43 b/contrib/sendmail/BuildTools/OS/BSD43 new file mode 100644 index 000000000000..1bbccea2c7fa --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/BSD43 @@ -0,0 +1,21 @@ +# @(#)BSD43 8.5 (Berkeley) 3/12/98 +define(`confBEFORE', `unistd.h stddef.h stdlib.h dirent.h sys/time.h') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DoldBSD43 ') +define(`confLIBS', `-ldbm -ll') +define(`confUBINDIR', `/usr/ucb') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +unistd.h stddef.h stdlib.h sys/time.h: + cp /dev/null $@ + +sys/time.h: sys + +sys: + mkdir sys + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/CLIX b/contrib/sendmail/BuildTools/OS/CLIX new file mode 100644 index 000000000000..69f422965bbd --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/CLIX @@ -0,0 +1,14 @@ +# @(#)CLIX 8.8 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DCLIX ') +define(`confINCDIRS', `-I/usr/include') +define(`confLIBS', `-lnsl -lbsd') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `cp') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x b/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x new file mode 100644 index 000000000000..6f5abb5de390 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x @@ -0,0 +1,11 @@ +# @(#)CRAYT3E.2.0.x 8.1 (Berkeley) 4/21/98 +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DUNICOS ') +define(`confOPTIMIZE', `-O') +define(`confINSTALL', `cpset') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bin') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', ` //usr/spool/mqueue') +define(`confHFDIR', ` /usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/CSOS b/contrib/sendmail/BuildTools/OS/CSOS new file mode 100644 index 000000000000..3a995c9496f2 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/CSOS @@ -0,0 +1,9 @@ +# @(#)CSOS 8.5 (Berkeley) 2/8/98 +define(`confLIBS', `-lnet') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confUBINDIR', `/usr/ucb') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') diff --git a/contrib/sendmail/BuildTools/OS/ConvexOS b/contrib/sendmail/BuildTools/OS/ConvexOS new file mode 100644 index 000000000000..8ea990c6e664 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/ConvexOS @@ -0,0 +1,11 @@ +# @(#)ConvexOS 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DYPCOMPAT -DNIS') +define(`confENVDEF', `-D__STDC__ -d non_int_bit_field') +define(`confOPTIMIZE', `-g') +define(`confLIBS', `-lshare') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/Dell b/contrib/sendmail/BuildTools/OS/Dell new file mode 100644 index 000000000000..2b9c1ea44a1f --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Dell @@ -0,0 +1,15 @@ +# @(#)Dell 8.8 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-D__svr4__ ') +define(`confOPTIMIZE', `-O2') +define(`confLIBS', `-ldbm -lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucblib') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/DomainOS b/contrib/sendmail/BuildTools/OS/DomainOS new file mode 100644 index 000000000000..ee6be2726b81 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/DomainOS @@ -0,0 +1,18 @@ +# @(#)DomainOS 8.6 (Berkeley) 6/24/98 +define(`confCC', `cc -A nansi -A,systype,any -A,runtype,bsd4.3') +define(`confBEFORE', `unistd.h dirent.h') +define(`confMAPDEF', `-DNDBM') +define(`confSBINDIR', `/usr/etc') +define(`confMBINDIR', `/usr/lib') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +unistd.h: + cp /dev/null unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/DomainOS.10.4 b/contrib/sendmail/BuildTools/OS/DomainOS.10.4 new file mode 100644 index 000000000000..a92051b6befd --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/DomainOS.10.4 @@ -0,0 +1,15 @@ +# @(#)DomainOS.10.4 8.1 (Berkeley) 6/24/98 +define(`confCC', `cc -A nansi -A,systype,any -A,runtype,bsd4.3') +define(`confBEFORE', `dirent.h') +define(`confMAPDEF', `-DNDBM') +define(`confSBINDIR', `/usr/etc') +define(`confMBINDIR', `/usr/lib') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/Dynix b/contrib/sendmail/BuildTools/OS/Dynix new file mode 100644 index 000000000000..2781e49d1c1e --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Dynix @@ -0,0 +1,13 @@ +# @(#)Dynix 8.7 (Berkeley) 2/26/98 +define(`confCC', `gcc') +define(`confOPTIMIZE', `-O -g') +define(`confLIBS', `-lseq') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `staff # no kmem group,') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confOBJADD', `strtol.o') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/EWS-UX_V b/contrib/sendmail/BuildTools/OS/EWS-UX_V new file mode 100644 index 000000000000..bf11275a2cd1 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/EWS-UX_V @@ -0,0 +1,29 @@ +# @(#)EWS-UX_V 8.6 (Berkeley) 3/12/98 +define(`confCC', `/usr/abiccs/bin/cc -KOlimit=900') +define(`confBEFORE', `sysexits.h ndbm.h ndbm.o') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-Dnec_ews_svr4 ') +define(`confLIBS', `ndbm.o -lsocket -lnsl -lelf # # with NDBM') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var/ucblib') +define(`confHFDIR', `/var/ucblib') +define(`confINSTALL', `/usr/ucb/install') +PUSHDIVERT(3) +sysexits.h: + echo '#ifndef _LOCAL_SYSEXITS_H_' > sysexits.h; + echo '#define _LOCAL_SYSEXITS_H_' >> sysexits.h; + cat /usr/abiccs/ucbinclude/sysexits.h >> sysexits.h; + echo '#endif /* _LOCAL_SYSEXITS_H_ */' >> sysexits.h; +# ln -s /usr/abiccs/ucbinclude/sysexits.h . + +ndbm.h: + ln -s /usr/abiccs/ucbinclude/ndbm.h . + +ndbm.o: + ar x /usr/abiccs/ucblib/libucb.a ndbm.o +# ar x /usr/ucblib/libucb.a ndbm.o +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/FreeBSD b/contrib/sendmail/BuildTools/OS/FreeBSD new file mode 100644 index 000000000000..bec2c599060b --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/FreeBSD @@ -0,0 +1,3 @@ +# @(#)FreeBSD 8.5 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX') +define(`confLIBS', `-lutil') diff --git a/contrib/sendmail/BuildTools/OS/HP-UX b/contrib/sendmail/BuildTools/OS/HP-UX new file mode 100644 index 000000000000..66d71a45eed0 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/HP-UX @@ -0,0 +1,12 @@ +# @(#)HP-UX 8.9 (Berkeley) 3/14/98 +define(`confCC', `cc -Aa -D_HPUX_SOURCE') +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confOPTIMIZE', `+O1') +define(`confLIBS', `-lndbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') diff --git a/contrib/sendmail/BuildTools/OS/HP-UX.10.x b/contrib/sendmail/BuildTools/OS/HP-UX.10.x new file mode 100644 index 000000000000..a4b3a816048f --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/HP-UX.10.x @@ -0,0 +1,11 @@ +# @(#)HP-UX.10.x 8.10 (Berkeley) 3/21/98 +define(`confCC', `cc -Aa -D_HPUX_SOURCE') +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-DV4FS ') +define(`confOPTIMIZE', `+O3') +define(`confLIBS', `-lndbm') +define(`confSHELL', `/usr/bin/sh') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/usr/share/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confSBINGRP', `mail') diff --git a/contrib/sendmail/BuildTools/OS/HP-UX.11.x b/contrib/sendmail/BuildTools/OS/HP-UX.11.x new file mode 100644 index 000000000000..9e13c58e979a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/HP-UX.11.x @@ -0,0 +1,11 @@ +# @(#)HP-UX.11.x 8.7 (Berkeley) 3/30/98 +define(`confCC', `cc -Ae') +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-DV4FS -DHPUX11 ') +define(`confOPTIMIZE', `+O3') +define(`confLIBS', `-ldbm -lnsl') +define(`confSHELL', `/usr/bin/sh') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/usr/share/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confSBINGRP', `mail') diff --git a/contrib/sendmail/BuildTools/OS/IRIX b/contrib/sendmail/BuildTools/OS/IRIX new file mode 100644 index 000000000000..dafbda6a5fb6 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX @@ -0,0 +1,13 @@ +# @(#)IRIX 8.7 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DIRIX ') +define(`confLIBS', `-lmld -lmalloc -lsun') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX.5.x b/contrib/sendmail/BuildTools/OS/IRIX.5.x new file mode 100644 index 000000000000..4ac44c29aea1 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX.5.x @@ -0,0 +1,13 @@ +# @(#)IRIX.5.x 8.7 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DIRIX5 ') +define(`confLIBS', `-lmld -lmalloc') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var') +define(`confHFDIR', `/etc') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX.6.5 b/contrib/sendmail/BuildTools/OS/IRIX.6.5 new file mode 100644 index 000000000000..3056ff449128 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX.6.5 @@ -0,0 +1,35 @@ +# @(#)IRIX.6.5 8.2 (Berkeley) 4/24/98 +PUSHDIVERT(1) +# Select what ABI we are using -- see abi(5) for details +# -32 ~ IRIX 5.3 (default: -mips2) +# - long and pointer are 32 bit +# -n32 New to IRIX 6.2 (default: -mips3) +# - long and pointer are 32 bit +# -64 ~ IRIX 6.1 (default: -mips4) +# - long and pointer are 64 bit +# We force ABI here, so then it does not depend on CPU +# +# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib +# for compilation with ABI=-n32 -- alternatively you can set ABI=-32 +# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs +# only with IRIX64 (ie. 64 bit kernels) +# +# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST +# be given on the Build command line using the -E parameter, e.g.: +# +# Build -E ABI=-n32 +# +ABI= confABI +POPDIVERT +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-DIRIX6 -DHASSNPRINTF=1 ${ABI} ') +define(`confLDOPTS', `${ABI}') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var') +define(`confHFDIR', `/etc') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX.6.x b/contrib/sendmail/BuildTools/OS/IRIX.6.x new file mode 100644 index 000000000000..c52fd4ea41dc --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX.6.x @@ -0,0 +1,35 @@ +# @(#)IRIX.6.x 8.11 (Berkeley) 4/24/98 +PUSHDIVERT(1) +# Select what ABI we are using -- see abi(5) for details +# -32 ~ IRIX 5.3 (default: -mips2) +# - long and pointer are 32 bit +# -n32 New to IRIX 6.2 (default: -mips3) +# - long and pointer are 32 bit +# -64 ~ IRIX 6.1 (default: -mips4) +# - long and pointer are 64 bit +# We force ABI here, so then it does not depend on CPU +# +# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib +# for compilation with ABI=-n32 -- alternatively you can set ABI=-32 +# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs +# only with IRIX64 (ie. 64 bit kernels) +# +# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST +# be given on the Build command line using the -E parameter, e.g.: +# +# Build -E ABI=-n32 +# +ABI= confABI +POPDIVERT +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-DIRIX6 ${ABI} ') +define(`confLDOPTS', `${ABI}') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var') +define(`confHFDIR', `/etc') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.0 b/contrib/sendmail/BuildTools/OS/IRIX64.6.0 new file mode 100644 index 000000000000..5226bb535c52 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.0 @@ -0,0 +1,34 @@ +# @(#)IRIX64.6.0 8.10 (Berkeley) 3/12/98 +PUSHDIVERT(1) +# Select what ABI we are using -- see abi(5) for details +# -32 ~ IRIX 5.3 (default: -mips2) +# - long and pointer are 32 bit +# -64 ~ IRIX 6.1 (default: -mips4) +# - long and pointer are 64 bit +# We force ABI here, so then it does not depend on CPU +# +# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib +# for compilation with ABI=-n32 -- alternatively you can set ABI=-32 +# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs +# only with IRIX64 (ie. 64 bit kernels) +# +# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST +# be given on the Build command line using the -E parameter, e.g.: +# +# Build -E ABI=-32 +# +ABI= confABI +POPDIVERT +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DIRIX64 ${ABI} ') +define(`confLDOPTS', `${ABI}') +define(`confLIBS', `-lelf -lmalloc') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.1 b/contrib/sendmail/BuildTools/OS/IRIX64.6.1 new file mode 100644 index 000000000000..4876a8807a47 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.1 @@ -0,0 +1,34 @@ +# @(#)IRIX64.6.1 8.10 (Berkeley) 3/12/98 +PUSHDIVERT(1) +# Select what ABI we are using -- see abi(5) for details +# -32 ~ IRIX 5.3 (default: -mips2) +# - long and pointer are 32 bit +# -64 ~ IRIX 6.1 (default: -mips4) +# - long and pointer are 64 bit +# We force ABI here, so then it does not depend on CPU +# +# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib +# for compilation with ABI=-n32 -- alternatively you can set ABI=-32 +# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs +# only with IRIX64 (ie. 64 bit kernels) +# +# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST +# be given on the Build command line using the -E parameter, e.g.: +# +# Build -E ABI=-32 +# +ABI= confABI +POPDIVERT +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DIRIX64 ${ABI} ') +define(`confLDOPTS', `${ABI}') +define(`confLIBS', `-lelf -lmalloc') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.x b/contrib/sendmail/BuildTools/OS/IRIX64.6.x new file mode 100644 index 000000000000..503df04b42c6 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.x @@ -0,0 +1,35 @@ +# @(#)IRIX64.6.x 8.11 (Berkeley) 4/24/98 +PUSHDIVERT(1) +# Select what ABI we are using -- see abi(5) for details +# -32 ~ IRIX 5.3 (default: -mips2) +# - long and pointer are 32 bit +# -n32 New to IRIX 6.2 (default: -mips3) +# - long and pointer are 32 bit +# -64 ~ IRIX 6.1 (default: -mips4) +# - long and pointer are 64 bit +# We force ABI here, so then it does not depend on CPU +# +# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib +# for compilation with ABI=-n32 -- alternatively you can set ABI=-32 +# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs +# only with IRIX64 (ie. 64 bit kernels) +# +# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST +# be given on the Build command line using the -E parameter, e.g.: +# +# Build -E ABI=-n32 +# +ABI= confABI +POPDIVERT +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confENVDEF', `-DIRIX6 ${ABI} ') +define(`confLDOPTS', `${ABI}') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bsd') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var') +define(`confHFDIR', `/etc') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/ISC b/contrib/sendmail/BuildTools/OS/ISC new file mode 100644 index 000000000000..f07093f660b0 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/ISC @@ -0,0 +1,10 @@ +# @(#)ISC 8.5 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DISC_UNIX -D_POSIX_SOURCE -D_SYSV3 ') +define(`confLIBS', `-lyp -lrpc -lndbm -linet -lcposix') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/spool/log') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/KSR b/contrib/sendmail/BuildTools/OS/KSR new file mode 100644 index 000000000000..d3931a464051 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/KSR @@ -0,0 +1,7 @@ +# @(#)KSR 8.4 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confLIBDIRS', `-L/usr/shlib -L/usr/lib') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/var/adm/sendmail') +define(`confHFDIR', `/usr/share/lib') +define(`confINSTALL', `installbsd') diff --git a/contrib/sendmail/BuildTools/OS/LUNA b/contrib/sendmail/BuildTools/OS/LUNA new file mode 100644 index 000000000000..2a0fe1d78c22 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/LUNA @@ -0,0 +1,46 @@ +# @(#)LUNA 8.8 (Berkeley) 3/12/98 +define(`confBEFORE', `dirent.h stddef.h stdlib.h unistd.h limits.h time.h sys/time.h') +define(`confMAPDEF', `-DNDBM') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h + +stddef.h unistd.h limits.h: + if [ -f /usr/include/$@ ]; then \ + ln -s /usr/include/$@ .; \ + else \ + cp /dev/null $@; \ + fi + +stdlib.h: + if [ -f /usr/include/stdlib.h ]; then \ + ln -s /usr/include/stdlib.h .; \ + else \ + if [ -f /usr/include/libc.h ]; then \ + ln -s /usr/include/libc.h stdlib.h; \ + else \ + cp /dev/null stdlib.h; \ + fi; \ + fi + +# just for UNIOS-B +time.h: + echo "#ifndef _LOCAL_TIME_H_" > time.h + echo "#define _LOCAL_TIME_H_" >> time.h + cat /usr/include/time.h >> time.h + echo "#endif" >> time.h + +sys/time.h: + -mkdir sys + echo "#ifndef _LOCAL_SYS_TIME_H_" > sys/time.h + echo "#define _LOCAL_SYS_TIME_H_" >> sys/time.h + cat /usr/include/sys/time.h >> sys/time.h + echo "#endif" >> sys/time.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/Linux b/contrib/sendmail/BuildTools/OS/Linux new file mode 100644 index 000000000000..e908c478a944 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Linux @@ -0,0 +1,5 @@ +# @(#)Linux 8.4 (Berkeley) 3/22/98 +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confDEPEND_TYPE', `CC-M') +define(`confMANROOT', `/usr/man/man') diff --git a/contrib/sendmail/BuildTools/OS/Linux.ppc b/contrib/sendmail/BuildTools/OS/Linux.ppc new file mode 100644 index 000000000000..d2c3cafa7ca7 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Linux.ppc @@ -0,0 +1,3 @@ +# @(#)Linux.ppc 8.3 (Berkeley) 2/12/98 +define(`confHFDIR', `/usr/lib') +define(`confSBINGRP', `mail') diff --git a/contrib/sendmail/BuildTools/OS/Mach386 b/contrib/sendmail/BuildTools/OS/Mach386 new file mode 100644 index 000000000000..981478120463 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Mach386 @@ -0,0 +1,11 @@ +# @(#)Mach386 8.6 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x new file mode 100644 index 000000000000..74d733401675 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x @@ -0,0 +1,15 @@ +# @(#)NCR.MP-RAS.2.x 8.9 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DNCR_MP_RAS2 ') +define(`confOPTIMIZE', `-O2') +define(`confINCDIRS', `-I/usr/include -I/usr/ucbinclude') +define(`confLIBDIRS', `-L/usr/ucblib') +define(`confLIBS', `-lnsl -lnet -lsocket -lelf -lc -lucb') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSTDIR', `/var/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `NCR') diff --git a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x new file mode 100644 index 000000000000..14e02e3ab05c --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x @@ -0,0 +1,15 @@ +# @(#)NCR.MP-RAS.3.x 8.9 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DNCR_MP_RAS3 ') +define(`confOPTIMIZE', `-O2') +define(`confINCDIRS', `-I/usr/include -I/usr/ucbinclude') +define(`confLIBDIRS', `-L/usr/ucblib') +define(`confLIBS', `-lsocket -lnsl -lelf -lc -lucb') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSTDIR', `/var/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `NCR') diff --git a/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x b/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x new file mode 100644 index 000000000000..4fa83bbb7c45 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x @@ -0,0 +1,14 @@ +# @(#)NEWS-OS.4.x 8.6 (Berkeley) 3/12/98 +define(`confBEFORE', `limits.h') +define(`confMAPDEF', `-DNDBM') +define(`confLIBS', `-lmld') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +limits.h: + touch limits.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x b/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x new file mode 100644 index 000000000000..dec79b5e9ec2 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x @@ -0,0 +1,28 @@ +# @(#)NEWS-OS.6.x 8.8 (Berkeley) 3/12/98 +define(`confCC', `/bin/cc') +define(`confBEFORE', `sysexits.h ndbm.o') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DSYSLOG_BUFSIZE=256 # -DSPT_TYPE=SPT_NONE ') +define(`confLIBS', `ndbm.o -lelf -lsocket -lnsl # # with NDBM') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/ucb/install') +PUSHDIVERT(3) +sysexits.h: + ln -s /usr/ucbinclude/sysexits.h . + +ndbm.o: + if [ ! -f /usr/include/ndbm.h ]; then \ + ln -s /usr/ucbinclude/ndbm.h .; \ + fi; \ + if [ -f /usr/lib/libndbm.a ]; then \ + ar x /usr/lib/libndbm.a ndbm.o; \ + else \ + ar x /usr/ucblib/libucb.a ndbm.o; \ + fi; +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x b/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x new file mode 100644 index 000000000000..4fd6b0386089 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x @@ -0,0 +1,28 @@ +# @(#)NEXTSTEP.4.x 8.1 (Berkeley) 3/21/98 +PUSHDIVERT(1) +# NEXTSTEP 3.1 and 3.2 only support m68k and i386 +#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc +#ARCH= -arch m68k -arch i386 +#ARCH= ${RC_CFLAGS} +# For new sendmail Makefile structure, this must go in the ENVDEF and LDOPTS +POPDIVERT +define(`confBEFORE', `unistd.h dirent.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO') +define(`confENVDEF', `-DNeXT -Wno-precomp -pipe ${RC_CFLAGS}') +define(`confLDOPTS', `${RC_CFLAGS}') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc/sendmail') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +unistd.h: + cp /dev/null unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NeXT.2.x b/contrib/sendmail/BuildTools/OS/NeXT.2.x new file mode 100644 index 000000000000..d8f469495045 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NeXT.2.x @@ -0,0 +1,20 @@ +# @(#)NeXT.2.x 8.7 (Berkeley) 3/12/98 +define(`confBEFORE', `unistd.h dirent.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO') +define(`confENVDEF', `-DNeXT ') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc/sendmail') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +unistd.h: + cp /dev/null unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NeXT.3.x b/contrib/sendmail/BuildTools/OS/NeXT.3.x new file mode 100644 index 000000000000..05aad6f85a51 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NeXT.3.x @@ -0,0 +1,28 @@ +# @(#)NeXT.3.x 8.7 (Berkeley) 3/12/98 +PUSHDIVERT(1) +# NEXTSTEP 3.1 and 3.2 only support m68k and i386 +#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc +#ARCH= -arch m68k -arch i386 +#ARCH= ${RC_CFLAGS} +# For new sendmail Makefile structure, this must go in the ENVDEF and LDOPTS +POPDIVERT +define(`confBEFORE', `unistd.h dirent.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO') +define(`confENVDEF', `-DNeXT -Wno-precomp -pipe ${RC_CFLAGS}') +define(`confLDOPTS', `${RC_CFLAGS}') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc/sendmail') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +unistd.h: + cp /dev/null unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NeXT.4.x b/contrib/sendmail/BuildTools/OS/NeXT.4.x new file mode 100644 index 000000000000..35f3bdb35e51 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NeXT.4.x @@ -0,0 +1,29 @@ +# @(#)NeXT.4.x 8.8 (Berkeley) 5/25/98 +PUSHDIVERT(1) +# NEXTSTEP 3.1 and 3.2 only support m68k and i386 +#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc +#ARCH= -arch m68k -arch i386 +#ARCH= ${RC_CFLAGS} +# For new sendmail Makefile structure, this must go in the ENVDEF and LDOPTS +POPDIVERT +define(`confBEFORE', `unistd.h dirent.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO') +define(`confENVDEF', `-DNeXT -Wno-precomp -pipe ${RC_CFLAGS}') +define(`confLDOPTS', `${RC_CFLAGS}') +define(`confLIBS', `-ldbm') +define(`confMANROOT', `/usr/lib/man/cat') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc/sendmail') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +unistd.h: + cp /dev/null unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/NetBSD b/contrib/sendmail/BuildTools/OS/NetBSD new file mode 100644 index 000000000000..595fd2df289d --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NetBSD @@ -0,0 +1,4 @@ +# @(#)NetBSD 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX') +define(`confENVDEF', ` -DNETISO') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/NetBSD.8.3 b/contrib/sendmail/BuildTools/OS/NetBSD.8.3 new file mode 100644 index 000000000000..6576660f44e8 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NetBSD.8.3 @@ -0,0 +1,3 @@ +# @(#)NetBSD.8.3 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX') +define(`confENVDEF', ` # -DNETISO') diff --git a/contrib/sendmail/BuildTools/OS/NonStop-UX b/contrib/sendmail/BuildTools/OS/NonStop-UX new file mode 100644 index 000000000000..02bdb7801d4d --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/NonStop-UX @@ -0,0 +1,16 @@ +# @(#)NonStop-UX 8.8 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DNonStop_UX_BXX -D_SVID ') +define(`confINCDIRS', `-I/usr/include -I/usr/ucbinclude') +define(`confLIBDIRS', `-L/usr/ucblib') +define(`confLIBS', `-lsocket -lnsl -lelf -lucb') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/OSF1 b/contrib/sendmail/BuildTools/OS/OSF1 new file mode 100644 index 000000000000..cc65dbc7844d --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/OSF1 @@ -0,0 +1,9 @@ +# @(#)OSF1 8.7 (Berkeley) 3/14/98 +define(`confCC', `cc -Olimit 1000') +define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/var/adm/sendmail') +define(`confHFDIR', `/usr/share/lib') +define(`confINSTALL', `installbsd') +define(`confUBINDIR', `${BINDIR}') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/OpenBSD b/contrib/sendmail/BuildTools/OS/OpenBSD new file mode 100644 index 000000000000..fb7bc8f42c36 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/OpenBSD @@ -0,0 +1,3 @@ +# @(#)OpenBSD 8.5 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX') +define(`confENVDEF', ` -DNETISO') diff --git a/contrib/sendmail/BuildTools/OS/PTX b/contrib/sendmail/BuildTools/OS/PTX new file mode 100644 index 000000000000..9af372792a8a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/PTX @@ -0,0 +1,10 @@ +# @(#)PTX 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM') +define(`confOPTIMIZE', `-g') +define(`confLIBS', `-lsocket -linet -lelf -lnsl -lseq') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/Paragon b/contrib/sendmail/BuildTools/OS/Paragon new file mode 100644 index 000000000000..e16e051f734a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Paragon @@ -0,0 +1,8 @@ +# @(#)Paragon 8.3 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM') +define(`confLIBDIRS', `-L/usr/shlib -L/usr/lib') +define(`confLIBS', `-ldbm') +define(`confSTDIR', `/var/adm/sendmail') +define(`confHFDIR', `/usr/share/lib') +define(`confINSTALL', `installbsd') +define(`confUBINDIR', `${BINDIR}') diff --git a/contrib/sendmail/BuildTools/OS/PowerUX b/contrib/sendmail/BuildTools/OS/PowerUX new file mode 100644 index 000000000000..b0f133d0a8c7 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/PowerUX @@ -0,0 +1,9 @@ +# @(#)PowerUX 8.5 (Berkeley) 2/12/98 +define(`confENVDEF', `-D__svr4__ ') +define(`confLIBS', `-Bstatic -lsocket -lnsl -lelf -lgen') +define(`confMBINDIR', `/usr/local/etc') +define(`confSBINDIR', `/usr/local/etc') +define(`confUBINDIR', `/usr/local/bin') +define(`confEBINDIR', `/usr/local/lib') +define(`confSBINGRP', `mail') +define(`confINSTALL', `/usr/ucb/install') diff --git a/contrib/sendmail/BuildTools/OS/QNX b/contrib/sendmail/BuildTools/OS/QNX new file mode 100644 index 000000000000..3cc01821afc8 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/QNX @@ -0,0 +1,15 @@ +# @(#)QNX 8.4 (Berkeley) 2/19/98 +PUSHDIVERT(1) +# +# For this Makefile to work you must compile and install the libdb package +# and then change DBMINC and DBMLIB as appropriate. +# +DBMINC= /usr/local/include +DBMLIB= /usr/local/lib +POPDIVERT +define(`confENVDEF', `-Osax -w4 -zc -fr= -D__BIT_TYPES_DEFINED__') +define(`confINCDIRS', `${DBMINC}') +define(`confLIBDIRS', `${DBMLIB}') +define(`confLIBS', `-lsocket') +define(`confLDOPTS', `-M -N256k') +define(`confINSTALL', `${BUILDBIN}/install.sh') diff --git a/contrib/sendmail/BuildTools/OS/RISCos b/contrib/sendmail/BuildTools/OS/RISCos new file mode 100644 index 000000000000..1888ae691616 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/RISCos @@ -0,0 +1,25 @@ +# @(#)RISCos 8.5 (Berkeley) 3/12/98 +define(`confCC', `cc -systype bsd43 -Olimit 900') +define(`confBEFORE', `stdlib.h dirent.h unistd.h stddef.h') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DRISCOS ') +define(`confLIBS', `-lmld') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `/usr/bsd43/bin/install') +PUSHDIVERT(3) +stdlib.h stddef.h: + cp /dev/null $@ + +unistd.h: + echo "typedef unsigned short mode_t;" > unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/RISCos.4_0 b/contrib/sendmail/BuildTools/OS/RISCos.4_0 new file mode 100644 index 000000000000..e057fb433cfe --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/RISCos.4_0 @@ -0,0 +1,25 @@ +# @(#)RISCos.4_0 8.6 (Berkeley) 3/12/98 +define(`confCC', `cc -systype bsd43 -Olimit 900') +define(`confBEFORE', `stdlib.h dirent.h unistd.h stddef.h') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-DRISCOS -DRISCOS_4_0 ') +define(`confLIBS', `-lmld') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +stdlib.h stddef.h: + cp /dev/null $@ + +unistd.h: + echo "typedef unsigned short mode_t;" > unistd.h + +dirent.h: + echo "#include <sys/dir.h>" > dirent.h + echo "#define dirent direct" >> dirent.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SCO b/contrib/sendmail/BuildTools/OS/SCO new file mode 100644 index 000000000000..a72ba53eebe4 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SCO @@ -0,0 +1,9 @@ +# @(#)SCO 8.3 (Berkeley) 2/8/98 +define(`confENVDEF', `-D_SCO_unix_ ') +define(`confLIBS', `-lsocket -lprot_s -lx -lc_s') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/SCO.4.2 b/contrib/sendmail/BuildTools/OS/SCO.4.2 new file mode 100644 index 000000000000..027f7300667a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SCO.4.2 @@ -0,0 +1,11 @@ +# @(#)SCO.4.2 8.5 (Berkeley) 6/30/98 +define(`confENVDEF', `-D_SCO_unix_4_2 ') +define(`confLIBS', `-lsocket -lndbm -lprot_s -lx -lc_s') +define(`confMAPDEF', `-DNDBM') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `bin') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') diff --git a/contrib/sendmail/BuildTools/OS/SCO.5.x b/contrib/sendmail/BuildTools/OS/SCO.5.x new file mode 100644 index 000000000000..8f095ac5aed3 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SCO.5.x @@ -0,0 +1,10 @@ +# @(#)SCO.5.x 8.10 (Berkeley) 6/30/98 +define(`confCC', `cc -b elf') +define(`confLIBS', `-lsocket -lndbm -lprot -lcurses -lm -lx -lgen') +define(`confMAPDEF', `-DMAP_REGEX -DNDBM') +define(`confSBINGRP', `bin') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/bin') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') diff --git a/contrib/sendmail/BuildTools/OS/SINIX b/contrib/sendmail/BuildTools/OS/SINIX new file mode 100644 index 000000000000..93cc78135012 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SINIX @@ -0,0 +1,12 @@ +# @(#)SINIX 8.5 (Berkeley) 2/12/98 +define(`confCC', `/usr/bin/cc') +define(`confENVDEF', `-D__svr4__ ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') diff --git a/contrib/sendmail/BuildTools/OS/SVR4 b/contrib/sendmail/BuildTools/OS/SVR4 new file mode 100644 index 000000000000..f342c3feeb3e --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SVR4 @@ -0,0 +1,14 @@ +# @(#)SVR4 8.6 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-D__svr4__ ') +define(`confLIBS', `-ldbm -lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/SunOS b/contrib/sendmail/BuildTools/OS/SunOS new file mode 100644 index 000000000000..2a8897825acf --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS @@ -0,0 +1,10 @@ +# @(#)SunOS 8.6 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confLDOPTS', `-Bstatic') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/SunOS.4.0 b/contrib/sendmail/BuildTools/OS/SunOS.4.0 new file mode 100644 index 000000000000..05bbc57d5049 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.4.0 @@ -0,0 +1,15 @@ +# @(#)SunOS.4.0 8.6 (Berkeley) 3/12/98 +define(`confBEFORE', `stdlib.h stddef.h limits.h') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DSUNOS403 ') +define(`confLDOPTS', `-Bstatic') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', `/etc') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +stddef.h stdlib.h limits.h: + cp /dev/null $@ +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.1 b/contrib/sendmail/BuildTools/OS/SunOS.5.1 new file mode 100644 index 000000000000..2383609ef14a --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.1 @@ -0,0 +1,22 @@ +# @(#)SunOS.5.1 8.8 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DSOLARIS=20100 ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/ucbinclude/sysexits.h ]; \ + then \ + ln -s /usr/ucbinclude/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.2 b/contrib/sendmail/BuildTools/OS/SunOS.5.2 new file mode 100644 index 000000000000..5e635db694e2 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.2 @@ -0,0 +1,22 @@ +# @(#)SunOS.5.2 8.8 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DSOLARIS=20100 ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/ucbinclude/sysexits.h ]; \ + then \ + ln -s /usr/ucbinclude/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.3 b/contrib/sendmail/BuildTools/OS/SunOS.5.3 new file mode 100644 index 000000000000..8f64d219b7be --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.3 @@ -0,0 +1,20 @@ +# @(#)SunOS.5.3 8.8 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS') +define(`confENVDEF', `-DSOLARIS=20300 ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/ucbinclude/sysexits.h ]; \ + then \ + ln -s /usr/ucbinclude/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.4 b/contrib/sendmail/BuildTools/OS/SunOS.5.4 new file mode 100644 index 000000000000..65e84002c7b7 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.4 @@ -0,0 +1,20 @@ +# @(#)SunOS.5.4 8.10 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS') +define(`confENVDEF', `-DSOLARIS=20400 ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/include/sysexits.h ]; \ + then \ + ln -s /usr/include/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.5 b/contrib/sendmail/BuildTools/OS/SunOS.5.5 new file mode 100644 index 000000000000..267f16d22a1b --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.5 @@ -0,0 +1,20 @@ +# @(#)SunOS.5.5 8.11 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX') +define(`confENVDEF', `-DSOLARIS=20500 ') +define(`confLIBS', `-lsocket -lnsl -lkstat') +define(`confMBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/include/sysexits.h ]; \ + then \ + ln -s /usr/include/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.6 b/contrib/sendmail/BuildTools/OS/SunOS.5.6 new file mode 100644 index 000000000000..0537007008d1 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.6 @@ -0,0 +1,20 @@ +# @(#)SunOS.5.6 8.10 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX') +define(`confENVDEF', `-DSOLARIS=20600 ') +define(`confLIBS', `-lsocket -lnsl -lkstat') +define(`confMBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/include/sysexits.h ]; \ + then \ + ln -s /usr/include/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.7 b/contrib/sendmail/BuildTools/OS/SunOS.5.7 new file mode 100644 index 000000000000..b030e77c6506 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/SunOS.5.7 @@ -0,0 +1,20 @@ +# @(#)SunOS.5.7 8.11 (Berkeley) 3/21/98 +define(`confCC', `gcc') +define(`confBEFORE', `sysexits.h') +define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX') +define(`confENVDEF', `-DSOLARIS=20700 ') +define(`confLIBS', `-lsocket -lnsl') +define(`confMBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/etc/mail') +define(`confHFDIR', `/etc/mail') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confDEPEND_TYPE', `CC-M') +PUSHDIVERT(3) +sysexits.h: + if [ -r /usr/include/sysexits.h ]; \ + then \ + ln -s /usr/include/sysexits.h; \ + fi +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/Titan b/contrib/sendmail/BuildTools/OS/Titan new file mode 100644 index 000000000000..b66820089fd1 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/Titan @@ -0,0 +1,13 @@ +# @(#)Titan 8.5 (Berkeley) 3/12/98 +define(`confCC', `cc -43') +define(`confBEFORE', `stddef.h stdlib.h') +define(`confMAPDEF', `-DNDBM') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +PUSHDIVERT(3) +stddef.h stdlib.h: + cp /dev/null $@ +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/ULTRIX b/contrib/sendmail/BuildTools/OS/ULTRIX new file mode 100644 index 000000000000..f5df633e52ef --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/ULTRIX @@ -0,0 +1,10 @@ +# @(#)ULTRIX 8.7 (Berkeley) 3/12/98 +define(`confCC', `cc -Olimit 950') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DIDENTPROTO=0 ') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/UMAX b/contrib/sendmail/BuildTools/OS/UMAX new file mode 100644 index 000000000000..450c91da7500 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UMAX @@ -0,0 +1,15 @@ +# @(#)UMAX 8.5 (Berkeley) 3/12/98 +define(`confBEFORE', `stddef.h') +define(`confMAPDEF', `-DNIS') +define(`confENVDEF', `-DUMAXV ') +define(`confLIBS', `-lyp -lrpc') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +PUSHDIVERT(3) +stddef.h: + echo "#define _STDDEF_H" > stddef.h + chmod 444 stddef.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/UNICOS b/contrib/sendmail/BuildTools/OS/UNICOS new file mode 100644 index 000000000000..7984fa927c95 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UNICOS @@ -0,0 +1,9 @@ +# @(#)UNICOS 8.7 (Berkeley) 2/26/98 +define(`confENVDEF', `-DUNICOS ') +define(`confOPTIMIZE', `-O') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSTDIR', ` /etc/mail') +define(`confHFDIR', ` /etc/mail') diff --git a/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386 b/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386 new file mode 100644 index 000000000000..a6865e786aed --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386 @@ -0,0 +1,14 @@ +# @(#)UNIX_SV.4.x.i386 8.6 (Berkeley) 3/12/98 +define(`confCC', `gcc') +define(`confMAPDEF', `-DNDBM') +define(`confENVDEF', `-D__svr4__ -DUNIXWARE ') +define(`confLIBS', `-lc -ldbm -lsocket -lnsl -lgen -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confDEPEND_TYPE', `CC-M') diff --git a/contrib/sendmail/BuildTools/OS/UX4800 b/contrib/sendmail/BuildTools/OS/UX4800 new file mode 100644 index 000000000000..207b370baa0c --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UX4800 @@ -0,0 +1,24 @@ +# @(#)UX4800 8.8 (Berkeley) 3/12/98 +define(`confCC', `/usr/abiccs/bin/cc -KOlimit=900') +define(`confBEFORE', `sysexits.h ndbm.h') +define(`confMAPDEF', `-DNDBM -DNIS # without NEWDB') +define(`confENVDEF', `-DHASSNPRINTF=1 ') +define(`confLIBS', `-lsocket -lnsl -lelf # # without NEWDB') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `sys') +define(`confSTDIR', `/var/ucblib') +define(`confHFDIR', `/var/ucblib') +define(`confINSTALL', `/usr/ucb/install') +PUSHDIVERT(3) +sysexits.h: + echo '#ifndef _LOCAL_SYSEXITS_H_' > sysexits.h; + echo '#define _LOCAL_SYSEXITS_H_' >> sysexits.h; + cat /usr/abiccs/ucbinclude/sysexits.h >> sysexits.h; + echo '#endif /* _LOCAL_SYSEXITS_H_ */' >> sysexits.h; + +ndbm.h: + sed 's/void/char/' /usr/abiccs/include/ndbm.h > ndbm.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/UXPDS.V10 b/contrib/sendmail/BuildTools/OS/UXPDS.V10 new file mode 100644 index 000000000000..bf3014034378 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UXPDS.V10 @@ -0,0 +1,15 @@ +# @(#)UXPDS.V10 8.9 (Berkeley) 3/12/98 +define(`confCC', `/usr/ccs/bin/cc') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DUXPDS=10 ') +define(`confINCDIRS', `-I/usr/include -I/usr/ucbinclude') +define(`confLIBS', `/usr/ucblib/libdbm.a /usr/ucblib/libucb.a -lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `/usr/ucb/install') +define(`confMANROOT', `/usr/local/man/man') diff --git a/contrib/sendmail/BuildTools/OS/UXPDS.V20 b/contrib/sendmail/BuildTools/OS/UXPDS.V20 new file mode 100644 index 000000000000..cacdb4af68b3 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/UXPDS.V20 @@ -0,0 +1,22 @@ +# @(#)UXPDS.V20 8.8 (Berkeley) 3/12/98 +define(`confCC', `/usr/ccs/bin/cc') +define(`confBEFORE', `netinet/ip_var.h') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confENVDEF', `-DUXPDS=20 ') +define(`confLIBS', `/usr/ucblib/libdbm.a -lsocket -lnsl -lelf') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/ucblib') +define(`confHFDIR', `/usr/ucblib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +define(`confMANROOT', `/usr/local/man/man') +PUSHDIVERT(3) +netinet/ip_var.h: netinet /usr/include/netinet/ip_var.h + sed '/ip_var_f.h/d' /usr/include/netinet/ip_var.h > netinet/ip_var.h + +netinet: + mkdir netinet +POPDIVERT diff --git a/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE b/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE new file mode 100644 index 000000000000..900afcd632b9 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE @@ -0,0 +1,6 @@ +# @(#)dcosx.1.x.NILE 8.3 (Berkeley) 2/8/98 +define(`confENVDEF', `-D__svr4__ -DDCOSx ') +define(`confLIBS', `-lsocket -lnsl -lelf') +define(`confHFDIR', `/usr/share/lib/mail') +define(`confINSTALL', `/usr/ucb/install') +define(`confSBINGRP', `sys') diff --git a/contrib/sendmail/BuildTools/OS/dgux b/contrib/sendmail/BuildTools/OS/dgux new file mode 100644 index 000000000000..7d6d867b1ec1 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/dgux @@ -0,0 +1,10 @@ +# @(#)dgux 8.5 (Berkeley) 3/12/98 +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confLIBS', `-ldbm') +define(`confMBINDIR', `/usr/bin') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `bin') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/etc') diff --git a/contrib/sendmail/BuildTools/OS/maxion b/contrib/sendmail/BuildTools/OS/maxion new file mode 100644 index 000000000000..3bb6e0e2e2cd --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/maxion @@ -0,0 +1,14 @@ +# @(#)maxion 8.6 (Berkeley) 3/12/98 +define(`confCC', `/usr/ucb/cc') +define(`confMAPDEF', `-DNDBM -DNIS') +define(`confLIBDIRS', `-L/usr/ucblib') +define(`confLIBS', `-ldbm -lgen -lucb') +define(`confMBINDIR', `/usr/ucblib') +define(`confSBINDIR', `/usr/ucbetc') +define(`confUBINDIR', `/usr/ucb') +define(`confEBINDIR', `/usr/ucblib') +define(`confSBINOWN', `smtp') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/var/adm/log') +define(`confHFDIR', `/etc/ucbmail') +define(`confINSTALL', `/usr/ucb/install') diff --git a/contrib/sendmail/BuildTools/OS/uts.systemV b/contrib/sendmail/BuildTools/OS/uts.systemV new file mode 100644 index 000000000000..c5f841fb5ab0 --- /dev/null +++ b/contrib/sendmail/BuildTools/OS/uts.systemV @@ -0,0 +1,26 @@ +# @(#)uts.systemV 8.10 (Berkeley) 3/12/98 +PUSHDIVERT(1) +# Sendmail 8 on UTS requires BIND 4.9's include files and lib44bsd and +# libresolv libraries. The BIND version on UTS is much too old. +# +BINDPATH=../../../bind +POPDIVERT +define(`confBEFORE', `stddef.h') +define(`confMAPDEF', `-DNIS -DNDBM') +define(`confENVDEF', `-D_UTS ') +define(`confOPTIMIZE', `-g') +define(`confINCDIRS', `-I${BINDPATH}/include -I${BINDPATH}/compat/include') +define(`confLIBDIRS', `-L${BINDPATH}/res -L${BINDPATH}/compat/lib') +define(`confLIBS', `-lyp -lrpc -lbsd -lsocket -la') +define(`confMBINDIR', `/usr/lib') +define(`confSBINDIR', `/usr/etc') +define(`confUBINDIR', `/usr/lib') +define(`confEBINDIR', `/usr/lib') +define(`confSBINGRP', `mail') +define(`confSTDIR', `/usr/lib') +define(`confHFDIR', `/usr/lib') +define(`confINSTALL', `${BUILDBIN}/install.sh') +PUSHDIVERT(3) +stddef.h: + echo "#include <sys/types.h>" > stddef.h +POPDIVERT diff --git a/contrib/sendmail/BuildTools/README b/contrib/sendmail/BuildTools/README new file mode 100644 index 000000000000..0efc1548b391 --- /dev/null +++ b/contrib/sendmail/BuildTools/README @@ -0,0 +1,110 @@ +This directory contains tools. Do not attempt to actually build +anything in this directory. + +The Build script allows you to specify a site configuration file by using +the -f flag: + + Build -f siteconfig.m4 + +You can put such site configuration files in the Site sub-directory; +see Site/README for details. + +While building a site configuration file, you can add to a definition +using the APPENDDEF() and PREPENDDEF() macros. For example: + + APPENDDEF(`confINCDIRS', `-I/usr/local/bind/include') + +will add -I/usr/local/bind/include to the already existing confINCDIRS. +Note: There must be no trailing spaces after the last quote mark and +before the closing parenthesis. Also you may need to properly quote +m4 reserved words as specified by your vendor's m4 command. + +By default, sendmail will search your system for include and library +directories as well as certain libraries (libdb.* for Berkeley DB and +libbind.a or libresolv.* for name resolution). You can turn off this +configuration step by specifying the -S flag with the Build command. + +The OS subtree contains definitions for variations on a standard +model for system installation. The M4 variables that can be defined +and their defaults before referencing the appropriate OS definitons +are: + +confBEFORE [empty] Files to create before sendmail is + compiled. The methods must be defined + in the Makefile using PUSHDIVERT(3). +confBUILDBIN ../../BuildTools/bin + The location of the build support + binaries, relative to the obj.* + directory. +confCC cc The C compiler to use. +confOPTIMIZE -O Flags passed to CC as ${O}. +confDEPEND_TYPE generic How to build dependencies. This should + be the name of a file in + BuildTools/M4/depend +confEBINDIR /usr/libexec The location for binaries executed + from other binaries, e.g., mail.local + or smrsh. +confENVDEF [empty] -D flags passed to cc. +confHFDIR /usr/share/misc Location of the sendmail help file. +confINCDIRS [empty] -I flags passed to cc. +confINSTALL install The BSD-compatible install program. + Use ${BUILDBIN}/install.sh if none + is available on your system. +confLDOPTS [empty] Linker options passed to ld. +confLIBDIRS [empty] -L flags passed to ld. +confLIBS [varies] -l flags passed to ld. +confLIBSEARCH db bind resolv 44bsd + Search for these libraries for + linking with programs. +confLINKS ${UBINDIR}/newaliases ${UBINDIR}/mailq \ + ${UBINDIR}/hoststat ${UBINDIR}/purgestat + Names of links to sendmail. +confMANROOT /usr/share/man/cat The root of the man subtree. +confMAN1 confMANROOT 1 The location of man1 files. +confMAN1EXT 1 The extension on files in confMAN1. +confMAN1SRC 0 The source for man pages installed + in confMAN1. +confMAN5 confMANROOT 5 The location of man5 files. +confMAN5EXT 5 The extension on files in confMAN5. +confMAN5SRC 0 The source for man pages installed + in confMAN5. +confMAN8 confMANROOT 8 The location of man8 files. +confMAN8EXT 8 The extension on files in confMAN8. +confMAN8SRC 0 The source for man pages installed + in confMAN8. +confMANDOC -mandoc The macros used to format man pages. +confMANOWN bin The owner of installed man pages. +confMANGRP bin The group of installed man pages. +confMANMODE 444 The mode of installed man pages. +confMAPDEF [varies] The map definitions, e.g., + -DNDBM -DNEWDB. -DNEWDB is always + added if a libdb.a can be found. +confNO_MAN_INSTALL [undefined] If defined, don't install the man + pages by default. +confMBINDIR /usr/sbin The location of the MTA (sendmail) + binary. +confNROFF groff -Tascii The command to format man pages. +confOBJADD [empty] Objects that should be included in + when linking sendmail and the + associated utilities. +confSBINDIR /usr/sbin The location of root-oriented + commands, such as makemap. +confSBINOWN root The owner for setuid binaries. +confSBINGRP kmem The group for setuid binaries. +confSBINMODE 4555 The mode for setuid binaries. +confSHELL /bin/sh The shell to use inside make. +confSMOBJADD [empty] Objects that should be included in + when linking sendmail. +confSRCDIR ../../src The sendmail source directory + relative to support program obj.* + directories. +confSTDIR /var/log The directory in which to store the + sendmail status file. +confUBINDIR /usr/bin The directory for user-executable + binaries. +confUBINOWN bin The owner for user-executable binaries. +confUBINGRP bin The group for user-executable binaries. +confUBINMODE 555 The mode for user-executable binaries. + + +@(#)README 8.22 (Berkeley) 6/30/98 diff --git a/contrib/sendmail/BuildTools/Site/README b/contrib/sendmail/BuildTools/Site/README new file mode 100644 index 000000000000..d5ecb96001dc --- /dev/null +++ b/contrib/sendmail/BuildTools/Site/README @@ -0,0 +1,16 @@ +The Build script will look for the default site configuration files in +this directory. Build will include the following files if they are +present in this directory: + + site.OS.$SENDMAIL_SUFFIX.m4 + site.OS.m4 + site.config.m4 + +OS is the name of the operating system file selected from the BuildTools/OS +directory. SENDMAIL_SUFFIX is a user environment variable which can be +used to further distinguish between site configuration files in this +directory. + +See the README in the BuildTools directory for more information. + +@(#)README 8.3 (Berkeley) 3/27/98 diff --git a/contrib/sendmail/BuildTools/bin/Build b/contrib/sendmail/BuildTools/bin/Build new file mode 100755 index 000000000000..ab8a49d78cac --- /dev/null +++ b/contrib/sendmail/BuildTools/bin/Build @@ -0,0 +1,513 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1993, 1996-1997 Eric P. Allman. All rights reserved. +# Copyright (c) 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)Build 8.93 (Berkeley) 6/24/98 +# + +# +# A quick-and-dirty script to compile sendmail and related programs +# in the presence of multiple architectures. To use, just use +# "sh Build". +# + +trap "rm -f $obj/.settings$$; exit" 1 2 3 15 + +cflag="" +mflag="" +sflag="" +makeargs="" +libdirs="" +incdirs="" +libsrch="" +siteconfig="" +EX_USAGE=64 +EX_NOINPUT=66 +EX_UNAVAILABLE=69 + +while [ ! -z "$1" ] +do + case $1 + in + -c) # clean out existing $obj tree + cflag=1 + shift + ;; + + -m) # show Makefile name only + mflag=1 + shift + ;; + + -E*) # environment variables to pass into Build + arg=`echo $1 | sed 's/^-E//'` + if [ -z "$arg" ] + then + shift # move to argument + arg=$1 + fi + if [ -z "$arg" ] + then + echo "Empty -E flag" >&2 + exit $EX_USAGE + else + case $arg + in + *=*) # check format + eval $arg + export `echo $arg | sed 's;=.*;;'` + ;; + *) # bad format + echo "Bad format for -E argument ($arg)" >&2 + exit $EX_USAGE + ;; + esac + shift + fi + ;; + + -L*) # set up LIBDIRS + libdirs="$libdirs $1" + shift + ;; + + -I*) # set up INCDIRS + incdirs="$incdirs $1" + shift + ;; + + -f*) # select site config file + arg=`echo $1 | sed 's/^-f//'` + if [ -z "$arg" ] + then + shift # move to argument + arg=$1 + fi + if [ "$siteconfig" ] + then + echo "Only one -f flag allowed" >&2 + exit $EX_USAGE + else + siteconfig=$arg + if [ -z "$siteconfig" ] + then + echo "Missing argument for -f flag" >&2 + exit $EX_USAGE + elif [ ! -f "$siteconfig" ] + then + echo "${siteconfig}: File not found" + exit $EX_NOINPUT + else + shift # move past argument + fi + fi + ;; + + -S) # skip auto-configure + sflag="-s" + shift + ;; + + *) # pass argument to make + makeargs="$makeargs \"$1\"" + shift + ;; + esac +done + +# +# Do heuristic guesses !ONLY! for machines that do not have uname +# +if [ -d /NextApps -a ! -f /bin/uname -a ! -f /usr/bin/uname ] +then + # probably a NeXT box + arch=`hostinfo | sed -n 's/.*Processor type: \([^ ]*\).*/\1/p'` + os=NeXT + rel=`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'` +elif [ -f /usr/sony/bin/machine -a -f /etc/osversion ] +then + # probably a Sony NEWS 4.x + os=NEWS-OS + rel=`awk '{ print $3}' /etc/osversion` + arch=`/usr/sony/bin/machine` +elif [ -d /usr/omron -a -f /bin/luna ] +then + # probably a Omron LUNA + os=LUNA + if [ -f /bin/luna1 ] && /bin/luna1 + then + rel=unios-b + arch=luna1 + elif [ -f /bin/luna2 ] && /bin/luna2 + then + rel=Mach + arch=luna2 + elif [ -f /bin/luna88k ] && /bin/luna88k + then + rel=Mach + arch=luna88k + fi +elif [ -d /usr/apollo -a -d \`node_data ] +then + # probably a Apollo/DOMAIN + os=DomainOS + arch=$ISP + rel=`/usr/apollo/bin/bldt | grep Domain | awk '{ print $4 }' | sed -e 's/,//g'` +fi + +if [ ! "$arch" -a ! "$os" -a ! "$rel" ] +then + arch=`uname -m | sed -e 's/ //g'` + os=`uname -s | sed -e 's/\//-/g' -e 's/ //g'` + rel=`uname -r | sed -e 's/(/-/g' -e 's/)//g'` +fi + +# +# Tweak the values we have already got. PLEASE LIMIT THESE to +# tweaks that are absolutely necessary because your system uname +# routine doesn't return something sufficiently unique. Don't do +# it just because you don't like the name that is returned. You +# can combine the architecture name with the os name to create a +# unique Makefile name. +# + +# tweak machine architecture +case $arch +in + sun4*) arch=sun4;; + + 9000/*) arch=`echo $arch | sed -e 's/9000.//' -e 's/..$/xx/'`;; + + DS/907000) arch=ds90;; + + NILE*) arch=NILE + os=`uname -v`;; +esac + +# tweak operating system type and release +node=`uname -n | sed -e 's/\//-/g' -e 's/ //g'` +if [ "$os" = "$node" -a "$arch" = "i386" -a "$rel" = 3.2 -a "`uname -v`" = 2 ] +then + # old versions of SCO UNIX set uname -s the same as uname -n + os=SCO_SV +fi +if [ "$rel" = 4.0 ] +then + case $arch in + 3[34]??|3[34]??,*) + if [ -d /usr/sadm/sysadm/add-ons/WIN-TCP ] + then + os=NCR.MP-RAS.2.x + elif [ -d /usr/sadm/sysadm/add-ons/inet ] + then + os=NCR.MP-RAS.3.x + fi + ;; + esac +fi + +case $os +in + DYNIX-ptx) os=PTX;; + Paragon*) os=Paragon;; + HP-UX) rel=`echo $rel | sed -e 's/^[^.]*\.0*//'`;; + AIX) rela=$rel + rel=`uname -v` + case $rel in + 2) arch="" + ;; + 4) if [ "$rela" = "3" ] + then + arch=$rela + fi + ;; + esac + rel=$rel.$rela + ;; + BSD-386) os=BSD-OS;; + SCO_SV) os=SCO; rel=`uname -X | sed -n 's/Release = 3.2v//p'`;; + UNIX_System_V) if [ "$arch" = "ds90" ] + then + os="UXPDS" + rel=`uname -v | sed -e 's/\(V.*\)L.*/\1/'` + fi;; + SINIX-?) os=SINIX;; + DomainOS) case $rel in + 10.4*) rel=10.4;; + esac + ;; +esac + +# get "base part" of operating system release +rroot=`echo $rel | sed -e 's/\.[^.]*$//'` +rbase=`echo $rel | sed -e 's/\..*//'` +if [ "$rroot" = "$rbase" ] +then + rroot=$rel +fi + +# heuristic tweaks to clean up names -- PLEASE LIMIT THESE! +if [ "$os" = "unix" ] +then + # might be Altos System V + case $rel + in + 5.3*) os=Altos;; + esac +elif [ -r /unix -a -r /usr/lib/libseq.a -a -r /lib/cpp ] +then + # might be a DYNIX/ptx 2.x system, which has a broken uname + if strings /lib/cpp | grep _SEQUENT_ > /dev/null + then + os=PTX + fi +elif [ -d /usr/nec ] +then + # NEC machine -- what is it running? + if [ "$os" = "UNIX_System_V" ] + then + os=EWS-UX_V + elif [ "$os" = "UNIX_SV" ] + then + os=UX4800 + fi +elif [ "$arch" = "mips" ] +then + case $rel + in + 4_*) + if [ `uname -v` = "UMIPS" ] + then + os=RISCos + fi;; + esac +fi + +# see if there is a "user suffix" specified +if [ "${SENDMAIL_SUFFIX-}x" = "x" ] +then + sfx="" +else + sfx=".${SENDMAIL_SUFFIX}" +fi + +echo "Configuration: os=$os, rel=$rel, rbase=$rbase, rroot=$rroot, arch=$arch, sfx=$sfx" + + +SMROOT=${SMROOT-..} +BUILDTOOLS=${BUILDTOOLS-$SMROOT/BuildTools} +export SMROOT BUILDTOOLS + +# see if we are in a Build-able directory +if [ ! -f Makefile.m4 ]; then + echo "Makefile.m4 not found. Build can only be run from a source directory." + exit $EX_UNAVAILABLE +fi + +# now try to find a reasonable object directory +if [ -r obj.$os.$rel.$arch$sfx ]; then + obj=obj.$os.$rel.$arch$sfx +elif [ -r obj.$os.$rroot.$arch$sfx ]; then + obj=obj.$os.$rroot.$arch$sfx +elif [ -r obj.$os.$rbase.x.$arch$sfx ]; then + obj=obj.$os.$rbase.x.$arch$sfx +elif [ -r obj.$os.$rel$sfx ]; then + obj=obj.$os.$rel$sfx +elif [ -r obj.$os.$rbase.x$sfx ]; then + obj=obj.$os.$rbase.x$sfx +elif [ -r obj.$os.$arch$sfx ]; then + obj=obj.$os.$arch$sfx +elif [ -r obj.$rel.$arch$sfx ]; then + obj=obj.$rel.$arch$sfx +elif [ -r obj.$rbase.x.$arch$sfx ]; then + obj=obj.$rbase.x.$arch$sfx +elif [ -r obj.$os$sfx ]; then + obj=obj.$os$sfx +elif [ -r obj.$arch$sfx ]; then + obj=obj.$arch$sfx +elif [ -r obj.$rel$sfx ]; then + obj=obj.$rel$sfx +elif [ -r obj$sfx ]; then + obj=obj$sfx +fi +if [ -z "$obj" -o "$cflag" ] +then + if [ -n "$obj" ] + then + echo "Clearing out existing $obj tree" + rm -rf $obj + else + # no existing obj directory -- try to create one if Makefile found + obj=obj.$os.$rel.$arch$sfx + fi + if [ -r $BUILDTOOLS/OS/$os.$rel.$arch$sfx ]; then + oscf=$os.$rel.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rel.$arch ]; then + oscf=$os.$rel.$arch + elif [ -r $BUILDTOOLS/OS/$os.$rroot.$arch$sfx ]; then + oscf=$os.$rroot.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rroot.$arch ]; then + oscf=$os.$rroot.$arch + elif [ -r $BUILDTOOLS/OS/$os.$rbase.x.$arch$sfx ]; then + oscf=$os.$rbase.x.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rbase.x.$arch ]; then + oscf=$os.$rbase.x.$arch + elif [ -r $BUILDTOOLS/OS/$os.$rel$sfx ]; then + oscf=$os.$rel$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rel ]; then + oscf=$os.$rel + elif [ -r $BUILDTOOLS/OS/$os.$rroot$sfx ]; then + oscf=$os.$rroot$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rroot ]; then + oscf=$os.$rroot + elif [ -r $BUILDTOOLS/OS/$os.$rbase.x$sfx ]; then + oscf=$os.$rbase.x$sfx + elif [ -r $BUILDTOOLS/OS/$os.$rbase.x ]; then + oscf=$os.$rbase.x + elif [ -r $BUILDTOOLS/OS/$os.$arch$sfx ]; then + oscf=$os.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$os.$arch ]; then + oscf=$os.$arch + elif [ -r $BUILDTOOLS/OS/$rel.$arch$sfx ]; then + oscf=$rel.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$rel.$arch ]; then + oscf=$rel.$arch + elif [ -r $BUILDTOOLS/OS/$rroot.$arch$sfx ]; then + oscf=$rroot.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$rroot.$arch ]; then + oscf=$rroot.$arch + elif [ -r $BUILDTOOLS/OS/$rbase.x.$arch$sfx ]; then + oscf=$rbase.x.$arch$sfx + elif [ -r $BUILDTOOLS/OS/$rbase.x.$arch ]; then + oscf=$rbase.x.$arch + elif [ -r $BUILDTOOLS/OS/$os$sfx ]; then + oscf=$os$sfx + elif [ -r $BUILDTOOLS/OS/$os ]; then + oscf=$os + elif [ -r $BUILDTOOLS/OS/$arch$sfx ]; then + oscf=$arch$sfx + elif [ -r $BUILDTOOLS/OS/$arch ]; then + oscf=$arch + elif [ -r $BUILDTOOLS/OS/$rel$sfx ]; then + oscf=$rel$sfx + elif [ -r $BUILDTOOLS/OS/$rel ]; then + oscf=$rel + elif [ -r $BUILDTOOLS/OS/$rel$sfx ]; then + oscf=$rel$sfx + else + echo "Cannot determine how to support $arch.$os.$rel" >&2 + exit $EX_UNAVAILABLE + fi + M4=`sh $BUILDTOOLS/bin/find_m4.sh` + ret=$? + if [ $ret -ne 0 ] + then + exit $ret + fi + echo "Using M4=$M4" + export M4 + if [ "$mflag" ] + then + echo "Will run in virgin $obj using $BUILDTOOLS/OS/$oscf" + exit 0 + fi + if [ "$ABI" ] + then + echo "Using ABI $ABI" + fi + echo "Creating $obj using $BUILDTOOLS/OS/$oscf" + mkdir $obj + (cd $obj; ln -s ../*.[ch158] .) + if [ -f sendmail.hf ] + then + (cd $obj; ln -s ../sendmail.hf .) + fi + + rm -f $obj/.settings$$ + echo 'divert(-1)' > $obj/.settings$$ + cat $BUILDTOOLS/M4/header.m4 >> $obj/.settings$$ + if [ "$ABI" ] + then + echo "define(\`confABI', \`$ABI')" >> $obj/.settings$$ + fi + cat $BUILDTOOLS/OS/$oscf >> $obj/.settings$$ + + if [ -z "$siteconfig" ] + then + # none specified, use defaults + if [ -f $BUILDTOOLS/Site/site.$oscf$sfx.m4 ] + then + siteconfig=$BUILDTOOLS/Site/site.$oscf$sfx.m4 + elif [ -f $BUILDTOOLS/Site/site.$oscf.m4 ] + then + siteconfig=$BUILDTOOLS/Site/site.$oscf.m4 + fi + if [ -f $BUILDTOOLS/Site/site.config.m4 ] + then + siteconfig="$BUILDTOOLS/Site/site.config.m4 $siteconfig" + fi + fi + if [ ! -z "$siteconfig" ] + then + echo "Including $siteconfig" + cat $siteconfig >> $obj/.settings$$ + fi + if [ "$libdirs" ] + then + echo "define(\`confLIBDIRS', confLIBDIRS \`\`$libdirs'')" >> $obj/.settings$$ + fi + if [ "$incdirs" ] + then + echo "define(\`confINCDIRS', confINCDIRS \`\`$incdirs'')" >> $obj/.settings$$ + fi + echo 'divert(0)dnl' >> $obj/.settings$$ + libdirs=`(cat $obj/.settings$$; echo "_SRIDBIL_= confLIBDIRS" ) | \ + sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \ + ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ + grep "^_SRIDBIL_=" | \ + sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_SRIDBIL_=//"` + libsrch=`(cat $obj/.settings$$; echo "_HCRSBIL_= confLIBSEARCH" ) | \ + sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \ + ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ + grep "^_HCRSBIL_=" | \ + sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"` + echo 'divert(-1)' >> $obj/.settings$$ + LIBDIRS="$libdirs" LIBSRCH="$libsrch" SITECONFIG="$siteconfig" sh $BUILDTOOLS/bin/configure.sh $sflag $oscf >> $obj/.settings$$ + echo 'divert(0)dnl' >> $obj/.settings$$ + sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' $obj/.settings$$ | \ + ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - Makefile.m4 | \ + sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' > $obj/Makefile + if [ $? -ne 0 -o ! -s $obj/Makefile ] + then + echo "ERROR: ${M4} failed; You may need a newer version of M4, at least as new as System V or GNU" 1>&2 + rm -rf $obj + exit $EX_UNAVAILABLE + fi + rm -f $obj/.settings$$ + echo "Making dependencies in $obj" + (cd $obj; ${MAKE-make} depend) +fi + +if [ "$mflag" ] +then + makefile=`ls -l $obj/Makefile | sed 's/.* //'` + if [ -z "$makefile" ] + then + echo "ERROR: $obj exists but has no Makefile" >&2 + exit $EX_NOINPUT + fi + echo "Will run in existing $obj using $makefile" + exit 0 +fi + +echo "Making in $obj" +cd $obj +eval exec ${MAKE-make} $makeargs diff --git a/contrib/sendmail/BuildTools/bin/configure.sh b/contrib/sendmail/BuildTools/bin/configure.sh new file mode 100644 index 000000000000..eb149b2cdd46 --- /dev/null +++ b/contrib/sendmail/BuildTools/bin/configure.sh @@ -0,0 +1,163 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)configure.sh 8.27 (Berkeley) 5/19/98 + +# +# Special script to autoconfigure for M4 generation of Makefile +# + +os="" +resolver="" +sflag="" + +while [ ! -z "$1" ] +do + case $1 + in + -s) # skip auto-configure + sflag=1 + shift + ;; + + *) # OS definition + os=$1 + shift + ;; + esac +done + +usewhoami=0 +usehostname=0 +for p in `echo $PATH | sed 's/:/ /g'` +do + if [ "x$p" = "x" ] + then + p="." + fi + if [ -f $p/whoami ] + then + usewhoami=1 + if [ $usehostname -ne 0 ] + then + break; + fi + fi + if [ -f $p/hostname ] + then + usehostname=1 + if [ $usewhoami -ne 0 ] + then + break; + fi + fi +done +if [ $usewhoami -ne 0 ] +then + user=`whoami` +else + user=$LOGNAME +fi + +if [ $usehostname -ne 0 ] +then + host=`hostname` +else + host=`uname -n` +fi +echo "PUSHDIVERT(0)" +echo "####################################################################" +echo "##### This file is automatically generated -- edit at your own risk" +echo '#####' Built by $user@$host +echo '#####' on `date` using template OS/$os +if [ ! -z "$SITECONFIG" ] +then + echo '#####' including $SITECONFIG +fi +echo '#####' in `pwd` | sed 's/\/tmp_mnt//' +echo "####################################################################" +echo "" +echo "POPDIVERT" +echo "define(\`__HOST__', \`$host')dnl" +echo "ifdef(\`confMAPDEF',, \`define(\`confMAPDEF', \`')')dnl" +echo "ifdef(\`confLIBS',, \`define(\`confLIBS', \`')')dnl" + +# If user did not supply ABI for Build, use SGI_ABI +# so the proper libraries are checked below. +if [ -z "$ABI" ] +then + ABI="$SGI_ABI" +fi + +case $ABI +in + -n32) LIBDIRS="$LIBDIRS /lib32 /usr/lib32" + ;; + -64) LIBDIRS="$LIBDIRS /lib64 /usr/lib64" + ;; + *) LIBDIRS="$LIBDIRS /lib /usr/lib /usr/shlib" + ;; +esac + +libs="" +mapdef="" +for l in $LIBSRCH +do + for p in `echo $LIBDIRS | sed -e 's/:/ /g' -e 's/^-L//g' -e 's/ -L/ /g'` + do + if [ "x$p" = "x" ] + then + p = "." + fi + if [ -f $p/lib$l.a -o -f $p/lib$l.so ] + then + case $l + in + db) + mapdef="$mapdef -DNEWDB" + ;; + bind|resolv) + if [ -n "$resolver" ] + then + continue + else + resolver=$l + fi + ;; + 44bsd) + if [ "x$resolver" != "xresolv" ] + then + continue + fi + ;; + esac + libs="$libs -l$l" + break + fi + done +done + +for p in `echo $PATH | sed 's/:/ /g'` +do + pbase=`echo $p | sed -e 's,/bin,,'` + if [ "x$p" = "x" ] + then + p="." + fi + if [ -f $p/mkdep ] + then + echo "ifdef(\`confDEPEND_TYPE',, \`define(\`confDEPEND_TYPE', \`BSD')')dnl" + fi +done + +if [ -z "$sflag" ] +then + echo "define(\`confMAPDEF', \`$mapdef' confMAPDEF)dnl" + echo "define(\`confLIBS', \`$libs' confLIBS)dnl" +fi diff --git a/contrib/sendmail/BuildTools/bin/find_m4.sh b/contrib/sendmail/BuildTools/bin/find_m4.sh new file mode 100755 index 000000000000..d2cf66556d82 --- /dev/null +++ b/contrib/sendmail/BuildTools/bin/find_m4.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)find_m4.sh 8.4 (Berkeley) 5/19/98 +# + +# Try to find a working M4 program. +# If $M4 is already set, we use it, otherwise we prefer GNU m4. + +EX_UNAVAILABLE=69 + +test="ifdef(\`pushdef', \`', +\`errprint(\`You need a newer version of M4, at least as new as System V or GNU') +include(NoSuchFile)') +define(\`BadNumber', \`10') +ifdef(\`BadNumber', \`', \`errprint(\`This version of m4 is broken')')" + +if [ "$M4" ] +then + err=`(echo "$test" | $M4) 2>&1 >/dev/null` + code=$? +else + firstfound= + ifs="$IFS"; IFS="${IFS}:" + for m4 in gm4 gnum4 pdm4 m4 + do + for dir in $PATH /usr/5bin /usr/ccs/bin + do + [ -z "$dir" ] && dir=. + if [ -f $dir/$m4 ] + then + err=`(echo "$test" | $dir/$m4) 2>&1 >/dev/null` + ret=$? + if [ $ret -eq 0 -a "X$err" = "X" ] + then + M4=$dir/$m4 + code=0 + break + else + case "$firstfound:$err" in + :*version\ of*) + firstfound=$dir/$m4 + firsterr="$err" + firstcode=$ret + ;; + esac + fi + fi + done + [ "$M4" ] && break + done + IFS="$ifs" + if [ ! "$M4" ] + then + if [ "$firstfound" ] + then + M4=$firstfound + err="$firsterr" + code=$firstcode + else + echo "ERROR: Can not locate an M4 program" >&2 + exit $EX_UNAVAILABLE + fi + fi +fi +if [ $code -ne 0 ] +then + echo "ERROR: Using M4=$M4: $err" | grep -v NoSuchFile >&2 + exit $EX_UNAVAILABLE +elif [ "X$err" != "X" ] +then + echo "WARNING: $err" >&2 +fi +echo $M4 +exit 0 + diff --git a/contrib/sendmail/BuildTools/bin/install.sh b/contrib/sendmail/BuildTools/bin/install.sh new file mode 100755 index 000000000000..58f7623a1475 --- /dev/null +++ b/contrib/sendmail/BuildTools/bin/install.sh @@ -0,0 +1,128 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)install.sh 8.9 (Berkeley) 5/19/98 + +# Set default program +program=mv + +# chown program -- ultrix keeps it in /etc/chown and /usr/etc/chown +if [ -f /etc/chown ] +then + chown=/etc/chown +elif [ -f /usr/etc/chown ] +then + chown=/usr/etc/chown +else + chown=chown +fi + +# Check arguments +while [ ! -z "$1" ] +do + case $1 + in + -o) owner=$2 + shift; shift + ;; + + -g) group=$2 + shift; shift + ;; + + -m) mode=$2 + shift; shift + ;; + + -c) program=cp + shift + ;; + + -s) strip="strip" + shift + ;; + + -*) echo $0: Unknown option $1 + exit 1 + ;; + + *) break + ;; + esac +done + +# Check source file +if [ -z "$1" ] +then + echo "Source file required" >&2 + exit 1 +elif [ -f $1 -o $1 = /dev/null ] +then + src=$1 +else + echo "Source file must be a regular file or /dev/null" >&2 + exit 1 +fi + +# Check destination +if [ -z "$2" ] +then + echo "Destination required" >&2 + exit 1 +elif [ -d $2 ] +then + dst=$2/$src +else + dst=$2 +fi + +# Do install operation +$program $src $dst +if [ $? != 0 ] +then + exit 1 +fi + +# Strip if requested +if [ ! -z "$strip" ] +then + $strip $dst +fi + +# Change owner if requested +if [ ! -z "$owner" ] +then + $chown $owner $dst + if [ $? != 0 ] + then + exit 1 + fi +fi + +# Change group if requested +if [ ! -z "$group" ] +then + chgrp $group $dst + if [ $? != 0 ] + then + exit 1 + fi +fi + +# Change mode if requested +if [ ! -z "$mode" ] +then + chmod $mode $dst + if [ $? != 0 ] + then + exit 1 + fi +fi + +exit 0 diff --git a/contrib/sendmail/FAQ b/contrib/sendmail/FAQ new file mode 100644 index 000000000000..b4cb2e6d1773 --- /dev/null +++ b/contrib/sendmail/FAQ @@ -0,0 +1,6 @@ +The FAQ is no longer maintained with the sendmail release. It is +available at http://www.sendmail.org/faq/ . + +A plain-text version of the questions only, with URLs referring to +the answers, is posted to comp.mail.sendmail on the 10th and 25th +of each month. diff --git a/usr.sbin/sendmail/KNOWNBUGS b/contrib/sendmail/KNOWNBUGS index c334fa4bd0c8..cd62b20eb12e 100644 --- a/usr.sbin/sendmail/KNOWNBUGS +++ b/contrib/sendmail/KNOWNBUGS @@ -1,7 +1,7 @@ K N O W N B U G S I N S E N D M A I L - (for 8.8.6) + (for 8.9.0) The following are bugs or deficiencies in sendmail that I am aware of @@ -37,7 +37,7 @@ This list is not guaranteed to be complete. * If you EXPN a list or user that has a program mailer, the output of EXPN will include ``@local.host.name''. You can't actually mail to - this address. It's not clear what the right behaviour is in this + this address. It's not clear what the right behavior is in this circumstance. * \231 considered harmful. @@ -48,7 +48,7 @@ This list is not guaranteed to be complete. * accept() problem on SVR4. Apparently, the sendmail daemon loop (doing accept()s on the network) - can get into a wierd state on SVR4; it starts logging ``SYSERR: + can get into a weird state on SVR4; it starts logging ``SYSERR: getrequests: accept: Protocol Error''. The workaround is to kill and restart the sendmail daemon. We don't have an SVR4 system at Berkeley that carries more than token mail load, so I can't validate @@ -73,7 +73,11 @@ This list is not guaranteed to be complete. getrequests: accept: Connection timed out "Connection timed out" is not documented as a valid return from - accept(2) and this is believed to be a bug in the Linux kernel. + accept(2) and this was believed to be a bug in the Linux kernel. + Later information from the Linux kernel group states that Linux + 2.0 kernels follow RFC1122 while sendmail follows the original BSD + (now POSIX 1003.1g draft) specification. The 2.1.X and later kernels + will follow the POSIX draft. * Excessive mailing list nesting can run out of file descriptors. @@ -103,5 +107,41 @@ This list is not guaranteed to be complete. account for the SMTP on-the-wire \r\n expansion. It probably doesn't allow for 8->7 bit MIME conversions either. +* Paths to programs being executed and the mode of program files are + not checked. Essentially, the RunProgramInUnsafeDirPath and + RunWritableProgram bits in the DontBlameSendmail option are always + set. This is not a problem if your system is well managed (that is, + if binaries and system directories are mode 755 instead of something + foolish like 777). -(Version 8.25, last updated 6/13/97) +* 8-bit data in GECOS field + + If the GECOS (personal name) information in the passwd file contains + 8-bit characters, those characters can be included in the message + header, which can cause problems when sending SMTP to hosts that + only accept 7-bit characters. + +* 8->7 bit MIME conversion + + When sendmail is doing 8->7 bit MIME conversions, and the message + contains certain MIME body types that cannot be converted to 7-bit, + sendmail will strip the message to 7-bit. + +* 7->8 bit MIME conversion + + If a message that is encoded as 7-bit MIME is converted to 8-bit and + that message when decoded is illegal (e.g., because of long lines or + illegal characters), sendmail can produce an illegal message. + +* MIME encoded full name phrases in the From: header + + If a full name phrase includes characters from MustQuoteChars, sendmail + will quote the entire full name phrase. If MustQuoteChars includes + characters which are not special characters according to STD 11 (RFC + 822), this quotation can interfere with MIME encoded full name phrases. + By default, sendmail includes the single quote character (') in + MustQuoteChars even though it is not listed as a special character in + STD 11. + + +(Version 8.32, last updated 6/30/98) diff --git a/contrib/sendmail/LICENSE b/contrib/sendmail/LICENSE new file mode 100644 index 000000000000..bb1c3a79c7f0 --- /dev/null +++ b/contrib/sendmail/LICENSE @@ -0,0 +1,89 @@ + SENDMAIL LICENSE + +The following license terms and conditions apply, unless a different +license is obtained from Sendmail, Inc., 1401 Park Avenue, Emeryville, CA +94608, or by electronic mail at license@sendmail.com. + +License Terms: + +Use, Modification and Redistribution (including distribution of any +modified or derived work) in source and binary forms is permitted only if +each of the following conditions is met: + +1. Redistributions qualify as "freeware" or "Open Source Software" under + one of the following terms: + + (a) Redistributions are made at no charge beyond the reasonable cost of + materials and delivery. + + (b) Redistributions are accompanied by a copy of the Source Code or by an + irrevocable offer to provide a copy of the Source Code for up to three + years at the cost of materials and delivery. Such redistributions + must allow further use, modification, and redistribution of the Source + Code under substantially the same terms as this license. For the + purposes of redistribution "Source Code" means the complete source + code of sendmail including all modifications. + + Other forms of redistribution are allowed only under a separate royalty- + free agreement permitting such redistribution subject to standard + commercial terms and conditions. A copy of such agreement may be + obtained from Sendmail, Inc. at the above address. + +2. Redistributions of source code must retain the copyright notices as they + appear in each source code file, these license terms, and the + disclaimer/limitation of liability set forth as paragraph 6 below. + +3. Redistributions in binary form must reproduce the Copyright Notice, + these license terms, and the disclaimer/limitation of liability set + forth as paragraph 6 below, in the documentation and/or other materials + provided with the distribution. For the purposes of binary distribution + the "Copyright Notice" refers to the following language: + "Copyright (c) 1998 Sendmail, Inc. All rights reserved." + +4. Neither the name of Sendmail, Inc. nor the University of California nor + the names of their contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. The name "sendmail" is a trademark of Sendmail, Inc. + +5. All redistributions must comply with the conditions imposed by the + University of California on certain embedded code, whose copyright + notice and conditions for redistribution are as follows: + + (a) Copyright (c) 1988, 1993 The Regents of the University of + California. All rights reserved. + + (b) Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + (i) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + (ii) 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. + + (iii) 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." + + (iv) 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. + +6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY + SENDMAIL, INC. 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 SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF + CALIFORNIA 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 DAMAGES. + +(Version 8.6, last updated 6/24/98) diff --git a/contrib/sendmail/Makefile b/contrib/sendmail/Makefile new file mode 100644 index 000000000000..0b44c4203190 --- /dev/null +++ b/contrib/sendmail/Makefile @@ -0,0 +1,26 @@ +# @(#)Makefile.dist 8.2 (Berkeley) 2/17/98 + +SHELL= /bin/sh +SUBDIRS= src mail.local mailstats makemap praliases rmail smrsh +BUILD= ./Build +OPTIONS= $(CONFIG) $(FLAGS) + +all clean install:: FRC + @for x in $(SUBDIRS); \ + do \ + (cd $$x; echo Making $@ in:; pwd; \ + $(SHELL) $(BUILD) $(OPTIONS) $@); \ + done + +fresh:: FRC + @for x in $(SUBDIRS); \ + do \ + (cd $$x; echo Making $@ in:; pwd; \ + $(SHELL) $(BUILD) $(OPTIONS) -c); \ + done + +$(SUBDIRS):: FRC + @cd $@; pwd; \ + $(SHELL) $(BUILD) $(OPTIONS) + +FRC: diff --git a/usr.sbin/sendmail/READ_ME b/contrib/sendmail/README index 08b5affb04f9..5de10764212e 100644 --- a/usr.sbin/sendmail/READ_ME +++ b/contrib/sendmail/README @@ -1,11 +1,11 @@ /*- - * @(#)READ_ME 8.32 (Berkeley) 7/6/97 + * @(#)README 8.48 (Berkeley) 5/19/98 */ SENDMAIL RELEASE 8 -This directory has the latest sendmail software from Berkeley. See -doc/changes/changes.me for a summary of changes since 5.67. +This directory has the latest sendmail(TM) software from Sendmail, Inc. +See doc/changes/changes.me for a summary of changes since 5.67. Report any bugs to sendmail-bugs@sendmail.ORG @@ -14,12 +14,82 @@ the latest updates. ****************************************************************** ** DO NOT USE MAKE to compile sendmail. Instead, cd src and ** -** use the "makesendmail" shell script. On many environments ** -** this will do everything for you, no fuss, no muss. See ** -** src/READ_ME for more details of compilation. See cf/README ** +** use the "Build" shell script. On many environments this ** +** will do everything for you, no fuss, no muss. See ** +** src/README for more details of compilation. See cf/README ** ** for details about building a runtime configuration file. ** ****************************************************************** +Sendmail is a trademark of Sendmail, Inc. + ++-----------------------+ +| DIRECTORY PERMISSIONS | ++-----------------------+ + +Sendmail often gets blamed for many problems that are actually the +result of other problems, such as overly permissive modes on directories. +For this reason, sendmail checks the modes on system directories and +files to determine if can have been trusted. For sendmail to run +without complaining, you MUST execute the following command: + + chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue + chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue + +You will probably have to tweak this for your environment (for example, +some systems put the spool directory into /usr/spool instead of +/var/spool and use /etc/mail for aliases file instead of /etc). If you +set the RunAsUser option in your sendmail.cf, the /var/spool/mqueue +directory will have to be owned by the RunAsUser user. As a general rule, +after you have compiled sendmail, run the command + + sendmail -v -bi + +to initialize the alias database. If it gives messages such as + + WARNING: writable directory /etc + WARNING: writable directory /usr/spool/mqueue + +then the directories listed have inappropriate write permissions and +should be secured to avoid various possible security attacks. + +Beginning with sendmail 8.9, these checks have become more strict to +prevent users from being able to access files they would normally not +be able to read. In particular, .forward and :include: files in unsafe +directory paths (directory paths which are group or world writable) will +no longer be allowed. This would mean that if user joe's home directory +was writable by group staff, sendmail would not use his .forward file. +This behavior can be altered, at the expense of system security, by +setting the DontBlameSendmail option. For example, to allow .forward +files in group writable directories: + + O DontBlameSendmail=forwardfileingroupwritabledirpath + +Or to allow them in both group and world writable directories: + + O DontBlameSendmail=forwardfileinunsafedirpath + +Items from these unsafe .forward and :include: files will be marked +as unsafe addresses -- the items can not be deliveries to files or +programs. This behavior can also be altered via DontBlameSendmail: + + O DontBlameSendmail=forwardfileinunsafedirpath, + forwardfileinunsafedirpathsafe + +The first flag allows the .forward file to be read, the second allows +the items in the file to be marked as safe for file and program +delivery. + +Other files affected by this strengthened security include class +files (i.e. Fw /etc/sendmail.cw), persistent host status files, and +the files specified by the ErrorHeader and HelpFile options. Similar +DontBlameSendmail flags are available for the class, ErrorHeader, and +HelpFile files. + +If you have an unsafe configuration of .forward and :include: +files, you can make it safe by finding all such files, and doing +a "chmod go-w $FILE" on each. Also, do a "chmod go-w $DIR" for +each directory in the file's path. + +--------------+ | MANUAL PAGES | @@ -28,7 +98,6 @@ the latest updates. The sendmail manual pages use contemporary Berkeley troff macros. If your system does not process these manual pages, you can pick up the new macros in a BSD Net/2 FTP site (e.g. on FTP.UU.NET, the files -/systems/unix/bsd-sources/share/tmac/me/strip.sed and /systems/unix/bsd-sources/share/tmac/*). The strip.sed file is only used in installation. @@ -74,7 +143,7 @@ macro set that is compatible with these macros. There are other files you should read. Rooted in this directory are: - CHANGES-R5-R8 + doc/changes/changes.ps Describes changes between Release 5 and Release 8 of sendmail. There are some things that may behave somewhat differently. For example, the rules governing when :include: files will @@ -83,12 +152,12 @@ There are other files you should read. Rooted in this directory are: Answers to Frequently Asked Questions. KNOWNBUGS Known bugs in the current release. I try to keep this up - to date -- get the latest version from FTP.CS.Berkeley.EDU + to date -- get the latest version from FTP.Sendmail.ORG in /ucb/sendmail/KNOWNBUGS. RELEASE_NOTES A detailed description of the changes in each version. This is quite long, but informative. - src/READ_ME + src/README Details on compiling and installing sendmail. cf/README Details on configuring sendmail. @@ -110,10 +179,23 @@ There are other files you should read. Rooted in this directory are: +--------------+ There are several related RFCs that you may wish to read -- they are -available via anonymous FTP to several sites, including nic.ddn.mil -(directory rfc), ftp.nisc.sri.com (rfc), nis.nsf.net (RFC), -nisc.jvnc.net (rfc), venera.isi.edu (in-notes), and wuarchive.wustl.edu -(info/rfc). They can also be retrieved via electronic mail by sending +available via anonymous FTP to several sites, including: + + ftp://nic.ddn.mil/rfc/ + ftp://nis.nsf.net/documents/rfc/ + ftp://nisc.jvnc.net/rfc/ + ftp://venera.isi.edu/in-notes/ + ftp://wuarchive.wustl.edu/doc/rfc/ + +For a list of the primary repositories see: + + http://www.isi.edu/in-notes/rfc-retrieval.txt + +They are also online at: + + http://www.ietf.org/ + +They can also be retrieved via electronic mail by sending email to one of: mail-server@nisc.sri.com @@ -123,6 +205,10 @@ email to one of: sendrfc@jvnc.net Put "RFCnnn" as Subject: line +For further instructions see: + + http://www.isi.edu/in-notes/rfc-editor/rfc-info + Important RFCs for electronic mail are: RFC821 SMTP protocol @@ -134,7 +220,8 @@ Important RFCs for electronic mail are: RFC1869 SMTP Service Extensions (ESMTP spec) RFC1652 SMTP Service Extension for 8bit-MIMEtransport RFC1870 SMTP Service Extension for Message Size Declaration - RFC1521 MIME: Multipurpose Internet Mail Extensions + RFC2045 Multipurpose Internet Mail Extensions (MIME) Part One: + Format of Internet Message Bodies RFC1344 Implications of MIME for Internet Mail Gateways RFC1428 Transition of Internet Mail from Just-Send-8 to 8-bit SMTP/MIME @@ -165,15 +252,41 @@ IF YOU WANT TO RUN THE NEW BERKELEY DB SOFTWARE: **** DO NOT **** use the version that was on the Net2 tape -- it has a number of nefarious bugs that were bad enough when I got them; you shouldn't have to go through the same thing. Instead, get a new version via the web at -http://www.sleepycat.com/packages/db.1.85.tar.gz. This software is -highly recommended; it gets rid of several stupid limits, it's much -faster, and the interface is nicer to animals and plants. You will -also probably find that you have to add -I/where/you/put/db/include -to the sendmail makefile to get db.h to work properly. - -Be sure you remove ndbm.h and ndbm.o from the db distribution. These -will cause problems with sendmail because sendmail already understands -about NEWDB and NDBM coexisting. +http://www.sleepycat.com/. This software is highly recommended; it gets +rid of several stupid limits, it's much faster, and the interface is +nicer to animals and plants. If the Berkeley DB include files +are installed in a location other than those which your compiler searches, +you will need to provide that directory when building: + + Build -I/path/to/include/directory + +If you are using Berkeley DB versions 1.85 or 1.86, you are *strongly* +urged to upgrade to DB version 2, available from http://www.sleepycat.com/. +Berkeley DB versions 1.85 and 1.86 are known to be broken in various nasty +ways (see http://www.sleepycat.com/db.185.html), and can cause sendmail +to dump core. In addition, the newest versions of gcc and the Solaris +compilers perform optimizations in those versions that may cause fairly +random core dumps. + +If you have no choice but to use Berkeley DB 1.85 or 1.86, and you are +using both Berkeley DB and files in the UNIX ndbm format, remove ndbm.h +and ndbm.o from the DB library after building it. You should also apply +all of the patches for DB 1.85 and 1.86 found at the Sleepycat web site +(see http://www.sleepycat.com/db.185.html), as they fix some of the known +problems. + +If you are using a version of Berkeley DB 2 previous to 2.3.15, and you +are using both Berkeley DB and files in the UNIX ndbm format, remove dbm.o +from the DB library after building it. No other changes are necessary. + +If you are using Berkeley DB version 2.3.15 or greater, no changes are +necessary. + +The underlying database file formats changed between Berkeley DB versions +1.85 and 1.86, and again between DB 1.86 and version 2.0. If you are +upgrading from one of those versions, you must recreate your database +file(s). Do this by rebuilding all maps with makemap and rebuilding the +alias file with newaliases. +--------------------+ @@ -228,71 +341,18 @@ one of those sites. Versions are available for several different systems, including Apollo, BSD, NeXT, AIX, TOPS20, and VMS. -+-----------+ -| MAKEFILES | -+-----------+ - -The Makefiles in this release use the new Berkeley "make" that is -available in BSD Net/2 and 4.4BSD. If you are using this version -of make, you may notice one or two places where the Makefile includes -"../../Makefile.inc". This file is not included with the sendmail -distribution because it's not part of sendmail. However, it is, -in toto: - - # @(#)Makefile.inc 8.1 (Berkeley) 6/6/93 - - BINDIR?= /usr/sbin - -The other directories should all have Makefile.dist files that work -on the old make, albeit without all the niceties included. - -You can also get a new Berkeley make from the Net2 release (available -on many public FTP archives). This version should also interpret old -Makefiles, so you could drop it in as your default make. - -For more details, see src/READ_ME. - - -+-----------------------+ -| DIRECTORY PERMISSIONS | -+-----------------------+ - -Sendmail often gets blamed for many problems that are actually the -result of other problems, such as overly permissive modes on directories. -For this reason, sendmail checks the modes on system directories and -files to determine if they have been trusted. For sendmail to run -without complaining, you MUST execute the following command: - - chmod go-w / /etc /usr /var /var/spool /var/spool/mqueue - -You will probably have to tweak this for your environment (for example, -some systems put the spool directory into /usr/spool instead of -/var/spool). As a general rule, after you have compiled sendmail, -run the command - - sendmail -v -bi - -to initialize the alias database. If it gives messages such as - - WARNING: writable directory /etc - WARNING: writable directory /usr/spool/mqueue - -then the directories listed have inappropriate write permissions and -should be secured to avoid various possible security attacks. - - +---------------------+ | DIRECTORY STRUCTURE | +---------------------+ The structure of this directory tree is: -cf Source for Berkeley configuration files. These are +cf Source for sendmail configuration files. These are different than what you've seen before. They are a fairly dramatic rewrite, requiring the new sendmail (since they use new features). contrib Some contributed tools to help with sendmail. THESE - ARE NOT SUPPORTED by Berkeley -- contact the original + ARE NOT SUPPORTED by sendmail -- contact the original authors if you have problems. (This directory is not on the 4.4BSD tape.) doc Documentation. If you are getting source, read @@ -303,7 +363,7 @@ mail.local The source for the local delivery agent used for 4.4BSD. it does mailbox locking differently than other systems. mailstats Statistics printing program. It has the pathname of sendmail.st compiled in, so if you've changed that, - beware. This isn't all that useful. + beware. makemap A program that creates the keyed maps used by the $( ... $) construct in sendmail. It is primitive but effective. It takes a very simple input format, so you will probably diff --git a/usr.sbin/sendmail/RELEASE_NOTES b/contrib/sendmail/RELEASE_NOTES index b3e1a8b33d32..2b3475ffbcc6 100644 --- a/usr.sbin/sendmail/RELEASE_NOTES +++ b/contrib/sendmail/RELEASE_NOTES @@ -1,11 +1,616 @@ SENDMAIL RELEASE NOTES - @(#)RELEASE_NOTES 8.8.8.4 (Berkeley) 10/24/97 + @(#)RELEASE_NOTES 8.9.1.1 (Berkeley) 7/2/98 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.9.1/8.9.1 98/07/02 + If both an OS specific site configuration file and a generic + site.config.m4 file existed, only the latter was used + instead of both. Problem noted by Geir Johannessen of + the Norwegian University of Science and Technology. + Fix segmentation fault while converting 8 bit to 7 bit MIME + multipart messages by trying to write to an unopened + file descriptor. Fix from Kari Hurtta of the Finnish + Meteorological Institute. + Do not assume Message: and Text: headers indicate the end of + the header area when parsing MIME headers. Problem noted + by Kari Hurtta of the Finnish Meteorological Institute. + Setting the confMAN#SRC Build variable would only effect the + installation commands. The man pages would still be + built with .0 extensions. Problem noted by Bryan + Costales of InfoBeat, Inc. + Installation of manual pages didn't honor the DESTDIR environment + variable. Problem noted by Bryan Costales of InfoBeat, Inc. + If the check_relay ruleset resolved to the discard mailer, messages + were still delivered. Problem noted by Mirek Luc of NASK. + Mail delivery to files would fail with an Operating System Error + if sendmail was not running as root, i.e. RunAsUser was set. + Problem noted by Leonard N. Zubkoff of Dandelion Digital. + Prevent MinQueueAge from interfering from queued items created + in the future, i.e. if the system clock was set ahead + and then back. Problem noted by Michael Miller of the + University of Natal, Pietermaritzburg. + Do not advertise ETRN support in ESTMP EHLO reply if noetrn is + set in the PrivacyFlags option. Fix from Ted Rule of + Flextech TV. + Log invalid persistent host status file lines instead of + bouncing the message. Problem noted by David Lindes of + DaveLtd Enterprises. + Move creation of empty sendmail.st file from installation to + compilation. Installation may be done from a read-only + mount. Fix from Bryan Costales of InfoBeat, Inc. and Ric + Anderson of the Oasis Research Center, Inc. + Enforce the maximum number of User Database entries limit. Problem + noted by Gary Buchanan of Credence Systems Inc. + Allow dead.letter files in root's home directory. Problem noted + by Anna Ullman of Sun Microsystems. + Program deliveries in forward files could be marked unsafe if + any directory listed in the ForwardPath option did not + exist. Problem noted by Jorg Bielak of Coastal Web Online. + Do not trust the length of the address structure returned by + gethostbyname(). Problem noted by Chris Evans of Oxford + University. + If the SIZE= MAIL From: ESMTP parameter is too large, use the + 5.3.4 DSN status code instead of 5.2.2. Similarly, for + non-local deliveries, if the message is larger than the + mailer maximum message size, use 5.3.4 instead of 5.2.3. + Suggested by Antony Bowesman of + Fujitsu/TeaWARE Mail/MIME System. + Portability: + Fix the check for an IP address reverse lookup for + use in $&{client_name} on 64 bit platforms. + From Gilles Gallot of Institut for Development + and Resources in Intensive Scientific computing. + BSD-OS uses .0 for man page extensions. From Jeff Polk + of BSDI. + DomainOS detection for Build. Also, version 10.4 and later + ship a unistd.h. Fixes from Takanobu Ishimura of + PICT Inc. + NeXT 4.x uses /usr/lib/man/cat for its man pages. From + J. P. McCann of E I A. + SCO 4.X and 5.X include NDBM support. From Vlado Potisk + of TEMPEST, Ltd. + CONFIG: Do not pass spoofed PTR results through resolver for + qualification. Problem noted by Michiel Boland of + Digital Valley Internet Professionals; fix from + Kari Hurtta of the Finnish Meteorological Institute. + CONFIG: Do not try to resolve non-DNS hostnames such as UUCP, + BITNET, and DECNET addresses for resolvable senders. + Problem noted by Alexander Litvin of Lucky Net Ltd. + CONFIG: Work around Sun's broken configuration which sends bounce + messages as coming from @@hostname instead of <>. LMTP + would not accept @@hostname. + OP.ME: Corrections to complex sendmail startup script from Rick + Troxel of the National Institutes of Health. + RMAIL: Do not install rmail by default, require 'make force-install' + as this rmail isn't the same as others. Suggested by + Kari Hurtta of the Finnish Meteorological Institute. + +8.9.0/8.9.0 98/05/19 + SECURITY: To prevent users from reading files not normally + readable, sendmail will no longer open forward, :include:, + class, ErrorHeader, or HelpFile files located in unsafe + (i.e. group or world writable) directory paths. Sites + which need the ability to override security can use the + DontBlameSendmail option. See the README file for more + information. + SECURITY: Problems can occur on poorly managed systems, specifically, + if maps or alias files are in world writable directories. + This fixes the change added to 8.8.6 to prevent links in these + world writable directories. + SECURITY: Make sure ServiceSwitchFile option file is not a link if + it is in a world writable directory. + SECURITY: Never pass a tty to a mailer -- if a mailer can get at the + tty it may be able to push bytes back to the senders input. + Unfortunately this breaks -v mode. Problem noted by + Wietse Venema of the Global Security Analysis Lab at + IBM T.J. Watson Research. + SECURITY: Empty group list if DontInitGroups is set to true to + prevent program deliveries from picking up extra group + privileges. Problem reported by Wolfgang Ley of DFN-CERT. + SECURITY: The default value for DefaultUser is now set to the uid and + gid of the first existing user mailnull, sendmail, or daemon + that has a non-zero uid. If none of these exist, sendmail + reverts back to the old behavior of using uid 1 and gid 1. + This is a security problem for Linux which has chosen that + uid and gid for user bin instead of daemon. If DefaultUser + is set in the configuration file, that value overrides this + default. + SECURITY: Since 8.8.7, the check for non-setuid binaries + interfered with setting an alternate group id for the + RunAsUser option. Problem noted by Randall Winchester of + the University of Maryland. + Add support for Berkeley DB 2.X. Based on patch from John Kennedy + of Cal State University, Chico. + Remove support for OLD_NEWDB (pre-1.5 version of Berkeley DB). Users + which previously defined OLD_NEWDB=1 must now upgrade to the + current version of Berkeley DB. + Added support for regular expressions using the new map class regex. + From Jan Krueger of Unix-AG of University of Hannover. + Support for BIND 8.1.1's hesiod for hesiod maps and hesiod + UserDatabases from Randall Winchester of the University + of Maryland. + Allow any shell for user shell on program deliveries on V1 + configurations for backwards compatibility on machines which + do not have getusershell(). Fix from John Beck of Sun + Microsystems. + On operating systems which change the process title by reusing the + argument vector memory, sendmail could corrupt memory if the + last argument was either "-q" or "-d". Problem noted by + Frank Langbein of the University of Stuttgart. + Support Local Mail Transfer Protocol (LMTP) between sendmail and + mail.local on the F=z flag. + Macro-expand the contents of the ErrMsgFile. Previously this was + only done if you had magic characters (0x81) to indicate + macro expansion. Now $x will be expanded. This means that + real dollar signs have to be backslash escaped. + TCP Wrappers expects "unknown" in the hostname argument if the + reverse DNS lookup for the incoming connection fails. + Problem noted by Randy Grimshaw of Syracuse University and + Wietse Venema of the Global Security Analysis Lab at + IBM T.J. Watson Research. + DSN success bounces generated from an invocation of sendmail -t + would be sent to both the sender and MAILER-DAEMON. + Problem noted by Claus Assmann of + Christian-Albrechts-University of Kiel. + Avoid "Error 0" messages on delivery mailers which exit with a + valid exit value such as EX_NOPERM. Fix from Andreas Luik + of ISA Informationssysteme GmbH. + Tokenize $&x expansions on right hand side of rules. This eliminates + the need to use tricks like $(dequote "" $&{client_name} $) + to cause the ${client_name} macro to be properly tokenized. + Add the MaxRecipientsPerMessage option: this limits the number of + recipients that will be accepted in a single SMTP + transaction. After this number is reached, sendmail + starts returning "452 Too many recipients" to all RCPT + commands. This can be used to limit the number of recipients + per envelope (in particular, to discourage use of the server + for spamming). Note: a better approach is to restrict + relaying entirely. + Fixed pointer initialization for LDAP lmap struct, fixed -s option + to ldapx map and added timeout for ldap_open call to + avoid hanging sendmail in the event of hung LDAP servers. + Patch from Booker Bense of Stanford University. + Allow multiple -qI, -qR, or -qS queue run limiters. For example, + '-qRfoo -qRbar' would deliver mail to recipients with foo or + bar in their address. Patch from Allan E Johannesen of + Worcester Polytechnic Institute. + The bestmx map will now return a list of the MX servers for a host if + passed a column delimiter via the -z map flag. This can be + used to check if the server is an MX server for the recipient + of a message. This can be used to help prevent relaying. + Patch from Mitchell Blank Jr of Exec-PC. + Mark failures for the *file* mailer and return bounce messages to the + sender for those failures. + Prevent bogus syslog timestamps on errors in sendmail.cf by + preserving the TZ environment variable until TimeZoneSpec + has been determined. Problem noted by Ralf Hildebrandt of + Technical University of Braunschweig. Patch from Per Hedeland + of Ericsson. + Print test input in address test mode when input is not from the tty + when the -v flag is given (i.e. sendmail -bt -v) to make + output easier to decipher. Problem noted by Aidan Nichol + of Procter & Gamble. + The LDAP map -s flag was not properly parsed and the error message + given included the remainder of the arguments instead of + solely the argument in error. Problem noted by Aidan Nichol + of Procter & Gamble. + New DontBlameSendmail option. This option allows administrators to + bypass some of sendmail's file security checks at the expense + of system security. This should only be used if you are + absolutely sure you know the consequences. The available + DontBlameSendmail options are: + Safe + AssumeSafeChown + ClassFileInUnsafeDirPath + ErrorHeaderInUnsafeDirPath + GroupWritableDirPathSafe + GroupWritableForwardFileSafe + GroupWritableIncludeFileSafe + GroupWritableAliasFile + HelpFileinUnsafeDirPath + WorldWritableAliasFile + ForwardFileInGroupWritableDirPath + IncludeFileInGroupWritableDirPath + ForwardFileInUnsafeDirPath + IncludeFileInUnsafeDirPath + ForwardFileInUnsafeDirPathSafe + IncludeFileInUnsafeDirPathSafe + MapInUnsafeDirPath + LinkedAliasFileInWritableDir + LinkedClassFileInWritableDir + LinkedForwardFileInWritableDir + LinkedIncludeFileInWritableDir + LinkedMapInWritableDir + LinkedServiceSwitchFileInWritableDir + FileDeliveryToHardLink + FileDeliveryToSymLink + WriteMapToHardLink + WriteMapToSymLink + WriteStatsToHardLink + WriteStatsToSymLink + RunProgramInUnsafeDirPath + RunWritableProgram + New DontProbeInterfaces option to turn off the inclusion of all the + interface names in $=w on startup. In particular, if you + have lots of virtual interfaces, this option will speed up + startup. However, unless you make other arrangements, mail + sent to those addresses will be bounced. + Automatically create alias databases if they don't exist and + AutoRebuildAliases is set. + Add PrivacyOptions=noetrn flag to disable the SMTP ETRN command. + Suggested by Christophe Wolfhugel of the Institut Pasteur. + Add PrivacyOptions=noverb flag to disable the SMTP VERB command. + When determining the client host name ($&{client_name} macro), do + a forward (A) DNS lookup on the result of the PTR lookup + and compare results. If they differ or if the PTR lookup + fails, &{client_name} will contain the IP address + surrounded by square brackets (e.g. [127.0.0.1]). + New map flag: -Tx appends "x" to lookups that return temporary failure + (i.e, it is like -ax for the temporary failure case, in + contrast to the success case). + New syntax to do limited checking of header syntax. A config line + of the form: + HHeader: $>Ruleset + causes the indicated Ruleset to be invoked on the Header + when read. This ruleset works like the check_* rulesets -- + that is, it can reject mail on the basis of the contents. + Limit the size of the HELO/EHLO parameter to prevent spammers + from hiding their connection information in Received: + headers. + When SingleThreadDelivery is active, deliveries to locked hosts + are skipped. This will cause the delivering process to + try the next MX host or queue the message if no other MX + hosts are available. Suggested by Alexander Litvin. + The [FILE] mailer type now delivers to the file specified in the + A= equate of the mailer definition instead of $u. It also + obeys all of the F= mailer flags such as the MIME + 7/8 bit conversion flags. This is useful for defining + a mailer which delivers to the same file regardless of the + recipient (e.g. 'A=FILE /dev/null' to discard unwanted mail). + Do not assume the identity of a remote connection is root@localhost + if the remote connection closes the socket before the + remote identity can be queried. + Change semantics of the F=S mailer flag back to 8.7.5 behavior. + Some mailers, including procmail, require that the real + uid is left unchanged by sendmail. Problem noted by Per + Hedeland of Ericsson. + No longer is the src/obj*/Makefile selected from a large list -- it + is now generated using the information in BuildTools/OS/ -- + some of the details are determined dynamically via + BuildTools/bin/configure.sh. + The other programs in the sendmail distribution -- mail.local, + mailstats, makemap, praliases, rmail, and smrsh -- now use + the new Build method which creates an operating system + specific Makefile using the information in BuildTools. + Make 4xx reply codes to the SMTP MAIL command be non-sticky (i.e., + a failure on one message won't affect future messages to the + same host). This is necessary if the remote host sends + a 451 error if the domain of the sender does not resolve + as is common in anti-spam configurations. Problem noted + by Mitchell Blank Jr of Exec-PC. + New "discard" mailer for check_* rulesets and header checking + rulesets. If one of the above rulesets resolves to the + $#discard mailer, the commands will be accepted but the + message will be completely discarded after it is accepting. + This means that even if only one of the recipients + resolves to the $#discard mailer, none of the recipients + will receive the mail. Suggested by Brian Kantor. + All but the last cloned envelope of a split envelope were queued + instead of being delivered. Problem noted by John Caruso + of CNET: The Computer Network. + Fix deadlock situation in persistent host status file locking. + Syslog an error if a user forward file could not be read due to + an error. Patch from John Beck of Sun Microsystems. + Use the first name returned on machine lookups when canonifying a + hostname via NetInfo. Patch from Timm Wetzel of GWDG. + Clear the $&{client_addr}, $&{client_name}, and $&{client_port} + macros when delivering a bounce message to prevent + rejection by a check_compat ruleset which uses these macros. + Problem noted by Jens Hamisch of AgiX Internetservices GmbH. + If the check_relay ruleset resolves to the the error mailer, the + error in the $: portion of the resolved triplet is used + in the rejection message given to the remote machine. + Suggested by Scott Gifford of The Internet Ramp. + Set the $&{client_addr}, $&{client_name}, and $&{client_port} macros + before calling the check_relay ruleset. Suggested by Scott + Gifford of The Internet Ramp. + Sendmail would get a segmentation fault if a mailer exited with an + exit code of 79. Problem noted by Aaron Schrab of ExecPC + Internet. Fix from Christophe Wolfhugel of the Pasteur + Institute. + Separate snprintf/vsnprintf routines into separate file for use by + mail.local. + Allow multiple map lookups on right hand side, e.g., + R$* $( host $1 $) $| $( passwd $1 $). Patch from + Christophe Wolfhugel of the Pasteur Institute. + Properly generate success DSN messages if requested for aliases + which have owner- aliases. Problem noted by Kari Hurtta + of the Finnish Meteorological Institute. + Properly display delayed-expansion macros ($&{macroname}) in + address test mode (-bt). Problem noted by Bryan Costales + of InfoBeat, Inc. + -qR could sometimes match names incorrectly. Problem noted by + Lutz Euler of Lavielle EDV Systemberatung GmbH & Co. + Include a magic number and version in the StatusFile for the + mailstats command. + Record the number of rejected and discarded messages in the + StatusFile for display by the mailstats command. Patch + from Randall Winchester of the University of Maryland. + IDENT returns where the OSTYPE field equals "OTHER" now list the + user portion as IDENT:username@site instead of + username@site to differentiate the two. Suggested by + Kari Hurtta of the Finnish Meteorological Institute. + Enforce timeout for LDAP queries. Patch from Per Hedeland of + Ericsson. + Change persistent host status filename substitution so '/' is + replaced by ':' instead of '|' to avoid clashes. Also + avoid clashes with hostnames with leading dots. Fix from + Mitchell Blank Jr. of Exec-PC. + If the system lock table is full, only attempt to create a new + queue entry five times before giving up. Previously, it + was attempted indefinitely which could cause the partition + to run out of inodes. Problem noted by Suzie Weigand of + Stratus Computer, Inc. + In verbose mode, warn if the sendmail.cf version is less than the + currently supported version. + Sorting for QueueSortOrder=host is now case insensitive. Patch + from Randall S. Winchester of the University of Maryland. + Properly quote a full name passed via the -F command line option, + the Full-Name: header, or the NAME environment variable if + it contains characters which must be quoted. Problem noted + by Kari Hurtta of the Finnish Meteorological Institute. + Avoid possible race condition that unlocked a mail job before + releasing the transcript file on systems that use flock(2). + In some cases, this might result in a "Transcript Unavailable" + message in error bounces. + Accept SMTP replies which contain only a reply code and no + accompanying text. Problem noted by Fernando Fraticelli of + Digital Equipment Corporation. + Portability: + AIX 4.1 uses int for SOCKADDR_LEN_T from Motonori Nakamura + of Kyoto University. + AIX 4.2 requires <userpw.h> before <usersec.h>. Patch from + Randall S. Winchester of the University of + Maryland. + AIX 4.3 from Valdis Kletnieks of Virginia Tech CNS. + CRAY T3E from Manu Mahonen of Center for Scientific Computing + in Finland. + Digital UNIX now uses statvfs for determining free + disk space. Patch from Randall S. Winchester of + the University of Maryland. + HP-UX 11.x from Richard Allen of Opin Kerfi HF and + Regis McEwen of Progress Software Corporation. + IRIX 64 bit fixes from Kari Hurtta of the Finnish + Meteorological Institute. + IRIX 6.2 configuration fix for mail.local from Michael Kyle + of CIC/Advanced Computing Laboratory. + IRIX 6.5 from Thomas H Jones II of SGI. + IRIX 6.X load average code from Bob Mende of SGI. + QNX from Glen McCready <glen@qnx.com>. + SCO 4.2 and 5.x use /usr/bin instead of /usr/ucb for links + to sendmail. Install with group bin instead of kmem + as kmem does not exist. From Guillermo Freige of + Gobernacion de la Pcia de Buenos Aires and Paul + Fischer of BTG, Inc. + SunOS 4.X does not include memmove(). Patch from + Per Hedeland of Ericsson. + SunOS 5.7 includes getloadavg() function for determining + load average. Patch from John Beck of Sun + Microsystems. + CONFIG: Increment version number of config file. + CONFIG: add DATABASE_MAP_TYPE to set the default type of database + map for the various maps. The default is hash. Patch from + Robert Harker of Harker Systems. + CONFIG: new confEBINDIR m4 variable for defining the executable + directory for certain programs. + CONFIG: new FEATURE(local_lmtp) to use the new LMTP support for + local mail delivery. By the default, /usr/libexec/mail.local + is used. This is expected to be the mail.local shipped + with 8.9 which is LMTP capable. The path is based on the + new confEBINDIR m4 variable. + CONFIG: Use confEBINDIR in determining path to smrsh for + FEATURE(smrsh). Note that this changes the default from + /usr/local/etc/smrsh to /usr/libexec/smrsh. To obtain the + old path for smrsh, use FEATURE(smrsh, /usr/local/etc/smrsh). + CONFIG: DOMAIN(generic) changes the default confFORWARD_PATH to + include $z/.forward.$w+$h and $z/.forward+$h which allow + the user to setup different .forward files for + user+detail addressing. + CONFIG: add confMAX_RCPTS_PER_MESSAGE, confDONT_PROBE_INTERFACES, + and confDONT_BLAME_SENDMAIL to set MaxRecipientsPerMessage, + DontProbeInterfaces, and DontBlameSendmail options. + CONFIG: by default do not allow relaying (that is, accepting mail + from outside your domain and sending it to another host + outside your domain). + CONFIG: new FEATURE(promiscuous_relay) to allow mail relaying from + any site to any site. + CONFIG: new FEATURE(relay_entire_domain) allows any host in your + domain as defined by the 'm' class ($=m) to relay. + CONFIG: new FEATURE(relay_based_on_MX) to allow relaying based on + the MX records of the host portion of an incoming recipient. + CONFIG: new FEATURE(access_db) which turns on the access database + feature. This database give you the ability to allow + or refuse to accept mail from specified domains for + administrative reasons. By default, names that are listed + as "OK" in the access db are domain names, not host names. + CONFIG: new confCR_FILE m4 variable for defining the name of the file + used for class 'R'. Defaults to /etc/mail/relay-domains. + CONFIG: new command RELAY_DOMAIN(domain) and RELAY_DOMAIN_FILE(file) + to add items to class 'R' ($=R) for hosts allowed to relay. + CONFIG: new FEATURE(relay_hosts_only) to change the behavior + of FEATURE(access_db) and class 'R' to lookup individual + host names only. + CONFIG: new FEATURE(loose_relay_check). Normally, if a recipient + using % addressing is used, e.g. user%site@othersite, + and othersite is in class 'R', the check_rcpt ruleset + will strip @othersite and recheck user@site for relaying. + This feature changes that behavior. It should not be + needed for most installations. + CONFIG: new FEATURE(relay_local_from) to allow relaying if the + domain portion of the mail sender is a local host. This + should only be used if absolutely necessary as it opens + a window for spammers. Patch from Randall S. Winchester of + the University of Maryland. + CONFIG: new FEATURE(blacklist_recipients) turns on the ability to + block incoming mail destined for certain recipient + usernames, hostnames, or addresses. + CONFIG: By default, MAIL FROM: commands in the SMTP session will be + refused if the host part of the argument to MAIL FROM: cannot + be located in the host name service (e.g., DNS). + CONFIG: new FEATURE(accept_unresolvable_domains) accepts + unresolvable hostnames in MAIL FROM: SMTP commands. + CONFIG: new FEATURE(accept_unqualified_senders) accepts + MAIL FROM: senders which do not include a domain. + CONFIG: new FEATURE(rbl) Turns on rejection of hosts found in the + Realtime Blackhole List. You can specify the RBL name + server to contact by specifying it as an optional argument. + The default is rbl.maps.vix.com. For details, see + http://maps.vix.com/rbl/. + CONFIG: Call Local_check_relay, Local_check_mail, and + Local_check_rcpt from check_relay, check_mail, and + check_rcpt. Users with local rulesets should place the + rules using LOCAL_RULESETS. If a Local_check_* ruleset + returns $#OK, the message is accepted. If the ruleset + returns a mailer, the appropriate action is taken, else + the return of the ruleset is ignored. + CONFIG: CYRUS_MAILER_FLAGS now includes the /:| mailer flags by + default to support file, :include:, and program deliveries. + CONFIG: Remove the default for confDEF_USER_ID so the binary can + pick the proper default value. See the SECURITY note + above for more information. + CONFIG: FEATURE(nodns) now warns the user that the feature is a + no-op. Patch from Kari Hurtta of the Finnish + Meteorological Institute. + CONFIG: OSTYPE(osf1) now sets DefaultUserID (confDEF_USER_ID) to + daemon since DEC's /bin/mail will drop the envelope + sender if run as mailnull. See the Digital UNIX section + of src/README for more information. Problem noted by + Kari Hurtta of the Finnish Meteorological Institute. + CONFIG: .cf files are now stored in the same directory with the + .mc files instead of in the obj directory. + CONFIG: New options confSINGLE_LINE_FROM_HEADER, + confALLOW_BOGUS_HELO, and confMUST_QUOTE_CHARS for + setting SingleLineFromHeader, AllowBogusHELO, and + MustQuoteChars respectively. + MAIL.LOCAL: support -l flag to run LMTP on stdin/stdout. This + SMTP-like protocol allows detailed reporting of delivery + status on a per-user basis. Code donated by John Myers of + CMU (now of Netscape). + MAIL.LOCAL: HP-UX support from Randall S. Winchester of the + University of Maryland. NOTE: mail.local is not + compatible with the stock HP-UX mail format. Be sure to + read mail.local/README. + MAIL.LOCAL: Prevent other mail delivery agents from stealing a + mailbox lock. Patch from Randall S. Winchester of the + University of Maryland. + MAIL.LOCAL: glibc portability from John Kennedy of Cal State + University, Chico. + MAIL.LOCAL: IRIX portability from Kari Hurtta of the Finnish + Meteorological Institute. + MAILSTATS: Display the number of rejected and discarded messages + in the StatusFile. Patch from Randall Winchester of the + University of Maryland. + MAKEMAP: New -s flag to ignore safety checks on database map files + such as linked files in world writable directories. + MAKEMAP: Add support for Berkeley DB 2.X. Remove OLD_NEWDB support. + PRALIASES: Add support for Berkeley DB 2.X. + PRALIASES: Do not automatically include NDBM support. Problem + noted by Ralf Hildebrandt of the Technical University of + Braunschweig. + RMAIL: Improve portability for other platforms. Patches from + Randall S. Winchester of the University of Maryland and + Kari Hurtta of the Finnish Meteorological Institute. + Changed Files: + src/Makefiles/Makefile.* files have been modified to use + the new build mechanism and are now BuildTools/OS/*. + src/makesendmail changed to symbolic link to src/Build. + New Files: + BuildTools/M4/header.m4 + BuildTools/M4/depend/BSD.m4 + BuildTools/M4/depend/CC-M.m4 + BuildTools/M4/depend/NCR.m4 + BuildTools/M4/depend/Solaris.m4 + BuildTools/M4/depend/X11.m4 + BuildTools/M4/depend/generic.m4 + BuildTools/OS/AIX.4.2 + BuildTools/OS/AIX.4.x + BuildTools/OS/CRAYT3E.2.0.x + BuildTools/OS/HP-UX.11.x + BuildTools/OS/IRIX.6.5 + BuildTools/OS/NEXTSTEP.4.x + BuildTools/OS/NeXT.4.x + BuildTools/OS/NetBSD.8.3 + BuildTools/OS/QNX + BuildTools/OS/SunOS.5.7 + BuildTools/OS/dcosx.1.x.NILE + BuildTools/README + BuildTools/Site/README + BuildTools/bin/Build + BuildTools/bin/configure.sh + BuildTools/bin/find_m4.sh + BuildTools/bin/install.sh + Makefile + cf/cf/Build + cf/cf/generic-hpux10.cf + cf/feature/accept_unqualified_senders.m4 + cf/feature/accept_unresolvable_domains.m4 + cf/feature/access_db.m4 + cf/feature/blacklist_recipients.m4 + cf/feature/loose_relay_check.m4 + cf/feature/local_lmtp.m4 + cf/feature/promiscuous_relay.m4 + cf/feature/rbl.m4 + cf/feature/relay_based_on_MX.m4 + cf/feature/relay_entire_domain.m4 + cf/feature/relay_hosts_only.m4 + cf/feature/relay_local_from.m4 + cf/ostype/qnx.m4 + contrib/doublebounce.pl + mail.local/Build + mail.local/Makefile.m4 + mail.local/README + mailstats/Build + mailstats/Makefile.m4 + makemap/Build + makemap/Makefile.m4 + praliases/Build + praliases/Makefile.m4 + rmail/Build + rmail/Makefile.m4 + rmail/rmail.0 + smrsh/Build + smrsh/Makefile.m4 + src/Build + src/Makefile.m4 + src/snprintf.c + Deleted Files: + cf/cf/Makefile (replaced by Makefile.dist) + mail.local/Makefile + mail.local/Makefile.dist + mailstats/Makefile + mailstats/Makefile.dist + makemap/Makefile + makemap/Makefile.dist + praliases/Makefile + praliases/Makefile.dist + rmail/Makefile + smrsh/Makefile + smrsh/Makefile.dist + src/Makefile + src/Makefiles/Makefile.AIX.4 (split into AIX.4.x and AIX.4.2) + src/Makefiles/Makefile.SMP_DC.OSx.NILE + (renamed BuildTools/OS/dcosx.1.x.NILE) + src/Makefiles/Makefile.Utah (obsolete platform) + Renamed Files: + READ_ME => README + cf/cf/Makefile.dist => Makefile + cf/cf/obj/* => cf/cf/* + src/READ_ME => src/README + 8.8.8/8.8.8 97/10/24 If the check_relay ruleset failed, the relay= field was logged incorrectly. Problem noted by Kari Hurtta of the Finnish @@ -903,7 +1508,7 @@ summary of the changes in that release. If the F=l flag was set on an SMTP mailer to indicate that it is actually local delivery, and NOTIFY=SUCCESS is specified in the envelope, and the receiving SMTP server speaks DSN, then - the DSN would be both generated locally and propogated to the + the DSN would be both generated locally and propagated to the other end. The U= mailer field didn't correctly extract the group id if the user id was numeric. Problem noted by Kenneth Herron of @@ -913,7 +1518,7 @@ summary of the changes in that release. not occur if it exceeded the maximum _output_ size. Problem reported by Kyle Jones of UUNET. PORTABILITY FIXES: - AIX4: 4.1 does't have a working setreuid(2); change the + AIX4: 4.1 doesn't have a working setreuid(2); change the AIX4 defines to use seteuid(2) instead, which works on 4.1 as well as 4.2. Problem noted by Håkan Lindholm of interAF, Sweden. @@ -963,7 +1568,7 @@ summary of the changes in that release. Solaris: Don't use the system getusershell(3); it can apparently corrupt the heap in some circumstances. Problem found by Ken Pizzini of Spry, Inc. - OP.ME: document several mailer flags that were accidently omitted + OP.ME: document several mailer flags that were accidentally omitted from this document. These flags were F=d, F=j, F=R, and F=9. CONFIG: no changes. @@ -1060,7 +1665,7 @@ summary of the changes in that release. Log open file descriptors for the "cannot dup" messages in deliver(); this is an attempt to track down a bug that one person seems to be having (it may be a Solaris bug!). - DSN NOTIFY parameters were not properly propogated across queue runs; + DSN NOTIFY parameters were not properly propagated across queue runs; this caused the NOTIFY info to sometimes be lost. Problem pointed out by Claus Assmann of the Christian-Albrechts-University of Kiel. @@ -1201,7 +1806,7 @@ summary of the changes in that release. This could cause mail to addresses such as [foo.com] to bounce or get dropped. Problem noted by Christophe Wolfhugel of the Pasteur Institute. - DSNs were inconsistent if a failure occured during the DATA phase + DSNs were inconsistent if a failure occurred during the DATA phase rather than the RCPT phase: the Action: would be correct, but the detailed status information would be wrong. Problem noted by Bob Snyder of General Electric Company. @@ -1441,7 +2046,7 @@ summary of the changes in that release. be set to be lower than Timeout.connect on the principle that the mail should go through quickly to responsive hosts; less responsive hosts get to wait for the next queue run. - Fix a problem on Solaris that occassionally causes programs + Fix a problem on Solaris that occasionally causes programs (such as vacation) to hang with their standard input connected to a UDP port. It also created some signal handling problems. The problems turned out to be an interaction between vfork(2) @@ -1713,12 +2318,12 @@ summary of the changes in that release. Completely delete the Bcc: header if and only if there are other valid recipient headers (To:, Cc: or Apparently-To:, the last being a historic botch, of course). If Bcc: is the - only recipient header in the message, it's value is tossed, + only recipient header in the message, its value is tossed, but the header name is kept. The old behaviour (always keep the header name and toss the value) allowed primary recipients to see that a Bcc: went to _someone_. Include queue id on ``Authentication-Warning: <host>: <user> set - sender to <addresss> using -f'' syslog messages. Suggested + sender to <address> using -f'' syslog messages. Suggested by Kari Hurtta. If a sequence or switch map lookup entry gets a tempfail but then continues on to another map type, but the name is not found, @@ -1752,7 +2357,7 @@ summary of the changes in that release. is not set, since this is required to get the actual DSNs created. Problem pointed out by John Gardiner Myers of CMU. Log permission problems that cause .forward and :include: files to - be untrusted or ignored on log level 12 and higher. Suggestted + be untrusted or ignored on log level 12 and higher. Suggested by Randy Martin of Clemson University. Allow user ids in U= clauses of M lines to have hyphens and underscores. @@ -1779,7 +2384,7 @@ summary of the changes in that release. Technological University. When converting a message to Quoted-Printable, prevent any lines with dots alone on a line by themselves. This is because of the - preponderence of broken mailers that still get this wrong. + preponderance of broken mailers that still get this wrong. Code contributed by Per Hedeland of Ericsson. Fix F{macro}/file construct -- it previously did nothing. Pointed out by Bjart Kvarme of USIT/UiO (Norway). @@ -1813,7 +2418,7 @@ summary of the changes in that release. Extensive cleanups to map open code to handle a locking race condition in ndbm, hash, and btree format database files on some (most non-4.4-BSD based) OS architectures. This should solve the - occassional "user unknown" problem during alias rebuilds that + occasional "user unknown" problem during alias rebuilds that has plagued me for quite some time. Based on a patch from Thomas Dwyer III of Michigan Technological University. PORTABILITY FIXES: @@ -1957,7 +2562,7 @@ summary of the changes in that release. If you have a name with a trailing dot, and you try looking it up using gethostbyname without the dot (for /etc/hosts compatibility), be sure to turn off RES_DEFNAMES and - RES_DNSRCH to avoid finding the wrong name accidently. + RES_DNSRCH to avoid finding the wrong name accidentally. Problem noted by Charles Amos of the University of Maryland. Don't do timeouts in collect if you are not running SMTP. @@ -2224,7 +2829,7 @@ summary of the changes in that release. contributed by Roy Mongiovi of Georgia Tech (my main contribution was to make it configurable). Save i-number of df file in qf file to simplify rebuilding of queue - after disasterous disk crash. Suggested by Kyle Jones of + after disastrous disk crash. Suggested by Kyle Jones of UUNET; closely based on code from KJS DECWRL code written by Paul Vixie. NOTA BENE: The qf files produced by 8.7 are NOT back compatible with 8.6 -- that is, you can convert @@ -2658,8 +3263,8 @@ summary of the changes in that release. Probe the network interfaces to find alternate names for this host. Requires the SIOCGIFCONF ioctl call. Code contributed by SunSoft. - Add "E" configuration line to set or propogate environment - variables into children. "E<envar>" will propogate + Add "E" configuration line to set or propagate environment + variables into children. "E<envar>" will propagate the named variable from the environment when sendmail was invoked into any children it calls; "E<envar>=<value>" sets the named variable to the indicated value. Any @@ -2837,12 +3442,12 @@ summary of the changes in that release. Rochester Medical Center. Altos System V (``the first UNIX/XENIX merge the Altos did for their Series 1000 & Series 2000 line; - their merged code was licenced back to AT&T and + their merged code was licensed back to AT&T and Microsoft and became System V release 3.2'') from Tim Rice <timr@crl.com>. OSF/1 running on Intel Paragon from Jeff A. Earickson <jeff@ssd.intel.com> of Intel Scalable Systems - Divison. + Division. Amdahl UTS System V 2.1.5 (SVr3-based) from Janet Jackson <janet@dialix.oz.au>. System V Release 4 (statvfs semantic fix) from Alain @@ -2995,7 +3600,7 @@ summary of the changes in that release. properly deal with ``group: addr1, ... addrN;'' syntax. CONFIG: Require OSTYPE macro (the defaults really don't apply to any real systems any more) and tweak the DOMAIN macro - so that it is less likely that users will accidently use + so that it is less likely that users will accidentally use the Berkeley defaults. Also, create some generic files that really can be used in the real world. CONFIG: Add new configuration macros to set character sets for @@ -3210,7 +3815,7 @@ summary of the changes in that release. because it was passed as a printf-style format string. In some cases this could cause core dumps. Avoid possible buffer overrun in returntosender() if error - message is quite ling. From Fletcher Mattox of the + message is quite long. From Fletcher Mattox of the University of Texas. Fix a problem that would silently drop "too many hops" error messages if and only if you were sending to an alias. @@ -3585,7 +4190,7 @@ summary of the changes in that release. DOC: Clarify $@ and $: in the Install & Op Guide. From Kimmo Suominen. Portability fixes: - Unicos from David L. Kensiski of Sterling Sofware. + Unicos from David L. Kensiski of Sterling Software. DomainOS from Don Lewis of Silicon Systems. GNU m4 1.0.3 from Karst Koymans of Utrecht University. Convex from Kimmo Suominen <kim@tac.nyc.ny.us>. @@ -3636,8 +4241,8 @@ summary of the changes in that release. the assumption that the alias file is well controlled. Security fix: root was not treated suspiciously enough when looking into subdirectories. This would potentially - allow a cracker to examine files that were publically - readable but in a non-publically searchable directory. + allow a cracker to examine files that were publicly + readable but in a non-publicly searchable directory. Fix a problem that causes an error on QUIT on a cached connection to create problems on the current job. These are typically unrelated, so errors occur in @@ -3992,7 +4597,7 @@ summary of the changes in that release. Portability fixes for A/UX and Encore UMAX V. Fix error message handling -- if you had a name server down causing an error during parsing, that message was never - propogated to the queue file. + propagated to the queue file. 8.6/8.6 93/10/05 Configuration cleanup: make it easier to undo IDENTPROTO in @@ -4485,13 +5090,13 @@ summary of the changes in that release. If the name server timed out over several days, no "timed out" message would ever be sent back. The timeout code has been moved from markfailure() to dropenvelope() - so that all such failures should be diagnosted. Pointed + so that all such failures should be diagnosed. Pointed out by Christophe Wolfhugel and others. Relax safefile() constraints: directories in an include or forward path must be readable by self if the controlling user owns the entry, readable by all otherwise (e.g., when reading your .forward file, you have to own and - have X permssion in it; everyone needs X permission in + have X permission in it; everyone needs X permission in the root and directories leading up to your home); include files must be readable by anyone, but need not be owned by you. @@ -4525,7 +5130,7 @@ summary of the changes in that release. log. For example, if you lost a connection, don't bother reporting that fact on the connection you lost. Add some "extended debugging" flags to try to track down - why we get occassional problems with file descriptor + why we get occasional problems with file descriptor one being closed when execing a mailer; it seems to only happen when there has been another error in the same transaction. This requires XDEBUG, defined @@ -4644,7 +5249,7 @@ summary of the changes in that release. the first database listed. Rearrange doc subdirectory for 4.4BSD release tape. CONFIG: put $r into the Received line. This was an oversight. - CONFIG: fix typo (call to ruleset 99 should have been rulset 90). + CONFIG: fix typo (call to ruleset 99 should have been ruleset 90). CONFIG: move "auxiliary" subroutines to be in ruleset 90-99 range -- in the long run, single digit rulesets may become reserved for builtin use by sendmail. @@ -5053,7 +5658,7 @@ summary of the changes in that release. Eric Wassenaar. Always respond "quickly" to RCPT command; do alias expansion and the like later. This also means that mail for lists that - have errors will be acccepted, and an error sent back + have errors will be accepted, and an error sent back later. This is done by instantiating the queue file and then immediately running and requeueing it. diff --git a/usr.sbin/sendmail/cf/README b/contrib/sendmail/cf/README index 184a3532559e..df50c9da1d03 100644 --- a/usr.sbin/sendmail/cf/README +++ b/contrib/sendmail/cf/README @@ -2,9 +2,9 @@ NEW SENDMAIL CONFIGURATION FILES - Eric Allman <eric@CS.Berkeley.EDU> + Eric Allman <eric@Sendmail.ORG> - @(#)README 8.124 (Berkeley) 9/23/97 + @(#)README 8.174 (Berkeley) 6/30/98 This document describes the sendmail configuration files being used @@ -33,7 +33,7 @@ a newer version. You can m4-expand on their system, then run locally. SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 or later also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is -available from ftp://prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz (check for +available from ftp://ftp.gnu.org/pub/gnu/m4-1.4.tar.gz (check for the latest version). EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken (3.x is fine). Use GNU m4 on this platform. @@ -46,7 +46,7 @@ To get started, you may want to look at tcpproto.mc (for TCP-only sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for clusters of clients using a single mail host). Others are versions that we use at Berkeley, although not all are in current use. For -example, ucbarpa has gone away, but I've left ucbarpa.mc in because +example, ucbvax has gone away, but I've left ucbvax.mc in because it demonstrates some interesting techniques. I'm not pretending that this README describes everything that these @@ -57,7 +57,8 @@ to great effect. But it should get you started. *** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** *** Berkeley-specific assumptions built in, such as the name *** *** of our UUCP-relay. You'll want to create your own domain *** -*** description, and use that in place of domain/Berkeley.m4. *** +*** description, and use that in place of *** +*** domain/Berkeley.EDU.m4. *** ******************************************************************* @@ -85,38 +86,14 @@ Let's examine a typical .mc file: divert(-1) # - # Copyright (c) 1983 Eric P. Allman + # Copyright (c) 1998 Sendmail, Inc. All rights reserved. + # Copyright (c) 1983 Eric P. Allman. All rights reserved. # 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. + # By using this file, you agree to the terms and conditions set + # forth in the LICENSE file which can be found at the top level of + # the sendmail distribution. # # @@ -182,7 +159,7 @@ rules are that the order should be: Sendmail uses the M4 macro processor to ``compile'' the configuration files. The most important thing to know is that M4 is stream-based, that is, it doesn't understand about lines. For this reason, in some -places you may see the word ``dnl'', which standards for ``delete +places you may see the word ``dnl'', which stands for ``delete through newline''; essentially, it deletes all characters starting at the ``dnl'' up to and including the next newline character. In most cases sendmail uses this only to avoid lots of unnecessary @@ -207,6 +184,16 @@ expanded. This also applies to because ``define'' is an M4 keyword. If you want to use them, surround them with directed quotes, `like this'. ++----------------+ +| FILE LOCATIONS | ++----------------+ + +sendmail 8.9 has introduced a new configuration directory for sendmail +related files, /etc/mail. The new files available for sendmail 8.9 -- +the class 'R' /etc/mail/relay-domains and the access database +/etc/mail/access -- take advantage of this new directory. 8.9 will +serve as a transition release. Beginning with 8.10, all of the files +will use this directory by default. +--------+ | OSTYPE | @@ -243,7 +230,7 @@ QUEUE_DIR [/var/spool/mqueue] The directory containing STATUS_FILE [/etc/sendmail.st] The file containing status information. LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. -LOCAL_MAILER_FLAGS [rmn] The flags used by the local mailer. The +LOCAL_MAILER_FLAGS [rmn9] The flags used by the local mailer. The flags lsDFM are always included. LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local mail. @@ -252,9 +239,9 @@ LOCAL_MAILER_MAX [undefined] If defined, the maximum size of local LOCAL_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data that ARRIVE from an address that resolves to the local mailer and which are converted to MIME will be - labelled with this character set. + labeled with this character set. LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. -LOCAL_SHELL_FLAGS [eu] The flags used by the shell mailer. The +LOCAL_SHELL_FLAGS [eu9] The flags used by the shell mailer. The flags lsDFM are always included. LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" mail. @@ -282,7 +269,7 @@ RELAY_MAILER_ARGS [IPC $h] The arguments passed to the relay mailer. SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data that ARRIVE from an address that resolves to one of the SMTP mailers and which are converted to MIME will - be labelled with this character set. + be labeled with this character set. UUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail. UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default flags are `DFMhuU' (and `m' for uucp-new mailer, @@ -294,7 +281,7 @@ UUCP_MAILER_MAX [100000] The maximum size message accepted for UUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data that ARRIVE from an address that resolves to one of the UUCP mailers and which are converted to MIME will - be labelled with this character set. + be labeled with this character set. FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to submit FAX messages. FAX_MAILER_ARGS [mailfax $u $h $f] The arguments passed to the FAX @@ -325,9 +312,9 @@ PH_MAILER_PATH [/usr/local/etc/phquery] The path to the phquery program. PH_MAILER_FLAGS [ehmu] Flags for the phquery mailer. PH_MAILER_ARGS [phquery -- $u] -- arguments to the phquery mailer. -CYRUS_MAILER_FLAGS [A5@] The flags used by the cyrus mailer. The - flags lsDFMnP are always included. -CYRUS_MAILER_PATH [/usr/cyrus/bin/deliver] The progam used to deliver +CYRUS_MAILER_FLAGS [A5@/:|] The flags used by the cyrus mailer. The + flags lsDFMnPq are always included. +CYRUS_MAILER_PATH [/usr/cyrus/bin/deliver] The program used to deliver cyrus mail. CYRUS_MAILER_ARGS [deliver -e -m $h -- $u] The arguments passed to deliver cyrus mail. @@ -339,6 +326,9 @@ CYRUS_BB_MAILER_FLAGS [undefined] The flags used by the cyrusbb mailer. The flags lsDFMnP are always included. CYRUS_BB_MAILER_ARGS [deliver -e -m $u] The arguments passed to deliver cyrusbb mail. +confEBINDIR [/usr/libexec] The directory for executables. + Currently used for FEATURE(local_lmtp) and + FEATURE(smrsh). @@ -509,13 +499,23 @@ optional parameter -- for example: FEATURE(mailertable, dbm /usr/lib/mailertable) +The default database map type for the table features can be set with + + define(`DATABASE_MAP_TYPE', `dbm') + +which would set it to use ndbm databases. The default is the Berkeley DB +hash database format. Note that you must still declare a database map type +if you specify an argument to a FEATURE. DATABASE_MAP_TYPE is only used +if no argument is given for the FEATURE. + Available features are: use_cw_file Read the file /etc/sendmail.cw file to get alternate names for this host. This might be used if you were on a host that MXed for a dynamic set of other hosts. If the set is static, just including the line - "Cw<name1> <name2> ..." is probably superior. + "Cw<name1> <name2> ..." (where the names are fully + qualified domain names) is probably superior. The actual filename can be overridden by redefining confCW_FILE. @@ -562,7 +562,16 @@ mailertable Include a "mailer table" which can be used to override mailer:domain where "mailer" is the internal mailer name, and "domain" is where to send the message. These maps are not - reflected into the message header. + reflected into the message header. As a special case, + the forms: + local:user + will forward to the indicated user using the local mailer, + local: + will forward to the original user in the e-mail address + using the local mailer, and + error:code message + will give an error message with the indicated code and + message. domaintable Include a "domain table" which can be used to provide domain name mapping. Use of this should really be @@ -637,30 +646,32 @@ masquerade_entire_domain NOTE: only domains within your jurisdiction and current hierarchy should be masqueraded using this. -genericstable This feature will cause certain addresses originating in the - local domain or a domain listed in $=G to be looked up in a - map and turned into another ("generic") form, which can change - both the domain name and the user name. This is similar to - the userdb functionality. The same types of addresses as for - masquerading are looked up, i.e. only header sender addresses - unless the allmasquerade and/or masquerade_envelope features - are given. The addresses must be in the list of names given +genericstable This feature will cause certain addresses originating locally + (i.e. that are unqualified) or a domain listed in $=G to be + looked up in a map and turned into another ("generic") form, + which can change both the domain name and the user name. This + is similar to the userdb functionality. The same types of + addresses as for masquerading are looked up, i.e. only header + sender addresses unless the allmasquerade and/or + masquerade_envelope features are given. Qualified addresses + must have the domain part in the list of names given by the by the macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). The argument of FEATURE(genericstable) may be the map - defintion; the default map definition is: + definition; the default map definition is: hash -o /etc/genericstable The key for this table is either the full address or the unqualified username (the former is tried first); the value is the new user address. If the new user address does - not include a domain, $j is used. Note that the address - being looked up must be fully qualified. For local mail, it - is necessary to use FEATURE(always_add_domain) for the - addresses to be qualified. + not include a domain, it will be qualified in the standard + manner, i.e. using $j or the masquerade name. Note that the + address being looked up must be fully qualified. For local + mail, it is necessary to use FEATURE(always_add_domain) for + the addresses to be qualified. virtusertable A domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine. For example, @@ -705,10 +716,18 @@ nullclient This is a special case -- it creates a stripped down The only other feature that should be used in conjunction with this one is "nocanonify" (this causes addresses to be sent unqualified via the SMTP connection; normally - they are qualifed with the masquerade name, which + they are qualified with the masquerade name, which defaults to the name of the hub machine). No mailers should be defined. No aliasing or forwarding is done. +local_lmtp Use an LMTP capable local mailer. The argument to this + feature is the pathname of an LMTP capable mailer. By + default, mail.local is used. This is expected to be the + mail.local which came with the 8.9 distribution which is + LMTP capable. The path to mail.local is set by the + confEBINDIR m4 variable -- making the default + LOCAL_MAILER_PATH /usr/libexec/mail.local. + local_procmail Use procmail as the local mailer. This mailer can make use of the "user+indicator@local.host" syntax; normally the +indicator is just tossed, but by default @@ -722,18 +741,101 @@ local_procmail Use procmail as the local mailer. This mailer can bestmx_is_local Accept mail as though locally addressed for any host that lists us as the best possible MX record. This generates additional DNS traffic, but should be OK for low to - medium traffic hosts. THIS FEATURE IS FUNDAMENTALLY - INCOMPATIBLE WITH WILDCARD MX RECORDS!!! If you have - a wildcard MX record that matches your domain, you - cannot use this feature. + medium traffic hosts. The argument may be a set of + domains, which will limit the feature to only apply to + these domains -- this will reduce unnecessary DNS + traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH + WILDCARD MX RECORDS!!! If you have a wildcard MX record + that matches your domain, you cannot use this feature. smrsh Use the SendMail Restricted SHell (smrsh) provided with the distribution instead of /bin/sh for mailing to programs. This improves the ability of the local system administrator to control what gets run via e-mail. If an argument is provided it is used as the - pathname to smrsh; otherwise, /usr/local/etc/smrsh is - assumed. + pathname to smrsh; otherwise, the path defined by + confEBINDIR is used for the smrsh binary -- by default, + /usr/libexec/smrsh is assumed. + +promiscuous_relay + By default, the sendmail configuration files do not permit + mail relaying (that is, accepting mail from outside your + domain and sending it to another host outside your domain). + This option sets your site to allow mail relaying from any + site to any site. In general, it is better to control the + relaying more carefully with the access db and the 'R' + class ($=R). Domains can be added to class 'R' by the + macros RELAY_DOMAIN or RELAY_DOMAIN_FILE (analogously to + MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). + +relay_entire_domain + By default, only hosts listed as RELAY in the access db + will be allowed to relay. This option also allows any + host in your domain as defined by the 'm' class ($=m). + +relay_hosts_only + By default, names that are listed as RELAY in the access + db and class 'R' ($=R) are domain names, not host names. + For example, if you specify ``foo.com'', then mail to or + from foo.com, abc.foo.com, or a.very.deep.domain.foo.com + will all be accepted for relaying. This feature changes + the behaviour to lookup individual host names only. + +relay_based_on_MX + Turns on the ability to allow relaying based on the MX + records of the host portion of an incoming recipient. See + description below for more information before using this + feature. + +relay_local_from + Allows relaying if the domain portion of the mail sender + is a local host. This should only be used if absolutely + necessary as it opens a window for spammers. + +accept_unqualified_senders + Normally, MAIL FROM: commands in the SMTP session will be + refused if the connection is a network connection and the + sender address does not include a domain name. If your + setup sends local mail unqualified (i.e. MAIL FROM: <joe>), + you will need to use this feature to accept unqualified + sender addresses. + +accept_unresolvable_domains + Normally, MAIL FROM: commands in the SMTP session will be + refused if the host part of the argument to MAIL FROM: cannot + be located in the host name service (e.g., DNS). If you are + inside a firewall that has only a limited view of the + Internet host name space, this could cause problems. In this + case you probably want to use this feature to accept all + domains on input, even if they are unresolvable. + +access_db Turns on the access database feature. The access db gives + you the ability to allow or refuse to accept mail from + specified domains for administrative reasons. By default, + the access database specification is + ``hash -o /etc/mail/access''. The format of the + database is described below. + +blacklist_recipients + Turns on the ability to block incoming mail for certain + recipient usernames, hostnames, or addresses. For + example, you can block incoming mail to user nobody, + host foo.mydomain.com, or guest@bar.mydomain.com. + These specifications are put in the access db as + described below. + +rbl Turns on rejection of hosts found in the Realtime Blackhole + List. If an argument is provided it is used as the + name sever to contact; otherwise, the main RBL server at + rbl.maps.vix.com is used. For details, see + http://maps.vix.com/rbl/. + +loose_relay_check + Normally, if a recipient using % addressing is used, e.g. + user%site@othersite, and othersite is in class 'R', the + check_rcpt ruleset will strip @othersite and recheck + user@site for relaying. This feature changes that + behavior. It should not be needed for most installations. +-------+ @@ -915,7 +1017,7 @@ For more complex configurations, you can define special rules. The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing the names. Any modifications made here are reflected in the header. -A common use is to convert old UUCP addreses to SMTP addresses using +A common use is to convert old UUCP addresses to SMTP addresses using the UUCPSMTP macro. For example: LOCAL_RULE_3 @@ -1058,7 +1160,7 @@ MAIL_HUB act identically, with MAIL_HUB taking precedence. If you want all outgoing mail to go to a central relay site, define SMART_HOST as well. Briefly: - LOCAL_RELAY applies to unqualifed names (e.g., "eric"). + LOCAL_RELAY applies to unqualified names (e.g., "eric"). MAIL_HUB applies to names qualified with the name of the local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). SMART_HOST applies to names qualified with other hosts. @@ -1076,6 +1178,211 @@ specified with a terminal dot: note the trailing dot ---^ ++---------------------------------+ +| ANTI-SPAM CONFIGURATION CONTROL | ++---------------------------------+ + +The primary anti-spam features available in sendmail are: + +* Relaying is denied by default. +* Better checking on sender information. +* Access database. +* Header checks. + +Relaying (transmission of messages from a site outside your domain to +another site outside your domain) is denied by default. Note that +this changed in sendmail 8.9; previous versions allowed relaying by +default. If you want to revert to the old behaviour, you will need +to use FEATURE(promiscuous_relay). You can allow certain domains to +relay through your server by adding their domain name or IP address to +class 'R' ($=R) using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the +access database (described below). + +If you use + + FEATURE(relay_entire_domain) + +then any host in any of your local domains (that is, the $=m class) +will be relayed. + +You can also allow relaying based on the MX records of the host +portion of an incoming recipient address by using + + FEATURE(relay_based_on_MX) + +For example, if your server receives a recipient of user@domain.com +and domain.com lists your server in its MX records, the mail will be +accepted. Note that this will stop spammers from using your host to +relay spam but it will not stop outsiders from using your server as a +relay for their site. Along the same lines, + + FEATURE(relay_local_from) + +will allow relaying if the sender specifies a return path (i.e. +MAIL FROM: <user@domain>) domain which is a local domain. This a +dangerous feature as it will allow spammers to spam using your mail +server by simply specifying a return address of user@your.domain.com. +It should not be used unless absolutely necessary. + +If source routing is used in the recipient address (i.e. +RCPT TO: <user%site.com@othersite.com>), sendmail will check +user@site.com for relaying if othersite.com is an allowed relay host +in either class 'R', class 'm' if FEATURE(relay_entire_domain) is used, +or the access database if FEATURE(access_db) is used. To prevent +the address from being stripped down, use: + + FEATURE(loose_relay_check) + +If you think you need to use this feature, you probably do not. This +should only be used for sites which have no control over the addresses +that they provide a gateway for. Use this FEATURE with caution as it +can allow spammers to relay through your server if not setup properly. + +As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has +an unresolvable domain (i.e., one that DNS, your local name service, +or special case rules in ruleset 3 cannot locate). If you want to +continue to accept such domains, e.g. because you are inside a +firewall that has only a limited view of the Internet host name space +(note that you will not be able to return mail to them unless you have +some "smart host" forwarder), use + + FEATURE(accept_unresolvable_domains) + +sendmail will also refuse mail if the MAIL FROM: parameter is not +fully qualified (i.e., contains a domain as well as a user). If you +want to continue to accept such senders, use + + FEATURE(accept_unqualified_senders) + +An ``access'' database can be created to accept or reject mail from +selected domains. For example, you may choose to reject all mail +originating from known spammers. To enable such a database, use + + FEATURE(access_db) + +The FEATURE macro can accept a second parameter giving the key file +definition for the database; for example + + FEATURE(access_db, hash -o /etc/mail/access) + +The table itself uses e-mail addresses, domain names, and network +numbers as keys. For example, + + spammer@aol.com REJECT + cyberspammer.com REJECT + 206.117.147 REJECT + +would refuse mail from spammer@aol.com, any user from cyberspammer.com +(or any host within the cyberspammer.com domain), and any host on the +206.117.147.* network. + +The value part of the map can contain: + + OK accept mail even if other rules in the + running ruleset would reject it. + RELAY Allow domain to relay through your SMTP + server. RELAY also serves an implicit + OK for the other checks. + REJECT reject the sender/recipient with a general + purpose message. + DISCARD discard the message completely using + the $#discard mailer + ### any text where ### is an RFC 821 compliant error code + and "any text" is a message to return for + the command. + +For example: + + cyberspammer.com 550 We don't accept mail from spammers + okay.cyberspammer.com OK + sendmail.org OK + 128.32 RELAY + +would accept mail from okay.cyberspammer.com, but would reject mail +from all other hosts at cyberspammer.com with the indicated message. +It would allow accept mail from any hosts in the sendmail.org domain, +and allow relaying for the 128.32.*.* network. Note, UUCP users may +need to add hostname.UUCP to the access database or class 'R' ($=R). +If you also use: + + FEATURE(relay_hosts_only) + +then the above example will allow relaying for sendmail.org, but not +hosts within the sendmail.org domain. Note that this will also require +hosts listed in class 'R' ($=R) to be fully qualified host names. + +You can also use the access database to block sender addresses based on +the username portion of the address. For example: + + FREE.STEALTH.MAILER@ 550 Spam not accepted + +Note that you must include the @ after the username to signify that +this database entry is for checking only the username portion of the +sender address. + +If you use: + + FEATURE(blacklist_recipients) + +then you can add entries to the map for local users, hosts in your +domains, or addresses in your domain which should not receive mail: + + badlocaluser 550 Mailbox disabled for this username + host.mydomain.com 550 That host does not accept mail + user@otherhost.mydomain.com 550 Mailbox disabled for this recipient + +This would prevent a recipient of badlocaluser@mydomain.com, any +user at host.mydomain.com, and the single address +user@otherhost.mydomain.com from receiving mail. + +There is also a ``Realtime Blackhole List'' run by the MAPS project +at http://maps.vix.com/. This is a database maintained in DNS of +spammers. To use this database, use + + FEATURE(rbl) + +This will cause sendmail to reject mail from any site in the +Realtime Blackhole List database. You can specify an alternative +RBL name server to contact by specifying an argument to the FEATURE. + +The features described above make use of the check_relay, check_mail, +and check_rcpt rulesets. If you wish to include your own checks, +you can put your checks in the rulesets Local_check_relay, +Local_check_mail, and Local_check_rcpt. For example if you wanted to +block senders with all numeric usernames (i.e. 2312343@bigisp.com), +you would use Local_check_mail and the new regex map: + + LOCAL_CONFIG + Kallnumbers regex -a@MATCH ^[0-9]+$ + + LOCAL_RULESETS + SLocal_check_mail + # check address against various regex checks + R$* $: $>Parse0 $>3 $1 + R$+ < @ bigisp.com. > $* $: $(allnumbers $1 $) + R@MATCH $#error $: 553 Header Error + +These rules are called with the original arguments of the corresponding +check_* ruleset. If the local ruleset returns $#OK, no further checking +is done by the features described above and the mail is accepted. If the +local ruleset resolves to a mailer (such as $#error or $#discard), the +appropriate action is taken. Otherwise, the results of the local +rewriting are ignored. + + +You can also reject mail on the basis of the contents of headers. +This is done by adding a ruleset call to the 'H' header definition command +in sendmail.cf. For example, this can be used to check the validity of +a Message-ID: header: + + LOCAL_RULESETS + HMessage-Id: $>CheckMessageId + + SCheckMessageId + R< $+ @ $+ > $@ OK + R$* $#error $: 553 Header Error + + +--------------------------------+ | ADDING NEW MAILERS OR RULESETS | +--------------------------------+ @@ -1089,7 +1396,7 @@ LOCAL_RULESETS respectively. For example: ... LOCAL_RULESETS - Scheck_relay + Smyruleset ... @@ -1133,6 +1440,10 @@ use: That is, send directly only to things you found in your DNS lookup; anything else goes through SMART_HOST. +You may need to turn off the anti-spam rules in order to accept +UUCP mail with FEATURE(promiscuous_relay) and +FEATURE(accept_unresolvable_domains). + +-----------+ | WHO AM I? | @@ -1257,7 +1568,7 @@ Plussed users LDAP For notes on use LDAP in sendmail, see - http://www-leland.stanford.edu/~bbense/Inst.html + http://www.stanford.edu/~bbense/Inst.html @@ -1348,6 +1659,10 @@ confCW_FILE Fw class [/etc/sendmail.cw] Name of file used confCT_FILE Ft class [/etc/sendmail.ct] Name of file used to get the local additions to the $=t (trusted users) class. +confCR_FILE FR class [/etc/mail/relay-domains] Name of + file used to get the local additions + to the $=R (hosts allowed to relay) + class. confTRUSTED_USERS Ct class [no default] Names of users to add to the list of trusted users. This list always includes root, uucp, and daemon. @@ -1399,7 +1714,7 @@ confERROR_MODE ErrorMode [print] Error message mode. confERROR_MESSAGE ErrorHeader [undefined] Error message header/file. confSAVE_FROM_LINES SafeFromLine Save extra leading From_ lines. confTEMP_FILE_MODE TempFileMode [0600] Temporary file mode. -confMATCH_GECOS MatchGECOS [True] Match GECOS field. +confMATCH_GECOS MatchGECOS [False] Match GECOS field. confMAX_HOP MaxHopCount [25] Maximum hop count. confIGNORE_DOTS* IgnoreDots [False; always False in -bs or -bd mode] Ignore dot as terminator for incoming @@ -1582,10 +1897,10 @@ confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the queue run interval low for better - resposiveness without trying all + responsiveness without trying all jobs in each run. confDEF_CHAR_SET DefaultCharSet [unknown-8bit] When converting - unlabelled 8 bit input to MIME, the + unlabeled 8 bit input to MIME, the character set to use by default. confSERVICE_SWITCH_FILE ServiceSwitchFile [/etc/service.switch] The file to use @@ -1649,6 +1964,14 @@ confDONT_EXPAND_CNAMES DontExpandCnames lookups as well. confFROM_LINE UnixFromLine [From $g $d] The From_ line used when sending to files or programs. +confSINGLE_LINE_FROM_HEADER SingleLineFromHeader + [False] From: lines that have + embedded newlines are unwrapped + onto one line. +confALLOW_BOGUS_HELO AllowBogusHELO [False] Allow HELO SMTP command that + does not include a host name. +confMUST_QUOTE_CHARS MustQuoteChars [.'] Characters to be quoted in a full + name phrase (@,;:\()[] are automatic). confOPERATORS OperatorChars [.:%@!^/[]+] Address operator characters. confSMTP_LOGIN_MSG SmtpGreetingMessage @@ -1690,6 +2013,32 @@ confRUN_AS_USER RunAsUser [undefined] If set, become this user files will be written as this user. Intended for use only on firewalls where users do not have accounts. +confMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage + [infinite] If set, allow no more than + the specified number of recipients in + an SMTP envelope. Further recipients + receive a 452 error code (i.e., they + are deferred for the next delivery + attempt). +confDONT_PROBE_INTERFACES DontProbeInterfaces + [False] If set, sendmail will _not_ + insert the names and addresses of any + local interfaces into the $=w class + (list of known "equivalent" addresses). + If you set this, you must also include + some support for these addresses (e.g., + in a mailertable entry) -- otherwise, + mail to addresses in this list will + bounce with a configuration error. +confDONT_BLAME_SENDMAIL DontBlameSendmail + [safe] Override sendmail's file + safety checks. This will definitely + compromise system security and should + not be used unless absolutely + necessary. +confREJECT_MSG - [550 Access denied] The message + given if the access database contains + REJECT in the value portion. See also the description of OSTYPE for some parameters that can be tweaked (generally pathnames to mailers). diff --git a/contrib/sendmail/cf/cf/Build b/contrib/sendmail/cf/cf/Build new file mode 100755 index 000000000000..3efaffdcdba8 --- /dev/null +++ b/contrib/sendmail/cf/cf/Build @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)Build 8.3 (Berkeley) 5/19/98 +# + +# +# A quick-and-dirty script to create cf files. +# + +SMROOT=${SMROOT-../..} +BUILDTOOLS=${BUILDTOOLS-$SMROOT/BuildTools} + +M4=`sh $BUILDTOOLS/bin/find_m4.sh` +ret=$? +if [ $ret -ne 0 ] +then + exit $ret +fi +echo "Using M4=$M4" + +eval exec ${MAKE-make} M4=$M4 $* diff --git a/usr.sbin/sendmail/cf/cf/Makefile b/contrib/sendmail/cf/cf/Makefile index 7450b2a70008..8b6fb4d64e96 100644 --- a/usr.sbin/sendmail/cf/cf/Makefile +++ b/contrib/sendmail/cf/cf/Makefile @@ -1,8 +1,9 @@ -# @(#)Makefile 8.19 (Berkeley) 1/14/97 - # -# This Makefile uses the new Berkeley "make" program. See Makefile.dist -# for a more vanilla version. +# Makefile for configuration files. +# +# @(#)Makefile 8.17 (Berkeley) 4/2/98 +# + # # Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; # this may be easier than tweaking the Makefile. You do need to @@ -11,7 +12,6 @@ # M4= m4 -#M4= /usr/src/usr.bin/m4/obj/m4 CFDIR= .. CHMOD= chmod ROMODE= 444 @@ -21,7 +21,7 @@ RM= rm -f .mc.cf: $(RM) $@ - (cd ${.CURDIR} && $(M4) ${CFDIR}/m4/cf.m4 ${@:R}.mc > obj/$@) + $(M4) ${CFDIR}/m4/cf.m4 $*.mc > $@ || ( $(RM) $@ && exit 1 ) $(CHMOD) $(ROMODE) $@ ALL= generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \ @@ -46,23 +46,43 @@ M4FILES=\ ${CFDIR}/domain/CS.Berkeley.EDU.m4 \ ${CFDIR}/domain/EECS.Berkeley.EDU.m4 \ ${CFDIR}/domain/S2K.Berkeley.EDU.m4 \ + ${CFDIR}/domain/berkeley-only.m4 \ + ${CFDIR}/domain/generic.m4 \ + ${CFDIR}/feature/accept_unqualified_senders.m4 \ + ${CFDIR}/feature/accept_unresolvable_domains.m4 \ + ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ + ${CFDIR}/feature/blacklist_recipients.m4 \ + ${CFDIR}/feature/loose_relay_check.m4 \ ${CFDIR}/feature/domaintable.m4 \ + ${CFDIR}/feature/genericstable.m4 \ + ${CFDIR}/feature/limited_masquerade.m4 \ + ${CFDIR}/feature/local_lmtp.m4 \ ${CFDIR}/feature/local_procmail.m4 \ ${CFDIR}/feature/mailertable.m4 \ + ${CFDIR}/feature/masquerade_entire_domain.m4 \ + ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/nocanonify.m4 \ ${CFDIR}/feature/nodns.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/promiscuous_relay.m4 \ + ${CFDIR}/feature/rbl.m4 \ ${CFDIR}/feature/redirect.m4 \ + ${CFDIR}/feature/relay_based_on_MX.m4 \ + ${CFDIR}/feature/relay_entire_domain.m4 \ + ${CFDIR}/feature/relay_hosts_only.m4 \ + ${CFDIR}/feature/relay_local_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ + ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ @@ -78,34 +98,46 @@ M4FILES=\ ${CFDIR}/mailer/smtp.m4 \ ${CFDIR}/mailer/usenet.m4 \ ${CFDIR}/mailer/uucp.m4 \ + ${CFDIR}/ostype/aix2.m4 \ ${CFDIR}/ostype/aix3.m4 \ + ${CFDIR}/ostype/altos.m4 \ ${CFDIR}/ostype/amdahl-uts.m4 \ ${CFDIR}/ostype/aux.m4 \ ${CFDIR}/ostype/bsd4.3.m4 \ ${CFDIR}/ostype/bsd4.4.m4 \ ${CFDIR}/ostype/bsdi1.0.m4 \ + ${CFDIR}/ostype/bsdi2.0.m4 \ ${CFDIR}/ostype/dgux.m4 \ ${CFDIR}/ostype/domainos.m4 \ ${CFDIR}/ostype/dynix3.2.m4 \ + ${CFDIR}/ostype/gnuhurd.m4 \ + ${CFDIR}/ostype/hpux10.m4 \ ${CFDIR}/ostype/hpux9.m4 \ ${CFDIR}/ostype/irix4.m4 \ ${CFDIR}/ostype/irix5.m4 \ + ${CFDIR}/ostype/irix6.m4 \ ${CFDIR}/ostype/linux.m4 \ + ${CFDIR}/ostype/maxion.m4 \ + ${CFDIR}/ostype/mklinux.m4 \ ${CFDIR}/ostype/nextstep.m4 \ ${CFDIR}/ostype/osf1.m4 \ + ${CFDIR}/ostype/powerux.m4 \ ${CFDIR}/ostype/ptx2.m4 \ + ${CFDIR}/ostype/qnx.m4 \ ${CFDIR}/ostype/riscos4.5.m4 \ + ${CFDIR}/ostype/sco-uw-2.1.m4 \ ${CFDIR}/ostype/sco3.2.m4 \ ${CFDIR}/ostype/solaris2.m4 \ + ${CFDIR}/ostype/solaris2.ml.m4 \ ${CFDIR}/ostype/sunos3.5.m4 \ ${CFDIR}/ostype/sunos4.1.m4 \ ${CFDIR}/ostype/svr4.m4 \ ${CFDIR}/ostype/ultrix4.m4 \ + ${CFDIR}/ostype/unknown.m4 \ + ${CFDIR}/ostype/uxpds.m4 \ ${CFDIR}/siteconfig/uucp.cogsci.m4 \ ${CFDIR}/siteconfig/uucp.old.arpa.m4 \ ${CFDIR}/siteconfig/uucp.ucbarpa.m4 \ ${CFDIR}/siteconfig/uucp.ucbvax.m4 \ $(ALL): $(M4FILES) - -.include <bsd.prog.mk> diff --git a/contrib/sendmail/cf/cf/chez.cs.mc b/contrib/sendmail/cf/cf/chez.cs.mc new file mode 100644 index 000000000000..9858330bd407 --- /dev/null +++ b/contrib/sendmail/cf/cf/chez.cs.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for a home machine that wants to masquerade as an +# on-campus machine. Additionally, all addresses without a hostname +# will be forwarded to that machine. +# + +divert(0)dnl +VERSIONID(`@(#)chez.cs.mc 8.11 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl +MASQUERADE_AS(vangogh.CS.Berkeley.EDU)dnl +FEATURE(use_cw_file)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/clientproto.mc b/contrib/sendmail/cf/cf/clientproto.mc new file mode 100644 index 000000000000..f0a6ae7d6b23 --- /dev/null +++ b/contrib/sendmail/cf/cf/clientproto.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This the prototype for a "null client" -- that is, a client that +# does nothing except forward all mail to a mail hub. IT IS NOT +# USABLE AS IS!!! +# +# To use this, you MUST use the nullclient feature with the name of +# the mail hub as its argument. You MUST also define an `OSTYPE' to +# define the location of the queue directories and the like. +# In addition, you MAY select the nocanonify feature. This causes +# addresses to be sent unqualified via the SMTP connection; normally +# they are qualifed with the masquerade name, which defaults to the +# name of the hub machine. +# Other than these, it should never contain any other lines. +# + +divert(0)dnl +VERSIONID(`@(#)clientproto.mc 8.12 (Berkeley) 5/19/98') + +OSTYPE(unknown) +FEATURE(nullclient, mailhost.$m) diff --git a/contrib/sendmail/cf/cf/cs-hpux10.mc b/contrib/sendmail/cf/cf/cs-hpux10.mc new file mode 100644 index 000000000000..527f9308b990 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-hpux10.mc @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for HP-UX 9.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-hpux10.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(hpux10)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-hpux9.mc b/contrib/sendmail/cf/cf/cs-hpux9.mc new file mode 100644 index 000000000000..f65505296fec --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-hpux9.mc @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for HP-UX 9.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-hpux9.mc 8.11 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-osf1.mc b/contrib/sendmail/cf/cf/cs-osf1.mc new file mode 100644 index 000000000000..ba35c04ac687 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-osf1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for OSF/1. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-osf1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-solaris2.mc b/contrib/sendmail/cf/cf/cs-solaris2.mc new file mode 100644 index 000000000000..395d19fc7aa5 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-solaris2.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for Solaris 2.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-solaris2.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(solaris2)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-sunos4.1.mc b/contrib/sendmail/cf/cf/cs-sunos4.1.mc new file mode 100644 index 000000000000..45dcd124d99f --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-sunos4.1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for SunOS 4.1.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-sunos4.1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-ultrix4.mc b/contrib/sendmail/cf/cf/cs-ultrix4.mc new file mode 100644 index 000000000000..f2a4b423b907 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-ultrix4.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for Ultrix 4.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-ultrix4.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/usr.sbin/sendmail/cf/cf/cyrusproto.mc b/contrib/sendmail/cf/cf/cyrusproto.mc index c660898b738f..c660898b738f 100644 --- a/usr.sbin/sendmail/cf/cf/cyrusproto.mc +++ b/contrib/sendmail/cf/cf/cyrusproto.mc diff --git a/contrib/sendmail/cf/cf/generic-bsd4.4.mc b/contrib/sendmail/cf/cf/generic-bsd4.4.mc new file mode 100644 index 000000000000..106fa31c44dd --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-bsd4.4.mc @@ -0,0 +1,27 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for 4.4 BSD-based systems, +# including 4.4-Lite, BSDi, NetBSD, and FreeBSD. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-bsd4.4.mc 8.7 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-hpux10.mc b/contrib/sendmail/cf/cf/generic-hpux10.mc new file mode 100644 index 000000000000..1a7eda909423 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-hpux10.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for HP-UX 9.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-hpux10.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(hpux10)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-hpux9.mc b/contrib/sendmail/cf/cf/generic-hpux9.mc new file mode 100644 index 000000000000..6aaf3b65e3de --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-hpux9.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for HP-UX 9.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-hpux9.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-nextstep3.3.mc b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc new file mode 100644 index 000000000000..5c81faaf6e7a --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for NEXTSTEP 3.3 systems. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-nextstep3.3.mc 8.7 (Berkeley) 5/19/98') +OSTYPE(nextstep)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-osf1.mc b/contrib/sendmail/cf/cf/generic-osf1.mc new file mode 100644 index 000000000000..2113b927223f --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-osf1.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for OSF/1. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-osf1.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-solaris2.mc b/contrib/sendmail/cf/cf/generic-solaris2.mc new file mode 100644 index 000000000000..1e1aa96a6c43 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-solaris2.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for SunOS 5.x (a.k.a. Solaris 2.x) +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-solaris2.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(solaris2)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-sunos4.1.mc b/contrib/sendmail/cf/cf/generic-sunos4.1.mc new file mode 100644 index 000000000000..7e916c15ea88 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-sunos4.1.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for SunOS 4.1.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-sunos4.1.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-ultrix4.mc b/contrib/sendmail/cf/cf/generic-ultrix4.mc new file mode 100644 index 000000000000..8c900b86e713 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-ultrix4.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a generic configuration file for Ultrix 4.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-ultrix4.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/huginn.cs.mc b/contrib/sendmail/cf/cf/huginn.cs.mc new file mode 100644 index 000000000000..949e917882d5 --- /dev/null +++ b/contrib/sendmail/cf/cf/huginn.cs.mc @@ -0,0 +1,42 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the backup CS Division mail server. +# + +divert(0)dnl +VERSIONID(`@(#)huginn.cs.mc 8.12 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MASQUERADE_AS(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF CS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/knecht.mc b/contrib/sendmail/cf/cf/knecht.mc new file mode 100644 index 000000000000..97e5e43eb36a --- /dev/null +++ b/contrib/sendmail/cf/cf/knecht.mc @@ -0,0 +1,71 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is specific to Eric's home machine. +# + +divert(0)dnl +VERSIONID(`@(#)knecht.mc 8.30 (Berkeley) 6/11/98') +OSTYPE(bsd4.4)dnl +DOMAIN(generic)dnl +define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl +define(`confDEF_USER_ID', `mailnull')dnl +define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl +define(`confTO_ICONNECT', `10s')dnl +define(`confCOPY_ERRORS_TO', `Postmaster')dnl +define(`confTO_QUEUEWARN', `8h')dnl +define(`confTRUSTED_USERS', `www')dnl +define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')dnl +FEATURE(virtusertable)dnl +FEATURE(access_db)dnl +FEATURE(local_lmtp)dnl +define(`LOCAL_MAILER_FLAGS', LOCAL_MAILER_FLAGS`'P)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +# +# Regular expression to reject: +# * numeric-only localparts from aol.com and msn.com +# * localparts starting with a digit from juno.com +# * localparts longer than 10 characters from aol.com +# +Kcheckaddress regex -a@MATCH + ^([0-9]+<@(aol|msn)\.com|[0-9][^<]*<@juno\.com|.{10}[^<]+<@aol\.com)\.?> + +# +# Names that won't be allowed in a To: line (local-part and domains) +# +C{RejectToLocalparts} friend you +C{RejectToDomains} public.com + +LOCAL_RULESETS +HTo: $>CheckTo + +SCheckTo +R$={RejectToLocalparts}@$* $#error $: "553 Header error" +R$*@$={RejectToDomains} $#error $: "553 Header error" + +HMessage-Id: $>CheckMessageId + +SCheckMessageId +R< $+ @ $+ > $@ OK +R$* $#error $: "553 Header error" + +LOCAL_RULESETS +SLocal_check_mail +# check address against various regex checks +R$* $: $>Parse0 $>3 $1 +R$+ $: $(checkaddress $1 $) +R@MATCH $#error $: "553 Header error" diff --git a/contrib/sendmail/cf/cf/mail.cs.mc b/contrib/sendmail/cf/cf/mail.cs.mc new file mode 100644 index 000000000000..1ecf34e2a910 --- /dev/null +++ b/contrib/sendmail/cf/cf/mail.cs.mc @@ -0,0 +1,43 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the primary CS Division mail server. +# + +divert(0)dnl +VERSIONID(`@(#)mail.cs.mc 8.15 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(Berkeley.EDU)dnl +MASQUERADE_AS(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`confUSERDB_SPEC', ``/usr/local/lib/users.cs.db,/usr/local/lib/users.eecs.db'')dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF CS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/mail.eecs.mc b/contrib/sendmail/cf/cf/mail.eecs.mc new file mode 100644 index 000000000000..42d053d70ee1 --- /dev/null +++ b/contrib/sendmail/cf/cf/mail.eecs.mc @@ -0,0 +1,43 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in Electrical Engineering and Computer Sciences at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. +# +# This file is for the primary EECS mail server. +# + +divert(0)dnl +VERSIONID(`@(#)mail.eecs.mc 8.15 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(EECS.Berkeley.EDU)dnl +MASQUERADE_AS(EECS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`confUSERDB_SPEC', `/usr/local/lib/users.eecs.db,/usr/local/lib/users.cs.db,/usr/local/lib/users.coe.db')dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF EECS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/mailspool.cs.mc b/contrib/sendmail/cf/cf/mailspool.cs.mc new file mode 100644 index 000000000000..7ae62b24d607 --- /dev/null +++ b/contrib/sendmail/cf/cf/mailspool.cs.mc @@ -0,0 +1,36 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for our mail spool machine. For a while we were using +# "root.machinename" instead of "root+machinename", so this is included +# for back compatibility. +# + +divert(0)dnl +VERSIONID(`@(#)mailspool.cs.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +CDroot sys-custodian + +LOCAL_RULE_3 +R$=D . $+ $1 + $2 diff --git a/contrib/sendmail/cf/cf/python.cs.mc b/contrib/sendmail/cf/cf/python.cs.mc new file mode 100644 index 000000000000..2cb111d0b655 --- /dev/null +++ b/contrib/sendmail/cf/cf/python.cs.mc @@ -0,0 +1,41 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for a home machine that wants to masquerade as an +# on-campus machine. Additionally, all addresses without a hostname +# will be forwarded to that machine. +# + +divert(0)dnl +VERSIONID(`@(#)python.cs.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl +MASQUERADE_AS(vangogh.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +# accept mail sent to the domain head +DDBostic.COM + +LOCAL_RULE_0 +# accept mail sent to the domain head +R< @ $D . > : $* $@ $>7 $1 @here:... -> ... +R$* $=O $* < @ $D . > $@ $>7 $1 $2 $3 ...@here -> ... +R$* < @ $D . > $#local $: $1 user@here -> user diff --git a/contrib/sendmail/cf/cf/s2k-osf1.mc b/contrib/sendmail/cf/cf/s2k-osf1.mc new file mode 100644 index 000000000000..1c7b1ccd1d74 --- /dev/null +++ b/contrib/sendmail/cf/cf/s2k-osf1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for OSF/1. +# It applies only to the Sequoia 2000 Project at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)s2k-osf1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(S2K.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/s2k-ultrix4.mc b/contrib/sendmail/cf/cf/s2k-ultrix4.mc new file mode 100644 index 000000000000..06c70d45be63 --- /dev/null +++ b/contrib/sendmail/cf/cf/s2k-ultrix4.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for Ultrix 4.x. +# It applies only to the Sequoia 2000 Project at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)s2k-ultrix4.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(S2K.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/tcpproto.mc b/contrib/sendmail/cf/cf/tcpproto.mc new file mode 100644 index 000000000000..eb6eadecb656 --- /dev/null +++ b/contrib/sendmail/cf/cf/tcpproto.mc @@ -0,0 +1,32 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is the prototype file for a configuration that supports nothing +# but basic SMTP connections via TCP. +# +# You MUST change the `OSTYPE' macro to specify the operating system +# on which this will run; this will set the location of various +# support files for your operating system environment. You MAY +# create a domain file in ../domain and reference it by adding a +# `DOMAIN' macro after the `OSTYPE' macro. I recommend that you +# first copy this to another file name so that new sendmail releases +# will not trash your changes. +# + +divert(0)dnl +VERSIONID(`@(#)tcpproto.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(unknown) +FEATURE(nouucp) +MAILER(local) +MAILER(smtp) diff --git a/contrib/sendmail/cf/cf/ucbarpa.mc b/contrib/sendmail/cf/cf/ucbarpa.mc new file mode 100644 index 000000000000..925d47fefb74 --- /dev/null +++ b/contrib/sendmail/cf/cf/ucbarpa.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This machine has been decommissioned at Berkeley, and hence should +# not be considered to be tested. This file is provided as an example +# only, of how you might set up a joint SMTP/UUCP configuration. At +# this point I recommend using `FEATURE(mailertable)' instead of +# `SITECONFIG'. See also ucbvax.mc. +# + +divert(0)dnl +VERSIONID(`@(#)ucbarpa.mc 8.9 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +OSTYPE(bsd4.4)dnl +MAILER(local)dnl +MAILER(smtp)dnl +MAILER(uucp)dnl +SITECONFIG(uucp.ucbarpa, ucbarpa, U) diff --git a/usr.sbin/sendmail/cf/cf/ucbvax.mc b/contrib/sendmail/cf/cf/ucbvax.mc index 89a0f1014cd6..76027fb951e4 100644 --- a/usr.sbin/sendmail/cf/cf/ucbvax.mc +++ b/contrib/sendmail/cf/cf/ucbvax.mc @@ -1,36 +1,14 @@ divert(-1) # -# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. # -# 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. # # @@ -43,7 +21,7 @@ divert(-1) # divert(0)dnl -VERSIONID(`@(#)ucbvax.mc 8.6 (Berkeley) 3/23/96') +VERSIONID(`@(#)ucbvax.mc 8.11 (Berkeley) 5/19/98') OSTYPE(bsd4.3) DOMAIN(CS.Berkeley.EDU) MASQUERADE_AS(CS.Berkeley.EDU) diff --git a/contrib/sendmail/cf/cf/uucpproto.mc b/contrib/sendmail/cf/cf/uucpproto.mc new file mode 100644 index 000000000000..4f1c54a332e2 --- /dev/null +++ b/contrib/sendmail/cf/cf/uucpproto.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is the prototype for a configuration that only supports UUCP +# and does not have DNS support at all. +# +# You MUST change the `OSTYPE' macro to specify the operating system +# on which this will run; this will set the location of various +# support files for your operating system environment. You MAY +# create a domain file in ../domain and reference it by adding a +# `DOMAIN' macro after the `OSTYPE' macro. I recommend that you +# first copy this to another file name so that new sendmail releases +# will not trash your changes. +# + +divert(0)dnl +VERSIONID(`@(#)uucpproto.mc 8.12 (Berkeley) 5/19/98') +OSTYPE(unknown) +FEATURE(promiscuous_relay)dnl +FEATURE(accept_unresolvable_domains)dnl +MAILER(local)dnl +MAILER(uucp)dnl diff --git a/contrib/sendmail/cf/cf/vangogh.cs.mc b/contrib/sendmail/cf/cf/vangogh.cs.mc new file mode 100644 index 000000000000..deefc29febde --- /dev/null +++ b/contrib/sendmail/cf/cf/vangogh.cs.mc @@ -0,0 +1,32 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the BSD development machine; it has some parameters +# set up (to stress sendmail) and accepts mail for some other machines. +# + +divert(0)dnl +VERSIONID(`@(#)vangogh.cs.mc 8.10 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +OSTYPE(bsd4.4)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`MCI_CACHE_SIZE', 5) +Cw okeeffe.CS.Berkeley.EDU +Cw python.CS.Berkeley.EDU diff --git a/contrib/sendmail/cf/domain/Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/Berkeley.EDU.m4 new file mode 100644 index 000000000000..48e151b7b285 --- /dev/null +++ b/contrib/sendmail/cf/domain/Berkeley.EDU.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)Berkeley.EDU.m4 8.14 (Berkeley) 5/19/98') +DOMAIN(berkeley-only)dnl +define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl +define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl +define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')dnl +define(`confCW_FILE', `-o /etc/sendmail.cw')dnl +define(`confDONT_INIT_GROUPS', True)dnl +FEATURE(redirect)dnl +FEATURE(use_cw_file)dnl +FEATURE(stickyhost)dnl diff --git a/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 new file mode 100644 index 000000000000..20309210b8c6 --- /dev/null +++ b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)CS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(Berkeley.EDU)dnl +HACK(cssubdomain)dnl +define(`confUSERDB_SPEC', + `/usr/sww/share/lib/users.cs.db,/usr/sww/share/lib/users.eecs.db')dnl diff --git a/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 new file mode 100644 index 000000000000..022dddd13a57 --- /dev/null +++ b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)EECS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(Berkeley.EDU)dnl +MASQUERADE_AS(EECS.Berkeley.EDU)dnl diff --git a/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 new file mode 100644 index 000000000000..14965a6bff0e --- /dev/null +++ b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)S2K.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +MASQUERADE_AS(postgres.Berkeley.EDU)dnl diff --git a/contrib/sendmail/cf/domain/berkeley-only.m4 b/contrib/sendmail/cf/domain/berkeley-only.m4 new file mode 100644 index 000000000000..d3d770811c68 --- /dev/null +++ b/contrib/sendmail/cf/domain/berkeley-only.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)unspecified-domain.m4 8.7 (Berkeley) 5/19/98') +errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') +errprint(` files outside of the Computer Science Division at Berkeley.') +errprint(` The configuration (.mc) files must be customized to reference') +errprint(` domain files appropriate for your environment.') diff --git a/contrib/sendmail/cf/domain/generic.m4 b/contrib/sendmail/cf/domain/generic.m4 new file mode 100644 index 000000000000..1329e4499b81 --- /dev/null +++ b/contrib/sendmail/cf/domain/generic.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# The following is a generic domain file. You should be able to +# use it anywhere. If you want to customize it, copy it to a file +# named with your domain and make the edits; then, copy the appropriate +# .mc files and change `DOMAIN(generic)' to reference your updated domain +# files. +# +divert(0) +VERSIONID(`@(#)generic.m4 8.9 (Berkeley) 5/19/98') +define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl +FEATURE(redirect)dnl +FEATURE(use_cw_file)dnl diff --git a/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 new file mode 100644 index 000000000000..16bef7825394 --- /dev/null +++ b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)accept_unqualified_senders.m4 8.3 (Berkeley) 5/19/98') +divert(-1) + +define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) diff --git a/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 new file mode 100644 index 000000000000..5b7241a314e5 --- /dev/null +++ b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)accept_unresolvable_domains.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) diff --git a/contrib/sendmail/cf/feature/access_db.m4 b/contrib/sendmail/cf/feature/access_db.m4 new file mode 100644 index 000000000000..85820723deee --- /dev/null +++ b/contrib/sendmail/cf/feature/access_db.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)access_db.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`ACCESS_TABLE', + ifelse(_ARG_, `', + DATABASE_MAP_TYPE` -o /etc/mail/access', + `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/allmasquerade.m4 b/contrib/sendmail/cf/feature/allmasquerade.m4 new file mode 100644 index 000000000000..42121e5cc488 --- /dev/null +++ b/contrib/sendmail/cf/feature/allmasquerade.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)allmasquerade.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + + +define(`_ALL_MASQUERADE_', 1) diff --git a/contrib/sendmail/cf/feature/always_add_domain.m4 b/contrib/sendmail/cf/feature/always_add_domain.m4 new file mode 100644 index 000000000000..e609bf000277 --- /dev/null +++ b/contrib/sendmail/cf/feature/always_add_domain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)always_add_domain.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_ALWAYS_ADD_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/bestmx_is_local.m4 b/contrib/sendmail/cf/feature/bestmx_is_local.m4 new file mode 100644 index 000000000000..2d3048809ecc --- /dev/null +++ b/contrib/sendmail/cf/feature/bestmx_is_local.m4 @@ -0,0 +1,46 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)bestmx_is_local.m4 8.12 (Berkeley) 5/19/98') +divert(-1) + +LOCAL_CONFIG +# turn on bestMX lookup table +Kbestmx bestmx +ifelse(_ARG_, `', `dnl',` +# limit bestmx to these domains +CB`'_ARG_') + +LOCAL_NET_CONFIG + +# If we are the best MX for a site, then we want to accept +# its mail as local. We assume we've already weeded out mail to +# UUCP sites which are connected to us, which should also have +# listed us as their best MX. +# +# Warning: this may generate a lot of extra DNS traffic -- a +# lower cost method is to list all the expected best MX hosts +# in $=w. This should be fine (and easier to administer) for +# low to medium traffic hosts. If you use the limited bestmx +# by passing in a set of possible domains it will improve things. + +ifelse(_ARG_, `', `dnl +# unlimited bestmx +R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3', +`dnl +# limit bestmx to $=B +R$* < @ $* $=B . > $* $: $1 < @ $2 $3 . @@ $(bestmx $2 $3 . $) > $4') +R$* $=O $* < @ $* @@ $=w . > $* $@ $>97 $1 $2 $3 +R$* < @ $* @@ $=w . > $* $#local $: $1 +R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4 diff --git a/contrib/sendmail/cf/feature/bitdomain.m4 b/contrib/sendmail/cf/feature/bitdomain.m4 new file mode 100644 index 000000000000..be5155bd3242 --- /dev/null +++ b/contrib/sendmail/cf/feature/bitdomain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)bitdomain.m4 8.13 (Berkeley) 5/19/98') +divert(-1) + +define(`BITDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/bitdomain', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/blacklist_recipients.m4 b/contrib/sendmail/cf/feature/blacklist_recipients.m4 new file mode 100644 index 000000000000..4417fe093695 --- /dev/null +++ b/contrib/sendmail/cf/feature/blacklist_recipients.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)blacklist_recipients.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +ifdef(`ACCESS_TABLE', + `define(`_BLACKLIST_RCPT_', 1)', + `errprint(`*** ERROR: FEATURE(blacklist_recipients) requires FEATURE(access_db) +')') diff --git a/contrib/sendmail/cf/feature/domaintable.m4 b/contrib/sendmail/cf/feature/domaintable.m4 new file mode 100644 index 000000000000..0bf9f05fb340 --- /dev/null +++ b/contrib/sendmail/cf/feature/domaintable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)domaintable.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`DOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/domaintable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/genericstable.m4 b/contrib/sendmail/cf/feature/genericstable.m4 new file mode 100644 index 000000000000..ec7a4d3f7d51 --- /dev/null +++ b/contrib/sendmail/cf/feature/genericstable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)genericstable.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`GENERICS_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/genericstable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/limited_masquerade.m4 b/contrib/sendmail/cf/feature/limited_masquerade.m4 new file mode 100644 index 000000000000..ae5e868ed966 --- /dev/null +++ b/contrib/sendmail/cf/feature/limited_masquerade.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)limited_masquerade.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_LIMITED_MASQUERADE_', 1) diff --git a/contrib/sendmail/cf/feature/local_lmtp.m4 b/contrib/sendmail/cf/feature/local_lmtp.m4 new file mode 100644 index 000000000000..f323b5b1908e --- /dev/null +++ b/contrib/sendmail/cf/feature/local_lmtp.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)local_lmtp.m4 8.5 (Berkeley) 5/19/98') +divert(-1) + +define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`confEBINDIR', confEBINDIR, `/usr/libexec')`/mail.local', + _ARG_)) +define(`LOCAL_MAILER_FLAGS', `SXfmnz9') +define(`LOCAL_MAILER_ARGS', `mail.local -l') diff --git a/contrib/sendmail/cf/feature/local_procmail.m4 b/contrib/sendmail/cf/feature/local_procmail.m4 new file mode 100644 index 000000000000..adf1237b3987 --- /dev/null +++ b/contrib/sendmail/cf/feature/local_procmail.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1994 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/98') +divert(-1) + +define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`PROCMAIL_MAILER_PATH', + PROCMAIL_MAILER_PATH, + `/usr/local/bin/procmail'), + _ARG_)) +define(`LOCAL_MAILER_FLAGS', `SPfhn9') +define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u') diff --git a/contrib/sendmail/cf/feature/loose_relay_check.m4 b/contrib/sendmail/cf/feature/loose_relay_check.m4 new file mode 100644 index 000000000000..6e3584b02ed8 --- /dev/null +++ b/contrib/sendmail/cf/feature/loose_relay_check.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)loose_relay_check.m4 8.3 (Berkeley) 5/19/98') +divert(-1) + +define(`_LOOSE_RELAY_CHECK_', 1) diff --git a/contrib/sendmail/cf/feature/mailertable.m4 b/contrib/sendmail/cf/feature/mailertable.m4 new file mode 100644 index 000000000000..3078261a452c --- /dev/null +++ b/contrib/sendmail/cf/feature/mailertable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)mailertable.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +define(`MAILER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/mailertable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 new file mode 100644 index 000000000000..9766ae4499a0 --- /dev/null +++ b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)masquerade_entire_domain.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/masquerade_envelope.m4 b/contrib/sendmail/cf/feature/masquerade_envelope.m4 new file mode 100644 index 000000000000..75d257e64f5d --- /dev/null +++ b/contrib/sendmail/cf/feature/masquerade_envelope.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)masquerade_envelope.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_MASQUERADE_ENVELOPE_', 1) diff --git a/contrib/sendmail/cf/feature/nocanonify.m4 b/contrib/sendmail/cf/feature/nocanonify.m4 new file mode 100644 index 000000000000..6211a8ebec55 --- /dev/null +++ b/contrib/sendmail/cf/feature/nocanonify.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)nocanonify.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_NO_CANONIFY_', 1) diff --git a/contrib/sendmail/cf/feature/nodns.m4 b/contrib/sendmail/cf/feature/nodns.m4 new file mode 100644 index 000000000000..26458fc3af89 --- /dev/null +++ b/contrib/sendmail/cf/feature/nodns.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)nodns.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +undefine(`confBIND_OPTS')dnl +errprint(`FEATURE(nodns) is no-op. +Use ServiceSwitchFile ('ifdef(`confSERVICE_SWITCH_FILE',confSERVICE_SWITCH_FILE,`/etc/service.switch' if your OS does not provide its own)`) instead. +') diff --git a/contrib/sendmail/cf/feature/notsticky.m4 b/contrib/sendmail/cf/feature/notsticky.m4 new file mode 100644 index 000000000000..4fa344d70696 --- /dev/null +++ b/contrib/sendmail/cf/feature/notsticky.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)notsticky.m4 8.8 (Berkeley) 5/19/98') +# +# This is now the default. Use ``FEATURE(stickyhost)'' if you want +# the old default behaviour. +# +divert(-1) diff --git a/contrib/sendmail/cf/feature/nouucp.m4 b/contrib/sendmail/cf/feature/nouucp.m4 new file mode 100644 index 000000000000..3c1098cac4e6 --- /dev/null +++ b/contrib/sendmail/cf/feature/nouucp.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)nouucp.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_NO_UUCP_', 1) diff --git a/contrib/sendmail/cf/feature/nullclient.m4 b/contrib/sendmail/cf/feature/nullclient.m4 new file mode 100644 index 000000000000..1df782e24dea --- /dev/null +++ b/contrib/sendmail/cf/feature/nullclient.m4 @@ -0,0 +1,50 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +ifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')') +define(_NULL_CLIENT_ONLY_, `1') +ifelse(_ARG_, `', `errprint(`Feature "nullclient" requires argument')', + `define(`MAIL_HUB', _ARG_)') +POPDIVERT + +# +# This is used only for relaying mail from a client to a hub when +# that client does absolutely nothing else -- i.e., it is a "null +# mailer". In this sense, it acts like the "R" option in Sun +# sendmail. +# + +VERSIONID(`@(#)nullclient.m4 8.12 (Berkeley) 5/19/98') + +PUSHDIVERT(6) +# hub host (to which all mail is sent) +DH`'ifdef(`MAIL_HUB', MAIL_HUB, + `errprint(`MAIL_HUB not defined for nullclient feature')') +ifdef(`MASQUERADE_NAME',, `define(`MASQUERADE_NAME', MAIL_HUB)')dnl + +# route-addr separators +C: : , +POPDIVERT +PUSHDIVERT(7) +############################################ +### Null Client Mailer specification ### +############################################ + +ifdef(`confRELAY_MAILER',, + `define(`confRELAY_MAILER', `nullclient')')dnl +ifdef(`confFROM_HEADER',, + `define(`confFROM_HEADER', <$g>)')dnl +ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')')dnl + +Mnullclient, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS),ifdef(`SMTP_MAILER_MAX', ` M=SMTP_MAILER_MAX,') + A=SMTP_MAILER_ARGS +POPDIVERT diff --git a/contrib/sendmail/cf/feature/promiscuous_relay.m4 b/contrib/sendmail/cf/feature/promiscuous_relay.m4 new file mode 100644 index 000000000000..975afab752d6 --- /dev/null +++ b/contrib/sendmail/cf/feature/promiscuous_relay.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)promiscuous_relay.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_PROMISCUOUS_RELAY_', 1) diff --git a/contrib/sendmail/cf/feature/rbl.m4 b/contrib/sendmail/cf/feature/rbl.m4 new file mode 100644 index 000000000000..a9251e049782 --- /dev/null +++ b/contrib/sendmail/cf/feature/rbl.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/redirect.m4 b/contrib/sendmail/cf/feature/redirect.m4 new file mode 100644 index 000000000000..721d2260c284 --- /dev/null +++ b/contrib/sendmail/cf/feature/redirect.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)redirect.m4 8.10 (Berkeley) 5/19/98') +divert(-1) + + +PUSHDIVERT(3) +# addresses sent to foo@host.REDIRECT will give a 551 error code +R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} > +R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. > +R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2> +POPDIVERT + +PUSHDIVERT(6) +CPREDIRECT +POPDIVERT diff --git a/contrib/sendmail/cf/feature/relay_based_on_MX.m4 b/contrib/sendmail/cf/feature/relay_based_on_MX.m4 new file mode 100644 index 000000000000..44d07116ceb0 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_based_on_MX.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)relay_based_on_MX.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_MX_SERVED_', 1) diff --git a/contrib/sendmail/cf/feature/relay_entire_domain.m4 b/contrib/sendmail/cf/feature/relay_entire_domain.m4 new file mode 100644 index 000000000000..823da1e50ff1 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_entire_domain.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)relay_entire_domain.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_ENTIRE_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/relay_hosts_only.m4 b/contrib/sendmail/cf/feature/relay_hosts_only.m4 new file mode 100644 index 000000000000..98f72c8f82d8 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_hosts_only.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)relay_hosts_only.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_HOSTS_ONLY_', 1) diff --git a/contrib/sendmail/cf/feature/relay_local_from.m4 b/contrib/sendmail/cf/feature/relay_local_from.m4 new file mode 100644 index 000000000000..549bc9c74232 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_local_from.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)relay_local_from.m4 8.2 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_LOCAL_FROM_', 1) diff --git a/contrib/sendmail/cf/feature/smrsh.m4 b/contrib/sendmail/cf/feature/smrsh.m4 new file mode 100644 index 000000000000..2c47632649b3 --- /dev/null +++ b/contrib/sendmail/cf/feature/smrsh.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)smrsh.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +ifdef(`_MAILER_local_', + `errprint(`*** FEATURE(smrsh) must occur before MAILER(local)')')dnl +define(`LOCAL_SHELL_PATH', + ifelse(_ARG_, `', + ifdef(`confEBINDIR', confEBINDIR, `/usr/libexec')`/smrsh', + _ARG_)) diff --git a/contrib/sendmail/cf/feature/stickyhost.m4 b/contrib/sendmail/cf/feature/stickyhost.m4 new file mode 100644 index 000000000000..8bbeb49cac62 --- /dev/null +++ b/contrib/sendmail/cf/feature/stickyhost.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)stickyhost.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_STICKY_LOCAL_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/use_ct_file.m4 b/contrib/sendmail/cf/feature/use_ct_file.m4 new file mode 100644 index 000000000000..344d178504d1 --- /dev/null +++ b/contrib/sendmail/cf/feature/use_ct_file.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)use_ct_file.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +# if defined, the sendmail.cf will read the /etc/sendmail.ct file +# to find the names of trusted users. There should only be a few +# of these, and normally this is done directly in the .cf file. + +define(`_USE_CT_FILE_', `') + +divert(0) diff --git a/contrib/sendmail/cf/feature/use_cw_file.m4 b/contrib/sendmail/cf/feature/use_cw_file.m4 new file mode 100644 index 000000000000..9abf2c1b4992 --- /dev/null +++ b/contrib/sendmail/cf/feature/use_cw_file.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)use_cw_file.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +# if defined, the sendmail.cf will read the /etc/sendmail.cw file +# to find alternate names for this host. Typically only used when +# several hosts have been squashed into one another at high speed. + +define(`USE_CW_FILE', `') + +divert(0) diff --git a/contrib/sendmail/cf/feature/uucpdomain.m4 b/contrib/sendmail/cf/feature/uucpdomain.m4 new file mode 100644 index 000000000000..1c6a33a81fa7 --- /dev/null +++ b/contrib/sendmail/cf/feature/uucpdomain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)uucpdomain.m4 8.13 (Berkeley) 5/19/98') +divert(-1) + +define(`UUDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/uudomain', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/virtusertable.m4 b/contrib/sendmail/cf/feature/virtusertable.m4 new file mode 100644 index 000000000000..337f635766c0 --- /dev/null +++ b/contrib/sendmail/cf/feature/virtusertable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)virtusertable.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`VIRTUSER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/virtusertable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/hack/cssubdomain.m4 b/contrib/sendmail/cf/hack/cssubdomain.m4 new file mode 100644 index 000000000000..b79b69b5b119 --- /dev/null +++ b/contrib/sendmail/cf/hack/cssubdomain.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +divert(0) +VERSIONID(`@(#)cssubdomain.m4 8.6 (Berkeley) 5/19/98') + +divert(2) +# find possible (old & new) versions of our name via short circuit hack +# (this code should exist ONLY during the transition from .Berkeley.EDU +# names to .CS.Berkeley.EDU names -- probably not more than a few months) +R$* < @ $=w .CS.Berkeley.EDU > $* $: $1 < @ $j > $3 +R$* < @ $=w .Berkeley.EDU> $* $: $1 < @ $j > $3 +divert(0) diff --git a/contrib/sendmail/cf/m4/cf.m4 b/contrib/sendmail/cf/m4/cf.m4 new file mode 100644 index 000000000000..21655822b226 --- /dev/null +++ b/contrib/sendmail/cf/m4/cf.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# +# This file is included so that multiple includes of cf.m4 will work +# + +# figure out where the CF files live +ifdef(`_CF_DIR_', `', + `ifelse(__file__, `__file__', + `define(`_CF_DIR_', `../')', + `define(`_CF_DIR_', + substr(__file__, 0, eval(len(__file__) - 8)))')') + +divert(0)dnl +ifdef(`OSTYPE', `dnl', +`include(_CF_DIR_`'m4/cfhead.m4)dnl +VERSIONID(`@(#)cf.m4 8.29 (Berkeley) 5/19/98')') diff --git a/usr.sbin/sendmail/cf/m4/cfhead.m4 b/contrib/sendmail/cf/m4/cfhead.m4 index 6bef4c685a3a..a7a109856d4e 100644 --- a/usr.sbin/sendmail/cf/m4/cfhead.m4 +++ b/contrib/sendmail/cf/m4/cfhead.m4 @@ -1,35 +1,13 @@ # -# Copyright (c) 1983, 1995 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. # -# 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. # ###################################################################### @@ -118,6 +96,10 @@ define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1 POPDIVERT`'dnl`'') define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1 POPDIVERT`'dnl`'') +define(`RELAY_DOMAIN', `PUSHDIVERT(5)CR$1 +POPDIVERT`'dnl`'') +define(`RELAY_DOMAIN_FILE', `PUSHDIVERT(5)FR$1 +POPDIVERT`'dnl`'') define(`_OPTINS', `ifdef(`$1', `$2$1$3')') m4wrap(`include(_CF_DIR_`m4/proto.m4')') @@ -151,10 +133,10 @@ define(`confSAFE_QUEUE', `True') define(`confTO_QUEUERETURN', `5d') define(`confTO_QUEUEWARN', `4h') define(`confTIME_ZONE', `USE_SYSTEM') -define(`confDEF_USER_ID', `1:1') define(`confCW_FILE', `/etc/sendmail.cw') define(`confMIME_FORMAT_ERRORS', `True') define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward') +define(`confCR_FILE', `-o /etc/mail/relay-domains') divert(0)dnl -VERSIONID(`@(#)cfhead.m4 8.9 (Berkeley) 1/18/97') +VERSIONID(`@(#)cfhead.m4 8.22 (Berkeley) 5/19/98') diff --git a/usr.sbin/sendmail/cf/m4/nullrelay.m4 b/contrib/sendmail/cf/m4/nullrelay.m4 index e8f967726601..02020697a862 100644 --- a/usr.sbin/sendmail/cf/m4/nullrelay.m4 +++ b/contrib/sendmail/cf/m4/nullrelay.m4 @@ -1,40 +1,18 @@ divert(-1) # -# Copyright (c) 1983, 1995 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. # -# 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. # divert(0) -VERSIONID(`@(#)nullrelay.m4 8.13 (Berkeley) 4/30/97') +VERSIONID(`@(#)nullrelay.m4 8.19 (Berkeley) 5/19/98') # # This configuration applies only to relay-only hosts. They send @@ -108,7 +86,7 @@ R$+ $@ $1 @ $M unadorned user') S0 -R$*:;<@> $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" +R$*:;<@> $#error $@ USAGE $: "List:; syntax illegal for recipient addresses" # pass everything else to a relay host R$* $#_RELAY_ $@ $H $: $1 diff --git a/usr.sbin/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4 index 78fa195ef2ac..d8842bfff1f5 100644 --- a/usr.sbin/sendmail/cf/m4/proto.m4 +++ b/contrib/sendmail/cf/m4/proto.m4 @@ -1,45 +1,23 @@ divert(-1) # -# Copyright (c) 1983, 1995 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. # -# 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. # divert(0) -VERSIONID(`@(#)proto.m4 8.151 (Berkeley) 7/31/97') +VERSIONID(`@(#)proto.m4 8.223 (Berkeley) 6/30/98') MAILER(local)dnl -# level 7 config file format -V7/Berkeley +# level 8 config file format +V8/Berkeley divert(-1) # do some sanity checking @@ -59,6 +37,9 @@ define(`_LOCAL_', `confLOCAL_MAILER')dnl for readability only define(`_RELAY_', `confRELAY_MAILER')dnl for readability only define(`_UUCP_', `confUUCP_MAILER')dnl for readability only +# set our default hashed database type +ifdef(`DATABASE_MAP_TYPE',, `define(`DATABASE_MAP_TYPE', `hash')') + # back compatibility with old config files ifdef(`confDEF_GROUP_ID', `errprint(`*** confDEF_GROUP_ID is obsolete.') @@ -83,6 +64,10 @@ define(`_OPTION', `ifdef(`$2', `O $1=$2', `#O $1`'ifelse($3, `',, `=$3')')')dnl divert(0)dnl +# override file safeties - setting this option compromises system security +# need to set this now for the sake of class files +_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', safe) + ################## # local info # ################## @@ -129,12 +114,11 @@ CPFAX # "Smart" relay host (may be null) DS`'ifdef(`SMART_HOST', SMART_HOST) +ifdef(`LUSER_RELAY', `dnl # place to which unknown users should be forwarded -ifdef(`LUSER_RELAY', `', `#')dnl Kuser user -m -a<> -ifdef(`LUSER_RELAY', - `DL`'LUSER_RELAY', - `#DLname_of_luser_relay') +DL`'LUSER_RELAY', +`dnl') # operators that cannot be in local usernames (i.e., network indicators) CO @ % ifdef(`_NO_UUCP_', `', `!') @@ -145,25 +129,54 @@ C.. # a class with just a left bracket (for identifying domain literals) C[[ +ifdef(`MAILER_TABLE', `dnl # Mailer table (overriding domains) -ifdef(`MAILER_TABLE', - `Kmailertable MAILER_TABLE', - `#Kmailertable dbm /etc/mailertable') +Kmailertable MAILER_TABLE', +`dnl') +ifdef(`DOMAIN_TABLE', `dnl # Domain table (adding domains) -ifdef(`DOMAIN_TABLE', - `Kdomaintable DOMAIN_TABLE', - `#Kdomaintable dbm /etc/domaintable') +Kdomaintable DOMAIN_TABLE', +`dnl') +ifdef(`GENERICS_TABLE', `dnl # Generics table (mapping outgoing addresses) -ifdef(`GENERICS_TABLE', - `Kgenerics GENERICS_TABLE', - `#Kgenerics dbm /etc/genericstable') +Kgenerics GENERICS_TABLE', +`dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# UUCP domain table +Kuudomain UUDOMAIN_TABLE', +`dnl') + +ifdef(`BITDOMAIN_TABLE', `dnl +# BITNET mapping table +Kbitdomain BITDOMAIN_TABLE', +`dnl') +ifdef(`VIRTUSER_TABLE', `dnl # Virtual user table (maps incoming users) -ifdef(`VIRTUSER_TABLE', - `Kvirtuser VIRTUSER_TABLE', - `#Kvirtuser dbm /etc/virtusertable') +Kvirtuser VIRTUSER_TABLE', +`dnl') + +ifdef(`ACCESS_TABLE', `dnl +# Access list database (for spam stomping) +Kaccess ACCESS_TABLE', +`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# MX map (to allow relaying to hosts that we MX for) +Kmxserved bestmx -z: -T<TEMP>', +`dnl') + +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl +# Resolve map (to check if a host exists in check_mail) +Kresolve host -a<OK> -T<TEMP>') + +ifdef(`confCR_FILE', `dnl +# Hosts that will permit relaying ($=R) +FR`'confCR_FILE', +`dnl') # who I send unqualified names to (null means deliver locally) DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY) @@ -349,7 +362,7 @@ ifelse(confTIME_ZONE, `USE_SYSTEM', `#O TimeZoneSpec=', `O TimeZoneSpec=confTIME_ZONE') # default UID (can be username or userid:groupid) -_OPTION(DefaultUser, `confDEF_USER_ID', nobody) +_OPTION(DefaultUser, `confDEF_USER_ID', mailnull) # list of locations of user database file (null means no lookup) _OPTION(UserDatabaseSpec, `confUSERDB_SPEC', /etc/userdb) @@ -423,6 +436,15 @@ _OPTION(SmtpGreetingMessage, `confSMTP_LOGIN_MSG') # UNIX initial From header format (old $l macro) _OPTION(UnixFromLine, `confFROM_LINE') +# From: lines that have embedded newlines are unwrapped onto one line +_OPTION(SingleLineFromHeader, `confSINGLE_LINE_FROM_HEADER', False) + +# Allow HELO SMTP command that does not `include' a host name +_OPTION(AllowBogusHELO, `confALLOW_BOGUS_HELO', False) + +# Characters to be quoted in a full name phrase (@,;:\()[] are automatic) +_OPTION(MustQuoteChars, `confMUST_QUOTE_CHARS', .) + # delimiter (operator) characters (old $o macro) _OPTION(OperatorChars, `confOPERATORS') @@ -433,11 +455,17 @@ _OPTION(DontInitGroups, `confDONT_INIT_GROUPS') _OPTION(UnsafeGroupWrites, `confUNSAFE_GROUP_WRITES') # where do errors that occur when sending errors get sent? -_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS') +_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', postmaster) # what user id do we assume for the majority of the processing? _OPTION(RunAsUser, `confRUN_AS_USER', sendmail) +# maximum number of recipients per SMTP envelope +_OPTION(MaxRecipientsPerMessage, `confMAX_RCPTS_PER_MESSAGE', 100) + +# shall we get local names from our installed interfaces? +_OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES') + ########################### # Message precedences # ########################### @@ -572,12 +600,20 @@ R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr +ifdef(`DOMAIN_TABLE', `dnl # look up domains in the domain table -ifdef(`DOMAIN_TABLE', `', `#')dnl -R$* < @ $+ > $* $: $1 < @ $(domaintable $2 $) > $3 +R$* < @ $+ > $* $: $1 < @ $(domaintable $2 $) > $3', `dnl') undivert(2)dnl +ifdef(`BITDOMAIN_TABLE', `dnl +# handle BITNET mapping +R$* < @ $+ .BITNET > $* $: $1 < @ $(bitdomain $2 $: $2.BITNET $) > $3', `dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# handle UUCP mapping +R$* < @ $+ .UUCP > $* $: $1 < @ $(uudomain $2 $: $2.UUCP $) > $3', `dnl') + ifdef(`_NO_UUCP_', `dnl', `ifdef(`UUCP_RELAY', `# pass UUCP addresses straight through @@ -594,15 +630,14 @@ ifdef(`_CLASS_X_', ifdef(`_CLASS_Y_', `R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') -define(`X', ifdef(`_NO_CANONIFY_', `#', `'))dnl +ifdef(`_NO_CANONIFY_', `dnl', `dnl # try UUCP traffic as a local address -X`'R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 -X`'R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') -undefine(`X')dnl -') +R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 +R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') +')') +ifdef(`_NO_CANONIFY_', `dnl', `dnl # pass to name server to make hostname canonical -ifdef(`_NO_CANONIFY_', `#')dnl -R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4 +R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4') # local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 @@ -662,50 +697,68 @@ R$* $@ $>0 $1 S0 R$* $: $>Parse0 $1 initial parsing +R<@> $#_LOCAL_ $: <@> special case error msgs R$* $: $>98 $1 handle local hacks R$* $: $>Parse1 $1 final parsing +# +# Parse0 -- do initial syntax checking and eliminate local addresses. +# This should either return with the (possibly modified) input +# or return with a #error mailer. It should not return with a +# #mailer other than the #error mailer. +# + SParse0 -R<@> $#_LOCAL_ $: <@> special case error msgs -R$* : $* ; <@> $#error $@ 5.1.3 $: "list:; syntax illegal for recipient addresses" -R<@ $+> $#error $@ 5.1.1 $: "user address required" +R<@> $@ <@> special case error msgs +R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses" +#R@ <@ $* > < @ $1 > catch "@@host" bogosity +R<@ $+> $#error $@ 5.1.3 $: "User address required" R$* $: <> $1 R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3 -R<> $* <$* : $* > $* $#error $@ 5.1.1 $: "colon illegal in host name part" +R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part" R<> $* $1 -R$* < @ . $* > $* $#error $@ 5.1.2 $: "invalid host name" -R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "invalid host name" - -ifdef(`_MAILER_smtp_', -`# handle numeric address spec -R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec -R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send', - `dnl') +R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name" +R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name" # now delete the local info -- note $=O to find characters that cause forwarding R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ... R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here -R< @ $+ > $#error $@ 5.1.1 $: "user address required" +R< @ $+ > $#error $@ 5.1.3 $: "User address required" R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ... +R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo" +R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required" +R$* $=O $* < @ *LOCAL* > + $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ... +R$* < @ *LOCAL* > $: $1 + +# +# Parse1 -- the bottom half of ruleset 0. +# SParse1 +ifdef(`_MAILER_smtp_', +`# handle numeric address spec +R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec +R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send', + `dnl') + +ifdef(`VIRTUSER_TABLE', `dnl # handle virtual users -define(`X', ifdef(`VIRTUSER_TABLE', `', `#'))dnl -X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > -X`'R<@> $+ + $* < @ $* . > +R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ + $* < @ $* . > $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > -X`'R<@> $+ + $* < @ $* . > +R<@> $+ + $* < @ $* . > $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > -X`'R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > -X`'R<@> $+ $: $1 -X`'R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 -X`'R< $+ > $+ < @ $+ > $: $>97 $1 -undefine(`X')dnl +R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ $: $1 +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< $+ > $+ < @ $+ > $: $>97 $1', +`dnl') # short circuit local delivery so forwarded email works -ifdef(`_MAILER_usenet_', `', `#')dnl -R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially +ifdef(`_MAILER_usenet_', `dnl +R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially', `dnl') ifdef(`_STICKY_LOCAL_DOMAIN_', `R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub R< $+ > $+ < $+ > $>95 < $1 > $2 < $3 > yep .... @@ -714,14 +767,14 @@ R< > $+ < $+ > $#_LOCAL_ $: @ $1 nope, local address', `R$=L < @ $=w . > $#_LOCAL_ $: @ $1 special local names R$+ < @ $=w . > $#_LOCAL_ $: $1 regular local name') -define(`X', ifdef(`MAILER_TABLE', `', `#'))dnl +ifdef(`MAILER_TABLE', `dnl # not local -- try mailer table lookup -X`'R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name -X`'R< $+ . > $* $: < $1 > $2 strip trailing dot -X`'R< $+ > $* $: < $(mailertable $1 $) > $2 lookup -X`'R< $~[ : $+ > $* $>95 < $1 : $2 > $3 check -- resolved? -X`'R< $+ > $* $: $>90 <$1> $2 try domain -undefine(`X')dnl +R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name +R< $+ . > $* $: < $1 > $2 strip trailing dot +R< $+ > $* $: < $(mailertable $1 $) > $2 lookup +R< $~[ : $+ > $* $>95 < $1 : $2 > $3 check -- resolved? +R< $+ > $* $: $>90 <$1> $2 try domain', +`dnl') undivert(4)dnl ifdef(`_NO_UUCP_', `dnl', @@ -774,11 +827,7 @@ R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name # deal with other remote names ifdef(`_MAILER_smtp_', `R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain', -`R$* < @$* > $* $#error $@ 5.1.2 $: Unrecognized host name $2') - -# if this is quoted, strip the quotes and try again -R$+ $: $(dequote $1 $) strip quotes -R$+ $=O $+ $@ $>97 $1 $2 $3 try again +`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name" $2') # handle locally delivered names R$=L $#_LOCAL_ $: @ $1 special local names @@ -797,39 +846,39 @@ R$+ + $* $#_LOCAL_ $@ + $2 $: $1 + * # prepend an empty "forward host" on the front R$+ $: <> $1 -define(`X', ifdef(`LUSER_RELAY', `', `#'))dnl +ifdef(`LUSER_RELAY', `dnl # send unrecognized local users to a relay host -X`'R< > $+ $: < $L . > $( user $1 $) look up user -X`'R< $* > $+ <> $* $: < > $2 $3 found; strip $L -X`'R< $* . > $+ $: < $1 > $2 strip extra dot -undefine(`X')dnl +R< > $+ $: < $L . > $(user $1 $) look up user +R< $* > $+ <> $* $: < > $2 $3 found; strip $L +R< $* . > $+ $: < $1 > $2 strip extra dot', +`dnl') # see if we have a relay or a hub R< > $+ $: < $H > $1 try hub R< > $+ $: < $R > $1 try relay -R< > $+ $: < > < $1 $(dequote "" $&h $) > nope, restore +detail +R< > $+ $: < > < $1 $&h > nope, restore +detail R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part R< > < $+ > + $* $#_LOCAL_ $@ $2 $: @ $1 strip the extra + R< > < $+ > $@ $1 no +detail -R$+ $: $1 $(dequote "" $&h $) add +detail back in +R$+ $: $1 $&h add +detail back in R< local : $* > $* $: $>95 < local : $1 > $2 no host extension R< error : $* > $* $: $>95 < error : $1 > $2 no host extension R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 > +ifdef(`MAILER_TABLE', `dnl ################################################################### ### Ruleset 90 -- try domain part of mailertable entry ### ################################################################### -define(`X', ifdef(`MAILER_TABLE', `', `#'))dnl S90 -X`'R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 -X`'R$* <$~[ : $+ > $* $>95 < $2 : $3 > $4 check -- resolved? -X`'R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again -X`'R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." -X`'R< $~[ : $+ > $* $>95 < $1 : $2 > $3 "." found? -X`'R< $* > $* $@ $2 no mailertable match -undefine(`X')dnl +R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 +R$* <$~[ : $+ > $* $>95 < $2 : $3 > $4 check -- resolved? +R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again +R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." +R< $~[ : $+ > $* $>95 < $1 : $2 > $3 "." found? +R< $* > $* $@ $2 no mailertable match', +`dnl') ################################################################### ### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ### @@ -837,7 +886,7 @@ undefine(`X')dnl S95 R< > $* $@ $1 strip off null relay -R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 R< local : $* > $* $>CanonLocal < $1 > $2 R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -869,33 +918,33 @@ R< $+ > $* $#_LOCAL_ $@ $2 $: $1 S93 +ifdef(`GENERICS_TABLE', `dnl # handle generics database -define(`X', ifdef(`GENERICS_TABLE', `', `#'))dnl ifdef(`_GENERICS_ENTIRE_DOMAIN_', -`X`'R$+ < @ $* $=G . > $: < $1@$2$3 > $1 < @ $2$3 . > @ mark', -`X`'R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark') -X`'R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark -X`'R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 > -X`'R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 > -X`'R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified -X`'R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified -X`'R< > $* $: $1 not found -undefine(`X')dnl +`R$+ < @ $* $=G . > $: < $1@$2$3 > $1 < @ $2$3 . > @ mark', +`R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark') +R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark +R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 > +R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 > +R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified +R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified +R< > $* $: $1 not found', +`dnl') # special case the users that should be exposed R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', `R$=E < @ $* $=M . > $@ $1 < @ $2 $3 . >', `R$=E < @ $=M . > $@ $1 < @ $2 . >') -ifdef(`_LIMITED_MASQUERADE_', `#')dnl -R$=E < @ $=w . > $@ $1 < @ $2 . > +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$=E < @ $=w . > $@ $1 < @ $2 . >') # handle domain-specific masquerading ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', `R$* < @ $* $=M . > $* $: $1 < @ $2 $3 . @ $M > $4 convert masqueraded doms', `R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms') -ifdef(`_LIMITED_MASQUERADE_', `#')dnl -R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3 +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3') R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2 R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null @@ -905,10 +954,9 @@ R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null ################################################################### S94 -ifdef(`_MASQUERADE_ENVELOPE_', `', `#')dnl -R$+ $@ $>93 $1 -ifdef(`_MASQUERADE_ENVELOPE_', `#', `')dnl -R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2 +ifdef(`_MASQUERADE_ENVELOPE_', +`R$+ $@ $>93 $1', +`R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2') ################################################################### ### Ruleset 98 -- local part of ruleset zero (can be null) ### @@ -916,6 +964,298 @@ R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2 S98 undivert(3)dnl + +ifelse(confDELIVERY_MODE, defer, `errprint(`WARNING: Antispam rules not available in deferred delivery mode.')') +ifdef(`ACCESS_TABLE', `dnl +###################################################################### +### LookUpDomain -- search for domain in access database +### +### Parameters: +### <$1> -- key (domain name) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed unchanged through) +###################################################################### + +SLookUpDomain +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$+> <$+> <$*> $@ $>LookUpDomain <$2> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4> + +###################################################################### +### LookUpAddress -- search for host address in access database +### +### Parameters: +### <$1> -- key (dot quadded host address) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed through) +###################################################################### + +SLookUpAddress +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$-> <$+> <$*> $@ $>LookUpAddress <$1> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4>', +`dnl') + +###################################################################### +### ParseRecipient -- Strip off hosts in $=R as well as possibly +### $* $=m or the access database. +### Check user portion for host separators. +### +### Parameters: +### $1 -- full recipient address +### +### Returns: +### parsed, non-local-relaying address +###################################################################### + +SParseRecipient +R$* $: <?> $>Parse0 $>3 $1 +R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots +R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part + +# if no $=O character, no host in the user portion, we are done +R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4> +R<?> $* $@ $1 + +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +# if we relay, check username portion for user%host so host can be checked also +R<NO> $* < @ $* $=m > $: <RELAY> $1 < @ $2 $3 >', `dnl') +ifdef(`_RELAY_HOSTS_ONLY_', +`R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $* > $: <$(access $2 $: NO $)> $1 < @ $2 >',`dnl')', +`R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $* > $: $>LookUpDomain <$2> <NO> <$1 < @ $2 >> +R<$+> <$+> $: <$1> $2',`dnl')') +R<RELAY> $* < @ $* > $@ $>ParseRecipient $1 +R<$-> $* $@ $2 + +###################################################################### +### check_relay -- check hostname/address on SMTP startup +###################################################################### + +SLocal_check_relay +Scheck_relay +R$* $: $1 $| $>"Local_check_relay" $1 +R$* $| $* $| $#$* $#$3 +R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2 + +SBasic_check_relay +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`ACCESS_TABLE', `dnl +R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 > +R<?> < $+ > $: $>LookUpAddress < $1 > <OK> < $1 > +R<OK> < $* > $: $1 +R<RELAY> < $* > $: $1 +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<DISCARD> $* $#discard $: discard +R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + +ifdef(`_RBL_', `dnl +# MAPS project checks -- http://maps.vix.com/ +R$* $: $&{client_addr} +R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +ROK $@ OK +R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused; see http://maps.vix.com/rbl/"', +`dnl') + +###################################################################### +### check_mail -- check SMTP ``MAIL FROM:'' command argument +###################################################################### + +SLocal_check_mail +Scheck_mail +R$* $: $1 $| $>"Local_check_mail" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_mail" $1 + +SBasic_check_mail +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +R<> $@ <OK> +R$* $: <?> $>Parse0 $>3 $1 make domain canonical +R<?> $* < @ $+ . > $* <?> $1 < @ $2 > $3 strip trailing dots +# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc) +R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4 +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_', +`R<?> $* < @ $+ > $* $: <OK> $1 < @ $2 > $3 ... unresolvable OK', +`R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3 +R<? $* <$->> $* < @ $+ > $* + $: <$2> $3 < @ $4 > $5') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of @localhost on address +R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost > +R<$+> $* < @localhost.$m > + $: < ? $&{client_name} > <$1> $2 < @localhost.$m > +ifdef(`_NO_UUCP_', `dnl', +`R<$+> $* < @localhost.UUCP > + $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >') +R<? $=w> <$+> $* <?> <$2> $3 +R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required" +R<?> <$+> $* $: <$1> $2') + +ifdef(`ACCESS_TABLE', `dnl +# lookup localpart (user@) +R<$+> $* < @ $+ > $* $: <USER $(access $2@ $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try full address (user@domain rest) +R<USER ?> <$+> $* < @ $* > $* + $: <USER $(access $2@$3$4 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try address (user@domain) +R<USER ?> <$+> $+ < @ $+ > $* + $: <USER $(access $2@$3 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try (sub)domain (domain) +R<USER ?> <$+> $* < @ $+ > $* + $: $>LookUpDomain <$3> <$1> <> +# check unqualified user in access database +R<?> $* $: <USER $(access $1@ $: ? $) > <?> $1 +# retransform for further use +R<USER $+> <$+> $* $: <$1> $3', +`dnl') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of no @domain on address +R<?> $* $: < ? $&{client_name} > $1 +R<?> $* $@ <OK> ...local unqualed ok +R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required" + ...remote is not') +# check results +R<?> $* $@ <OK> +R<OK> $* $@ <OK> +R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve" +R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist" +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ <RELAY> +R<DISCARD> $* $#discard $: discard +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<$+> $* $#error $@ 5.7.1 $: $1 error from access db', +`dnl') + +###################################################################### +### check_rcpt -- check SMTP ``RCPT TO:'' command argument +###################################################################### + +SLocal_check_rcpt +Scheck_rcpt +R$* $: $1 $| $>"Local_check_rcpt" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_rcpt" $1 + +SBasic_check_rcpt +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`_LOOSE_RELAY_CHECK_',`dnl +R$* $: $>Parse0 $>3 $1 +R$* < @ $* . > $1 < @ $2 > strip trailing dots', +`R$* $: $>ParseRecipient $1 strip relayable hosts') + +ifdef(`_BLACKLIST_RCPT_',`dnl +ifdef(`ACCESS_TABLE', `dnl +# blacklist local users or any host from receiving mail +R$* $: <?> $1 +R<?> $+ < @ $=w > $: <> <USER $1> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ < @ $* > $: <> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ $: <> <USER $1> <$1> +R<> <USER $+> $* $: <$(access $1 $: $)> $2 +R<> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<OK> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<OK> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<> <$*> $: $1 +R<OK> <$*> $: $1 +R<RELAY> <$*> $: $1 +R<REJECT> $* $#error $@ 5.2.1 $: "550 Mailbox disabled for this recipient" +R<$+> $* $#error $@ 5.2.1 $: $1 error from access db', `dnl')', `dnl') + +ifdef(`_PROMISCUOUS_RELAY_', `dnl', `dnl +# anything terminating locally is ok +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$+ < @ $* $=m > $@ OK', `dnl') +R$+ < @ $=w > $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$+ < @ $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', +`R$+ < @ $* $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: $>LookUpDomain <$2> <?> <$1 < @ $2 >>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# allow relaying for hosts which we MX serve +R$+ < @ $* > $: < : $(mxserved $2 $) : > $1 < @ $2 > +R< : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1 +R<$* : $=w . : $*> $* $@ OK +R<$*> $* $: $2', +`dnl') + +# check for local user (i.e. unqualified address) +R$* $: <?> $1 +R<?> $+ < @ $+ > $: <REMOTE> $1 < @ $2 > +# local user is ok +R<?> $+ $@ OK +R<$+> $* $: $2 + +# anything originating locally is ok +R$* $: <?> $&{client_name} +# check if bracketed IP address (forward lookup != reverse lookup) +R<?> [$+] $: <BAD> [$1] +# pass to name server to make hostname canonical +R<?> $* $~P $: <?> $[ $1 $2 $] +R<$-> $* $: $2 +R$* . $1 strip trailing dots +R$@ $@ OK +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$* $=m $@ OK', `dnl') +R$=w $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: <$(access $1 $: ? $)> <$1>',`dnl')', +`R$* $=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpDomain <$1> <?> <$1>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +# check IP address +R$* $: $&{client_addr} +R$@ $@ OK originated locally +R0 $@ OK originated locally +R$=R $* $@ OK relayable IP address +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpAddress <$1> <?> <$1> +R<RELAY> $* $@ RELAY relayable IP address +R<$*> <$*> $: $2', `dnl') +R$* $: [ $1 ] put brackets around it... +R$=w $@ OK ... and see if it is local + +ifdef(`_RELAY_LOCAL_FROM_', `dnl +# anything with a local FROM is ok +R$* $: $1 $| $>Parse0 $>3 $&f +R$* $| $+ < @ $=w . > $@ OK FROM local +R$* $| $* $: $1 +', `dnl') + +# anything else is bogus +R$* $#error $@ 5.7.1 $: "550 Relaying denied"') + undivert(9)dnl # ###################################################################### diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4 new file mode 100644 index 000000000000..2db220271ad5 --- /dev/null +++ b/contrib/sendmail/cf/m4/version.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +VERSIONID(`@(#)version.m4 8.9.1.1 (Berkeley) 7/2/98') +# +divert(0) +# Configuration version number +DZ8.9.1`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff --git a/usr.sbin/sendmail/cf/mailer/cyrus.m4 b/contrib/sendmail/cf/mailer/cyrus.m4 index 47a4a5afd6a8..6e4badcce29b 100644 --- a/usr.sbin/sendmail/cf/mailer/cyrus.m4 +++ b/contrib/sendmail/cf/mailer/cyrus.m4 @@ -1,5 +1,16 @@ PUSHDIVERT(-1) # +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# This code incorporates code from Carnegie Mellon University, whose +# copyright notice and conditions of redistribution are as follows: +# +#*************************************************************************** # (C) Copyright 1995 by Carnegie Mellon University # # All Rights Reserved @@ -23,7 +34,7 @@ PUSHDIVERT(-1) # Contributed to Berkeley by John Gardiner Myers <jgm+@CMU.EDU>. # -ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@')') +ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@/:|')') ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)') ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')') ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')') @@ -36,7 +47,7 @@ POPDIVERT ### Cyrus Mailer specification ### ################################################## -VERSIONID(`@(#)cyrus.m4 8.4 (Carnegie Mellon) 9/2/96') +VERSIONID(`@(#)cyrus.m4 8.9 (Carnegie Mellon) 5/19/98') Mcyrus, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnPq', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix, ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, diff --git a/contrib/sendmail/cf/mailer/fax.m4 b/contrib/sendmail/cf/mailer/fax.m4 new file mode 100644 index 000000000000..581cfed088c3 --- /dev/null +++ b/contrib/sendmail/cf/mailer/fax.m4 @@ -0,0 +1,35 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# This assumes you already have Sam Leffler's HylaFAX software. +# +# Tested with HylaFAX 4.0pl1 +# + +ifdef(`FAX_MAILER_ARGS',, + `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)') +ifdef(`FAX_MAILER_PATH',, + `define(`FAX_MAILER_PATH', /usr/local/bin/faxmail)') +ifdef(`FAX_MAILER_MAX',, + `define(`FAX_MAILER_MAX', 100000)') +POPDIVERT +#################################### +### FAX Mailer specification ### +#################################### + +VERSIONID(`@(#)fax.m4 8.11 (Berkeley) 5/19/98') + +Mfax, P=FAX_MAILER_PATH, F=DFMhu, S=14, R=24, M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix, + A=FAX_MAILER_ARGS + +LOCAL_CONFIG +CPFAX diff --git a/contrib/sendmail/cf/mailer/local.m4 b/contrib/sendmail/cf/mailer/local.m4 new file mode 100644 index 000000000000..705e723c6ca4 --- /dev/null +++ b/contrib/sendmail/cf/mailer/local.m4 @@ -0,0 +1,74 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmn9')') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/mail)') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d $u')') +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `eu9')') +ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /bin/sh)') +ifdef(`LOCAL_SHELL_ARGS',, `define(`LOCAL_SHELL_ARGS', `sh -c $u')') +ifdef(`LOCAL_SHELL_DIR',, `define(`LOCAL_SHELL_DIR', `$z:/')') +POPDIVERT + +################################################## +### Local and Program Mailer specification ### +################################################## + +VERSIONID(`@(#)local.m4 8.30 (Berkeley) 6/30/98') + +Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40, + _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix, + A=LOCAL_MAILER_ARGS +Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(`lsDFMoq', LOCAL_SHELL_FLAGS), S=10/30, R=20/40, D=LOCAL_SHELL_DIR, + _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix, + A=LOCAL_SHELL_ARGS + +# +# Envelope sender rewriting +# +S10 +R<@> $n errors to mailer-daemon +R@ <@ $*> $n temporarily bypass Sun bogosity +R$+ $: $>50 $1 add local domain if needed +R$* $: $>94 $1 do masquerading + +# +# Envelope recipient rewriting +# +S20 +R$+ < @ $* > $: $1 strip host part + +# +# Header sender rewriting +# +S30 +R<@> $n errors to mailer-daemon +R@ <@ $*> $n temporarily bypass Sun bogosity +R$+ $: $>50 $1 add local domain if needed +R$* $: $>93 $1 do masquerading + +# +# Header recipient rewriting +# +S40 +R$+ $: $>50 $1 add local domain if needed +ifdef(`_ALL_MASQUERADE_', `dnl +R$* $: $>93 $1 do all-masquerading', `dnl') + +# +# Common code to add local domain name (only if always-add-domain) +# +S50 +ifdef(`_ALWAYS_ADD_DOMAIN_', `dnl +R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified +R$+ $@ $1 < @ *LOCAL* > add local qualification', +`dnl') diff --git a/usr.sbin/sendmail/cf/mailer/mail11.m4 b/contrib/sendmail/cf/mailer/mail11.m4 index a8781cf86861..5c9d94810c6b 100644 --- a/usr.sbin/sendmail/cf/mailer/mail11.m4 +++ b/contrib/sendmail/cf/mailer/mail11.m4 @@ -1,5 +1,12 @@ PUSHDIVERT(-1) # +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# # Not exciting enough to bother with copyrights and most of the # rulesets are based from those provided by DEC. # Barb Dijker, Labyrinth Computer Services, barb@labyrinth.com @@ -33,7 +40,7 @@ POPDIVERT ### UTK-MAIL11 Mailer specification ### ########################################### -VERSIONID(`@(#)mail11.m4 8.4 (Berkeley) 3/18/97') +VERSIONID(`@(#)mail11.m4 8.8 (Berkeley) 5/19/98') Mmail11, P=MAIL11_MAILER_PATH, F=MAIL11_MAILER_FLAGS, S=15, R=25, A=MAIL11_MAILER_ARGS diff --git a/contrib/sendmail/cf/mailer/phquery.m4 b/contrib/sendmail/cf/mailer/phquery.m4 new file mode 100644 index 000000000000..5f1b6b41ce86 --- /dev/null +++ b/contrib/sendmail/cf/mailer/phquery.m4 @@ -0,0 +1,29 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Contributed by Kimmo Suominen <kim@tac.nyc.ny.us>. +# + +ifdef(`PH_MAILER_PATH',, `define(`PH_MAILER_PATH', /usr/local/etc/phquery)') +ifdef(`PH_MAILER_FLAGS',, `define(`PH_MAILER_FLAGS', `ehmu')') +ifdef(`PH_MAILER_ARGS',, `define(`PH_MAILER_ARGS', `phquery -- $u')') + +POPDIVERT + +#################################### +### PH Mailer specification ### +#################################### + +VERSIONID(`@(#)phquery.m4 8.6 (Berkeley) 5/19/98') + +Mph, P=PH_MAILER_PATH, F=CONCAT(`nrDFM', PH_MAILER_FLAGS), S=10, R=20/40, + A=PH_MAILER_ARGS diff --git a/contrib/sendmail/cf/mailer/pop.m4 b/contrib/sendmail/cf/mailer/pop.m4 new file mode 100644 index 000000000000..a4f3128f19fd --- /dev/null +++ b/contrib/sendmail/cf/mailer/pop.m4 @@ -0,0 +1,31 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +ifdef(`POP_MAILER_PATH',, `define(`POP_MAILER_PATH', /usr/lib/mh/spop)') +ifdef(`POP_MAILER_FLAGS',, `define(`POP_MAILER_FLAGS', `Penu')') +ifdef(`POP_MAILER_ARGS',, `define(`POP_MAILER_ARGS', `pop $u')') + +POPDIVERT + +#################################### +### POP Mailer specification ### +#################################### + +VERSIONID(`@(#)pop.m4 8.11 (Berkeley) 5/19/98') + +Mpop, P=POP_MAILER_PATH, F=CONCAT(`lsDFMq', POP_MAILER_FLAGS), S=10, R=20/40, T=DNS/RFC822/X-Unix, + A=POP_MAILER_ARGS + +LOCAL_CONFIG +# POP mailer is a pseudo-domain +CPPOP diff --git a/contrib/sendmail/cf/mailer/procmail.m4 b/contrib/sendmail/cf/mailer/procmail.m4 new file mode 100644 index 000000000000..b6131c06678d --- /dev/null +++ b/contrib/sendmail/cf/mailer/procmail.m4 @@ -0,0 +1,32 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +ifdef(`PROCMAIL_MAILER_PATH',, + `ifdef(`PROCMAIL_PATH', + `define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)', + `define(`PROCMAIL_MAILER_PATH', /usr/local/bin/procmail)')') +ifdef(`PROCMAIL_MAILER_FLAGS',, + `define(`PROCMAIL_MAILER_FLAGS', `SPhnu9')') +ifdef(`PROCMAIL_MAILER_ARGS',, + `define(`PROCMAIL_MAILER_ARGS', `procmail -Y -m $h $f $u')') + +POPDIVERT + +######################*****############## +### PROCMAIL Mailer specification ### +##################*****################## + +VERSIONID(`@(#)procmail.m4 8.11 (Berkeley) 5/19/98') + +Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix, + ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS diff --git a/usr.sbin/sendmail/cf/mailer/smtp.m4 b/contrib/sendmail/cf/mailer/smtp.m4 index c816c736001b..d70195e70669 100644 --- a/usr.sbin/sendmail/cf/mailer/smtp.m4 +++ b/contrib/sendmail/cf/mailer/smtp.m4 @@ -1,36 +1,14 @@ PUSHDIVERT(-1) # -# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# # ifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')') ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')') @@ -44,7 +22,7 @@ POPDIVERT ### SMTP Mailer specification ### ##################################### -VERSIONID(`@(#)smtp.m4 8.33 (Berkeley) 7/9/96') +VERSIONID(`@(#)smtp.m4 8.38 (Berkeley) 5/19/98') Msmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990, _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, diff --git a/contrib/sendmail/cf/mailer/usenet.m4 b/contrib/sendmail/cf/mailer/usenet.m4 new file mode 100644 index 000000000000..6c92f5f8dadf --- /dev/null +++ b/contrib/sendmail/cf/mailer/usenet.m4 @@ -0,0 +1,26 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +ifdef(`USENET_MAILER_PATH',, `define(`USENET_MAILER_PATH', /usr/lib/news/inews)') +ifdef(`USENET_MAILER_FLAGS',, `define(`USENET_MAILER_FLAGS', `rlsDFMmn')') +ifdef(`USENET_MAILER_ARGS',, `define(`USENET_MAILER_ARGS', `inews -m -h -n')') +POPDIVERT +#################################### +### USENET Mailer specification ### +#################################### + +VERSIONID(`@(#)usenet.m4 8.10 (Berkeley) 5/19/98') + +Musenet, P=USENET_MAILER_PATH, F=USENET_MAILER_FLAGS, S=10, R=20, + _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix, + A=USENET_MAILER_ARGS $u diff --git a/usr.sbin/sendmail/cf/mailer/uucp.m4 b/contrib/sendmail/cf/mailer/uucp.m4 index 023982f9b936..cd2619db47ec 100644 --- a/usr.sbin/sendmail/cf/mailer/uucp.m4 +++ b/contrib/sendmail/cf/mailer/uucp.m4 @@ -1,36 +1,14 @@ PUSHDIVERT(-1) # -# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. # 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. +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. # -# 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. # ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') @@ -44,7 +22,7 @@ POPDIVERT ### UUCP Mailer specification ### ##################################### -VERSIONID(`@(#)uucp.m4 8.25 (Berkeley) 3/16/97') +VERSIONID(`@(#)uucp.m4 8.30 (Berkeley) 5/19/98') # # There are innumerable variations on the UUCP mailer. It really diff --git a/contrib/sendmail/cf/ostype/aix2.m4 b/contrib/sendmail/cf/ostype/aix2.m4 new file mode 100644 index 000000000000..1e77c1cd1e39 --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix2.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)aix2.m4 8.8 (Berkeley) 5/19/98') +define(`LOCAL_MAILER_PATH', /bin/bellmail)dnl +define(`LOCAL_MAILER_ARGS', mail $u)dnl +define(`LOCAL_MAILER_FLAGS', `mn9')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/aix3.m4 b/contrib/sendmail/cf/ostype/aix3.m4 new file mode 100644 index 000000000000..2cfc8c58220a --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix3.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)aix3.m4 8.12 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail $u)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/aix4.m4 b/contrib/sendmail/cf/ostype/aix4.m4 new file mode 100644 index 000000000000..06c7d1aba15e --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)aix4.m4 8.7 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail -F $g $u)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/altos.m4 b/contrib/sendmail/cf/ostype/altos.m4 new file mode 100644 index 000000000000..38a07a0a3199 --- /dev/null +++ b/contrib/sendmail/cf/ostype/altos.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Contributed by Tim Rice <tim@trr.metro.NET>. +# + +divert(0) +VERSIONID(`@(#)altos.m4 8.9 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mPuhCE9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/amdahl-uts.m4 b/contrib/sendmail/cf/ostype/amdahl-uts.m4 new file mode 100644 index 000000000000..022b50741371 --- /dev/null +++ b/contrib/sendmail/cf/ostype/amdahl-uts.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)amdahl-uts.m4 8.10 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSn9')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/aux.m4 b/contrib/sendmail/cf/ostype/aux.m4 new file mode 100644 index 000000000000..2adbfe4d221a --- /dev/null +++ b/contrib/sendmail/cf/ostype/aux.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)aux.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mn9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d -r $f $u')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/bsd4.3.m4 b/contrib/sendmail/cf/ostype/bsd4.3.m4 new file mode 100644 index 000000000000..47c02cc764ae --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsd4.3.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)bsd4.3.m4 8.9 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl diff --git a/contrib/sendmail/cf/ostype/bsd4.4.m4 b/contrib/sendmail/cf/ostype/bsd4.4.m4 new file mode 100644 index 000000000000..c023de544011 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsd4.4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# + +divert(0) +VERSIONID(`@(#)bsd4.4.m4 8.9 (Berkeley) 5/19/98') +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/misc/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl diff --git a/contrib/sendmail/cf/ostype/bsdi1.0.m4 b/contrib/sendmail/cf/ostype/bsdi1.0.m4 new file mode 100644 index 000000000000..48d60b333808 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsdi1.0.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)bsdi1.0.m4 8.7 (Berkeley) 5/19/98')dnl +include(_CF_DIR_`'ostype/bsd4.4.m4)dnl diff --git a/contrib/sendmail/cf/ostype/bsdi2.0.m4 b/contrib/sendmail/cf/ostype/bsdi2.0.m4 new file mode 100644 index 000000000000..73b0447ec369 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsdi2.0.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)bsdi2.0.m4 8.6 (Berkeley) 5/19/98')dnl +include(_CF_DIR_`'ostype/bsd4.4.m4)dnl diff --git a/contrib/sendmail/cf/ostype/dgux.m4 b/contrib/sendmail/cf/ostype/dgux.m4 new file mode 100644 index 000000000000..eeb8c4de3a2d --- /dev/null +++ b/contrib/sendmail/cf/ostype/dgux.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)dgux.m4 8.10 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', m9)')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl +LOCAL_CONFIG +E_FORCE_MAIL_LOCAL_=yes diff --git a/contrib/sendmail/cf/ostype/domainos.m4 b/contrib/sendmail/cf/ostype/domainos.m4 new file mode 100644 index 000000000000..c03dee5fc94f --- /dev/null +++ b/contrib/sendmail/cf/ostype/domainos.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)domainos.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /usr/lib/aliases) +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)') +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/dynix3.2.m4 b/contrib/sendmail/cf/ostype/dynix3.2.m4 new file mode 100644 index 000000000000..94d59b5f3712 --- /dev/null +++ b/contrib/sendmail/cf/ostype/dynix3.2.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)dynix3.2.m4 8.9 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/gnuhurd.m4 b/contrib/sendmail/cf/ostype/gnuhurd.m4 new file mode 100644 index 000000000000..d7127f6b7eb8 --- /dev/null +++ b/contrib/sendmail/cf/ostype/gnuhurd.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1997 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# + +divert(0) +VERSIONID(`@(#)gnuhurd.m4 8.7 (Berkeley) 5/19/98') +ifdef(`HELP_FILE',, `define(`HELP_FILE', /share/misc/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /libexec/mail.local)')dnl +define(`confEBINDIR', `/libexec')dnl diff --git a/contrib/sendmail/cf/ostype/hpux10.m4 b/contrib/sendmail/cf/ostype/hpux10.m4 new file mode 100644 index 000000000000..9499474de74b --- /dev/null +++ b/contrib/sendmail/cf/ostype/hpux10.m4 @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)hpux10.m4 8.13 (Berkeley) 5/19/98') + +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/mail/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/rmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /usr/bin/sh)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +dnl +dnl For maximum compability with HP-UX, use: +dnl define(`confME_TOO', True)dnl diff --git a/contrib/sendmail/cf/ostype/hpux9.m4 b/contrib/sendmail/cf/ostype/hpux9.m4 new file mode 100644 index 000000000000..19579caef067 --- /dev/null +++ b/contrib/sendmail/cf/ostype/hpux9.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)hpux9.m4 8.18 (Berkeley) 5/19/98') + +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/bin/rmail')')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl +dnl +dnl For maximum compability with HP-UX, use: +dnl define(`confME_TOO', True)dnl diff --git a/contrib/sendmail/cf/ostype/irix4.m4 b/contrib/sendmail/cf/ostype/irix4.m4 new file mode 100644 index 000000000000..69890e6acbce --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)irix4.m4 8.13 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehm9)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/irix5.m4 b/contrib/sendmail/cf/ostype/irix5.m4 new file mode 100644 index 000000000000..32f23756e005 --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix5.m4 @@ -0,0 +1,40 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Contributed by Kari E. Hurtta <Kari.Hurtta@dionysos.fmi.fi> +# + +# +# Notes: +# - SGI's /etc/sendmail.cf defines also 'u' for local mailer flags -- you +# perhaps don't want it. +# - Perhaps is should also add define(`LOCAL_MAILER_CHARSET', iso-8859-1) +# put some Asian sites may prefer otherwise -- or perhaps not. +# - SGI's /etc/sendmail.cf seems use: A=mail -s -d $u +# It seems work without that -s however. +# - SGI's /etc/sendmail.cf set's default uid and gid to 998 (guest) +# - In SGI seems that TZ variable is needed that correct time is marked to +# syslog +# - helpfile is in /etc/sendmail.hf in SGI's /etc/sendmail.cf +# + +divert(0) +VERSIONID(`@(#)irix5.m4 8.10 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confDEF_USER_ID', `998:998')dnl +define(`confTIME_ZONE', USE_TZ)dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/irix6.m4 b/contrib/sendmail/cf/ostype/irix6.m4 new file mode 100644 index 000000000000..f046dbf0e8fb --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix6.m4 @@ -0,0 +1,40 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Contributed by Kari E. Hurtta <Kari.Hurtta@dionysos.fmi.fi> +# + +# +# Notes: +# - SGI's /etc/sendmail.cf defines also 'u' for local mailer flags -- you +# perhaps don't want it. +# - Perhaps is should also add define(`LOCAL_MAILER_CHARSET', iso-8859-1) +# put some Asian sites may prefer otherwise -- or perhaps not. +# - SGI's /etc/sendmail.cf seems use: A=mail -s -d $u +# It seems work without that -s however. +# - SGI's /etc/sendmail.cf set's default uid and gid to 998 (guest) +# - In SGI seems that TZ variable is needed that correct time is marked to +# syslog +# - helpfile is in /etc/sendmail.hf in SGI's /etc/sendmail.cf +# + +divert(0) +VERSIONID(`@(#)irix6.m4 8.7 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confDEF_USER_ID', `998:998')dnl +define(`confTIME_ZONE', USE_TZ)dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/isc4.1.m4 b/contrib/sendmail/cf/ostype/isc4.1.m4 new file mode 100644 index 000000000000..1869eecfc636 --- /dev/null +++ b/contrib/sendmail/cf/ostype/isc4.1.m4 @@ -0,0 +1,27 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# + +divert(0) +VERSIONID(`@(#)isc4.1.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail -s $u')')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `humS9')')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/lmail)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -gC $h!rmail ($u)')')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/linux.m4 b/contrib/sendmail/cf/ostype/linux.m4 new file mode 100644 index 000000000000..d7c3b190b47a --- /dev/null +++ b/contrib/sendmail/cf/ostype/linux.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)linux.m4 8.7 (Berkeley) 5/19/98') +define(`LOCAL_MAILER_PATH', /bin/mail.local)dnl diff --git a/contrib/sendmail/cf/ostype/maxion.m4 b/contrib/sendmail/cf/ostype/maxion.m4 new file mode 100644 index 000000000000..c07ce876e300 --- /dev/null +++ b/contrib/sendmail/cf/ostype/maxion.m4 @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Concurrent Computer Corporation Maxion system support contributed +# by Donald R. Laster Jr. <Laster@access.digex.com>. +# + +divert(0) +VERSIONID(`@(#)maxion.m4 8.10 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', `/etc/ucbmail/aliases')dnl +define(`HELP_FILE', `/etc/ucbmail/sendmail.hf')dnl +define(`QUEUE_DIR', `/var/spool/mqueue')dnl +define(`STATUS_FILE', `/var/adm/log/sendmail.st')dnl +define(`LOCAL_MAILER_PATH', `/usr/bin/mail')dnl +define(`LOCAL_MAILER_FLAGS',`rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`LOCAL_MAILER_ARGS', `mail $u')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl +divert(-1) diff --git a/contrib/sendmail/cf/ostype/mklinux.m4 b/contrib/sendmail/cf/ostype/mklinux.m4 new file mode 100644 index 000000000000..2f40c72d8e2c --- /dev/null +++ b/contrib/sendmail/cf/ostype/mklinux.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# MkLinux support contributed by Paul DuBois <dubois@primate.wisc.edu> +# + +divert(0) +VERSIONID(`@(#)mklinux.m4 8.7 (Berkeley) 5/19/98') +ifdef(`STATUS_FILE',, + `define(`STATUS_FILE', /var/log/sendmail.st)') +ifdef(`PROCMAIL_MAILER_PATH',, + define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')) +FEATURE(local_procmail) diff --git a/contrib/sendmail/cf/ostype/nextstep.m4 b/contrib/sendmail/cf/ostype/nextstep.m4 new file mode 100644 index 000000000000..73c995fb983c --- /dev/null +++ b/contrib/sendmail/cf/ostype/nextstep.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)nextstep.m4 8.14 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /etc/sendmail/aliases)dnl +define(`confCW_FILE', /etc/sendmail/sendmail.cw)dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/sendmail/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmnP9')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `euP')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/osf1.m4 b/contrib/sendmail/cf/ostype/osf1.m4 new file mode 100644 index 000000000000..fe17b35ee6c9 --- /dev/null +++ b/contrib/sendmail/cf/ostype/osf1.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)osf1.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/adm/sendmail/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/adm/sendmail/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl +define(`confDEF_USER_ID', `daemon') diff --git a/contrib/sendmail/cf/ostype/powerux.m4 b/contrib/sendmail/cf/ostype/powerux.m4 new file mode 100644 index 000000000000..dc23c7ed2956 --- /dev/null +++ b/contrib/sendmail/cf/ostype/powerux.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)powerux.m4 8.7 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /etc/mail/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /etc/mail/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl +define(`LOCAL_MAILER_FLAGS', `mn9')dnl +define(`LOCAL_MAILER_ARGS', `rmail $u')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/local/lib')dnl diff --git a/contrib/sendmail/cf/ostype/ptx2.m4 b/contrib/sendmail/cf/ostype/ptx2.m4 new file mode 100644 index 000000000000..83a05580b14a --- /dev/null +++ b/contrib/sendmail/cf/ostype/ptx2.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1994 Eric P. Allman. All rights reserved. +# Copyright (c) 1994 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +# Support for DYNIX/ptx 2.x. + +divert(0) +VERSIONID(`@(#)ptx2.m4 8.11 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/bin/mail')dnl +define(`LOCAL_MAILER_FLAGS', `fmn9')dnl +define(`LOCAL_SHELL_FLAGS', `eu')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/qnx.m4 b/contrib/sendmail/cf/ostype/qnx.m4 new file mode 100644 index 000000000000..10624dde39f1 --- /dev/null +++ b/contrib/sendmail/cf/ostype/qnx.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1997 Eric P. Allman. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Contributed by Glen McCready <glen@qnx.com> +# + +divert(0) +VERSIONID(`@(#)qnx.m4 8.7 (Berkeley) 5/19/98') +define(`QUEUE_DIR', /usr/spool/mqueue)dnl +define(`HELP_FILE', /etc/sendmail.hf)dnl +define(`LOCAL_MAILER_ARGS', `mail $u')dnl +define(`LOCAL_MAILER_FLAGS', `Sh')dnl +define(`LOCAL_MAILER_PATH', /usr/bin/mailx)dnl +define(`UUCP_MAILER_ARGS', `uux - -r -z -a$f $h!rmail ($u)')dnl diff --git a/contrib/sendmail/cf/ostype/riscos4.5.m4 b/contrib/sendmail/cf/ostype/riscos4.5.m4 new file mode 100644 index 000000000000..02db750c023b --- /dev/null +++ b/contrib/sendmail/cf/ostype/riscos4.5.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)riscos4.5.m4 8.10 (Berkeley) 5/19/98') + +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +define(`ALIAS_FILE', `/usr/lib/aliases')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', `/usr/spool/mqueue')')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', `/usr/lib/sendmail.hf')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m4 b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 index ebce4991def7..356c984fa422 100644 --- a/usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m4 +++ b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 @@ -1,10 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# # # SCO UnixWare 2.1.2 ostype file # # Contributed by Christopher Durham <chrisdu@SCO.COM> of SCO. # divert(0) -VERSIONID(`@(#)sco-uw-2.1.m4 8.1 (Berkeley) 7/6/97') +VERSIONID(`@(#)sco-uw-2.1.m4 8.6 (Berkeley) 5/19/98') define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl @@ -14,3 +22,4 @@ define(`LOCAL_MAILER_FLAGS', `fhCEn9')dnl define(`LOCAL_SHELL_FLAGS', `ehuP')dnl define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl define(`LOCAL_MAILER_ARGS',`rmail $u')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sco3.2.m4 b/contrib/sendmail/cf/ostype/sco3.2.m4 new file mode 100644 index 000000000000..1c58585035be --- /dev/null +++ b/contrib/sendmail/cf/ostype/sco3.2.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)sco3.2.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', PuhCE9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sinix.m4 b/contrib/sendmail/cf/ostype/sinix.m4 new file mode 100644 index 000000000000..51c469d8d741 --- /dev/null +++ b/contrib/sendmail/cf/ostype/sinix.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)sinix.m4 8.8 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +define(`LOCAL_MAILER_PATH', `/bin/mail.local')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/ostype/solaris2.m4 b/contrib/sendmail/cf/ostype/solaris2.m4 new file mode 100644 index 000000000000..5a90175bd363 --- /dev/null +++ b/contrib/sendmail/cf/ostype/solaris2.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)solaris2.m4 8.15 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `SnE9')') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -f $g -d $u')') +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/solaris2.ml.m4 b/contrib/sendmail/cf/ostype/solaris2.ml.m4 new file mode 100644 index 000000000000..0995d50ff18e --- /dev/null +++ b/contrib/sendmail/cf/ostype/solaris2.ml.m4 @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# This ostype file is suitable for use on Solaris 2.x systems that +# have mail.local installed. It is my understanding that this is +# standard as of Solaris 2.5. +# + +divert(0) +VERSIONID(`@(#)solaris2.ml.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSmn9')') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail.local -d $u')') +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sunos3.5.m4 b/contrib/sendmail/cf/ostype/sunos3.5.m4 new file mode 100644 index 000000000000..540d36e60756 --- /dev/null +++ b/contrib/sendmail/cf/ostype/sunos3.5.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)sunos3.5.m4 8.7 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sunos4.1.m4 b/contrib/sendmail/cf/ostype/sunos4.1.m4 new file mode 100644 index 000000000000..aec96d2fdc9c --- /dev/null +++ b/contrib/sendmail/cf/ostype/sunos4.1.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)sunos4.1.m4 8.7 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/svr4.m4 b/contrib/sendmail/cf/ostype/svr4.m4 new file mode 100644 index 000000000000..1451414797fe --- /dev/null +++ b/contrib/sendmail/cf/ostype/svr4.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)svr4.m4 8.10 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /usr/ucblib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl +define(`LOCAL_MAILER_FLAGS', `rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/ostype/ultrix4.m4 b/contrib/sendmail/cf/ostype/ultrix4.m4 new file mode 100644 index 000000000000..874fa8b89d6b --- /dev/null +++ b/contrib/sendmail/cf/ostype/ultrix4.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)ultrix4.m4 8.8 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/unknown.m4 b/contrib/sendmail/cf/ostype/unknown.m4 new file mode 100644 index 000000000000..bb85604efa13 --- /dev/null +++ b/contrib/sendmail/cf/ostype/unknown.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# + +divert(0) +VERSIONID(`@(#)unknown.m4 8.6 (Berkeley) 5/19/98') +errprint(`*** ERROR: You have not specified a valid operating system type.') +errprint(` Use the OSTYPE macro to select a valid system type. This') +errprint(` is necessary in order to get the proper pathnames and flags') +errprint(` appropriate for your environment.') diff --git a/contrib/sendmail/cf/ostype/uxpds.m4 b/contrib/sendmail/cf/ostype/uxpds.m4 new file mode 100644 index 000000000000..2fb147eb5223 --- /dev/null +++ b/contrib/sendmail/cf/ostype/uxpds.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# Definitions for UXP/DS (Fujitsu/ICL DS/90 series) +# Diego R. Lopez, CICA (Seville). 1995 +# + +divert(0) +VERSIONID(`@(#)uxpds.m4 8.9 (Berkeley) 5/19/98') + +define(`confDEF_GROUP_ID', `6') +define(`ALIAS_FILE', /usr/ucblib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl +define(`LOCAL_MAILER_FLAGS', `rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$f -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/sh/makeinfo.sh b/contrib/sendmail/cf/sh/makeinfo.sh new file mode 100644 index 000000000000..424c699d649f --- /dev/null +++ b/contrib/sendmail/cf/sh/makeinfo.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the sendmail distribution. +# +# +# @(#)makeinfo.sh 8.11 (Berkeley) 5/19/98 +# + +usewhoami=0 +usehostname=0 +for p in `echo $PATH | sed 's/:/ /g'` +do + if [ "x$p" = "x" ] + then + p="." + fi + if [ -f $p/whoami ] + then + usewhoami=1 + if [ $usehostname -ne 0 ] + then + break; + fi + fi + if [ -f $p/hostname ] + then + usehostname=1 + if [ $usewhoami -ne 0 ] + then + break; + fi + fi +done +if [ $usewhoami -ne 0 ] +then + user=`whoami` +else + user=$LOGNAME +fi + +if [ $usehostname -ne 0 ] +then + host=`hostname` +else + host=`uname -n` +fi +echo '#####' built by $user@$host on `date` +echo '#####' in `pwd` | sed 's/\/tmp_mnt//' +echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//' +echo "define(\`__HOST__', $host)dnl" diff --git a/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 b/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 new file mode 100644 index 000000000000..33c71511781c --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 @@ -0,0 +1,6 @@ +SITE(contessa) +SITE(emind) +SITE(hoptoad) +SITE(nkainc) +SITE(well) +SITE(ferdy) diff --git a/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 b/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 new file mode 100644 index 000000000000..81d5e9443d99 --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 @@ -0,0 +1,4 @@ +SITE(endotsew) +SITE(fateman) +SITE(interlan) +SITE(metron) diff --git a/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 b/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 @@ -0,0 +1 @@ + diff --git a/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 b/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 new file mode 100644 index 000000000000..ee2c34f60d96 --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 @@ -0,0 +1,73 @@ +SITE(Padova) +SITE(Shasta) +SITE(alice) +SITE(allegra) +SITE(amdcad) +SITE(att) +SITE(attunix) +SITE(avsd) +SITE(bellcore bellcor) +SITE(calma) +SITE(cithep) +SITE(cnmat) +SITE(craig) +SITE(craylab) +SITE(decusj) +SITE(decvax, S) +SITE(decwrl) +SITE(dssovax) +SITE(eagle) +SITE(ecovax) +SITE(floyd) +SITE(franz) +SITE(geoff) +SITE(harpo) +SITE(ho3e2) +SITE(hpda) +SITE(hplabs) +SITE(ibmsupt ibmuupa ibmpa) +SITE(iiasa70) +SITE(imagen) +SITE(isunix menlo70) +SITE(kentmth) +SITE(lbl-csam lbl-csa) +SITE(lime) +SITE(mothra) +SITE(mseonyx) +SITE(mtxinu) +SITE(pixar) +SITE(pur-ee) +SITE(purdue) +SITE(pwbd) +SITE(sdcarl) +SITE(sftig) +SITE(sgi olympus) +SITE(sii) +SITE(srivisi) +SITE(ssyx) +SITE(sun) +SITE(trwrb) +SITE(twg) +SITE(ucivax) +SITE(ucla-se) +SITE(ucla-cs) +SITE(ucsbcsl ucsbhub) +SITE(ucscc) +SITE(ucsd) +SITE(ucsfcgl) +SITE(ucsfmis) +SITE(ulysses) +SITE(unisoft) +SITE(unmvax) +SITE(usenix) +SITE(uw) +SITE(uwvax) +SITE(vax135) +SITE(voder) +SITE(wheps) +SITE(whuxle) +SITE(whuxlj) +SITE(xicomp) +SITE(xprin) +SITE(zehntel) +SITE(zilog) diff --git a/contrib/sendmail/contrib/README b/contrib/sendmail/contrib/README new file mode 100644 index 000000000000..dcf5c8fe7e0d --- /dev/null +++ b/contrib/sendmail/contrib/README @@ -0,0 +1,10 @@ +Everything in this directory (except this file) has been contributed. +We will not fix bugs in these programs. Contact the original author +for assistance. + +Some of these are patches to sendmail itself. You may need to take +care -- some of the patches may be out of date with the latest release +of sendmail. Also, the previous comment applies -- patches belong to +the original author, not to me. + +Eric Allman, 26 May 1993 diff --git a/usr.sbin/sendmail/contrib/bitdomain.c b/contrib/sendmail/contrib/bitdomain.c index 52d6d2187c3f..52d6d2187c3f 100644 --- a/usr.sbin/sendmail/contrib/bitdomain.c +++ b/contrib/sendmail/contrib/bitdomain.c diff --git a/usr.sbin/sendmail/contrib/bsdi.mc b/contrib/sendmail/contrib/bsdi.mc index 231a7bc77ac6..231a7bc77ac6 100644 --- a/usr.sbin/sendmail/contrib/bsdi.mc +++ b/contrib/sendmail/contrib/bsdi.mc diff --git a/contrib/sendmail/contrib/converting.sun.configs b/contrib/sendmail/contrib/converting.sun.configs new file mode 100644 index 000000000000..e6a3a9e8bd91 --- /dev/null +++ b/contrib/sendmail/contrib/converting.sun.configs @@ -0,0 +1,446 @@ + + Converting Standard Sun Config + Files to Sendmail Version 8 + + Rick McCarty + Texas Instruments Inc. + Latest Update: 08/25/93 - RJMc + +This document details the changes necessary to continue using your +current SunOS sendmail.cf with sendmail version 8. In the longer term, +it is recommended that one move to using an m4 based configuration such +as those shipped with sendmail, but if you're like me and have made +enough modifications to your .cf file that you'd rather put that task +off until later, here's the sum total of my experience to get you to +version 8 with minimal pain. I'll cover .cf as well as build issues. + +Some background - as many are surely aware, Sun has some "special" +features in the sendmail they ship ($%x, %y LHS lookup, NIS alias DB +search, etc.). (Some of those features can be had in alternative forms +in IDA sendmail, but v8 has picked up some IDA capabilities as well as +new ones, making it IMHO a most desirable version to go to.) What I +will explain below includes v8 functional "equivalences" to these Sun +sendmail features. + +So with that out of the way, let's begin. + +First, some assumptions: + + 1) I'm going to assume you've got sendmail version 8.6 or + later in hand - if not, grab it from ftp.cs.berkeley.edu + in the ucb/sendmail directory. There are bugs in earlier + versions which affect some of the needed functionality. + + 2) Second, I'm going to detail this based upon the + "sendmail.main.cf" configuration. (BTW, if you attempt + to move to using an m4 generated config in the future, + MAIL_HUB is the feature which should provide similar + functionality). + + In general, the changes will be similar for a subsidiary + file, but since we (my TI group) funnel all non-local mail + through our mailhost, we're not as interested in getting v8 + to run on such systems and I haven't tried it. + + 3) You're using DNS and sendmail.mx. If you're not, you ought + to be, even if you're also running it along with NIS (which + we do - except for gethostbyxxx() lookups, which I'll be + talking about later). I would imagine you could get things + running OK without DNS support, but I haven't tried it myself. + + 4) You're not mounting /var/spool/mail from other systems. + I haven't found a v8 feature to guarantee this will work + correctly. Anyway, in the past, we've tried doing that + here and found it to be a rather "ugly" feature, though + Sun ostensibly supports it ("R" option). Perhaps v8 + will one day have a similar feature, but for now, bottom + line, I would recommend against it. + + 5) You're not on Solaris or using NIS+. I'm on 4.1.3. I've + looked at Solaris briefly and have noted that things are + pretty much similar there except that they've moved some + things into the /etc/mail directory. I'd guess the + executables aren't functionally all that different from + what they had before - the configs are roughly the same. + So I'd bet most of what I say in here will apply to + Solaris. + +OK, let's configure our sendmail.cf! I'll just go from the top down... + + VARIOUS DECLARATIONS + +1) For v8, you need to define your .cf as AT LEAST a version level 4 + configuration. Add the following line: + + V4 + + There are some issues regarding certain predefined macros - $w, $j, and + $m. With a V4 configuration: + + $w is defined to be the hostname, which will usually be fully + qualified (i.e. "firefly.add.itg.ti.com"). + + $j should have the same value as $w. + + $m will be predefined as the domain portion of $w + (ex. "add.itg.ti.com"). + + One note about this - if your configuration relies on the "w" macro to + be the "simple" hostname (as mine does)... + + If the configuration version is 5 or larger: + + $w is supposed to be the "simple" name (ex. "firefly") + + $j should be the fully qualified name (i.e. "firefly.add.itg.ti.com") + + $m will be predefined as the domain portion of $j + (ex. "add.itg.ti.com"). + + I have not experimented with the various combinations, so I cannot + guarantee you that the above definitions will always come out as + expected. Bottom line: if your sendmail.cf depends on $w being the + simple hostname, test it carefully or define the name explicitly, + for example: + + Dwfirefly + +2) To replace the Sun's "%y" feature, we must use a hostname mapping + feature in v8. If you want to do similar lookups with v8, you need + to define the following map (we'll go over the rules that use this + map later): + + Khostlookup host -f -m -a. + + This will define a "lookup only" map that is otherwise the same as + sendmail version 8's built-in "host" map (see the "Sendmail + Installation and Operation Guide" for details on this map.). + + An important note: Whether or not these lookups will be done via + NIS is a function of what gethostbyxxx() functions you link into + your sendmail. DO NOT redefine your host mapping to use NIS + explicitly within sendmail - there can be unexpected behaviour if + you do so (if you do any canonicalization in your .cf, you can get + incorrect results, for one thing). + + For example, DO NOT TRY: + + Khost nis -f -a. hosts.byname + +3) If you're doing reverse alias mapping as done in ruleset 22, instead of: + + DZmail.byaddr + + you'll need to declare the following: + + Kaliasrev nis -f -N mail.byaddr + +4) If you are doing any other NIS map lookups, you'll need to define the + map as done in the below example. I have a "mailhosts" map, which I + use to distinguish between local and non-local hosts. Look at the + sendmail doc for details on this stuff. + + Kmailhosts nis -f -m -a. mailhosts + +5) You might wish to add the following line to support Errors-To: headers. + I don't. + + Ol + +6) Comment out/remove the following line: + + OR + + The R option means something different under v8 - check the documentation + if you're interested in using it. + +7) If you're running NIS and have a separate alias map, BELOW the + following line where the alias file is declared: + + OA/etc/aliases + + ADD the following: + + OAnis:mail.aliases + + This will set things up so v8 will look at the local alias DB first, + then the NIS map, just as Sun sendmail does. + +8) Though you don't have to, I'd suggest changing: + + OT3d + + to use v8's warning feature, which allows a warning message to be + sent if a message cannot be delivered within a specified period. + I use: + + OT5d/4h + + which says - bounce after 5 days, warn after 4 hours. + +9) I set the following option to be explicit about how I want DNS + handled: + + OI +DNSRCH +DEFNAMES + +10) The following line: + + T root daemon uucp + + may be deleted, though it will be ignored if you leave it around. + +11) It would probably be good to change the version macro value (which + shows up in "Received:" headers) so no one debugging mail problems + gets the wrong idea about what config you're running under. Look + for something like: + + DVSMI-4.1 + + Mine, for example is: + + DVADD-HUB-2.1 + + RULESETS + +1) In ruleset 3, BELOW this rule: + + # basic textual canonicalization + R$*<$+>$* $2 basic RFC822 parsing + + +I add the following rule to remove a trailing dot in the domain spec so +it won't interfere with v8 mapping features, etc. (Having a trailing dot is +not RFC-compliant anyway.): + + R$+. $1 + +2) Because ruleset 5 is special in v8, I rename it to S95 and also change + all RHS expressions containing ">5" to use ">95" instead. In v8, + 5 is executed against addresses which resolve to the local mailer and + are not an alias. If you don't change S5 to something else, you might + get a surprise! + +3) If you're doing any lookups via the generalized NIS "$%x/$!x" + mechanisms (such as with the mailhost map I referred to earlier) it's + done differently under v8. For example: + + DMmailhosts + ... + R$*<@$%M.uucp>$* $#ether $@$2 $:$1<@$2>$3 + + takes a different map definition and two rules under version 8: + + Kmailhosts nis -f -m -a. mailhosts + ... + R$*<@$+.uucp>$* $: $1<@$(mailhosts $2 $).uucp>$3 + R$*<@$+..uucp>$* $#ether $@$2 $:$1<@$2>$3 + +4) Sun has a special case of the "$%x" feature for host lookups - "%y" is + automagically defined to do an NIS "hosts.byname" search with no other + definition, as done in the below example: + + R$*<@$%y.LOCAL>$* $#ether $@$2 $:$1<@$2>$3 + + (Sun does this in more than one place. But the above syntax is almost + identical in each - mostly a case of changing names to protect the + innocent.) + + In version 8, the predefined "host" map can be used to do essentially + the same thing. (However, whether or not it does an NIS lookup is + a function of what gethostbyxxx() functions are linked in.) + + Recall the map definition I mentioned earlier in the DECLARATIONS + section: + + Khostlookup host -f -m -a. + + Here's where we will use it. It will take two rules: + + R$*<@$+.LOCAL>$* $: $1<@$(hostlookup $2 $).LOCAL>$3 + R$*<@$+..LOCAL>$* $#ether $@$2 $:$1<@$2>$3 + + Note that this is almost verbatim the same change as was used in the + previous "mailhosts" example. + +5) Although Sun's default configs don't do this, because I mentioned + canonicalization earlier, it deserves an example, as it's illustrative + of the functional difference in the map definitions I discussed before. + This stuff is also convered in the "Sendmail Installation and Operation + Guide". + + Remember the built-in "host" map definition? As you'll recall, unlike + the "hostlookup" map we defined, "host" will actually CHANGE the + hostname in addition to appending a dot. "hostlookup" only appends a + dot if the name is found and doesn't change it otherwise. Anyway, + here's the example: + + R$*<@$+>$* $: $1<@$(host $2 $)>$3 canonicalize + R$*<@$+.>$* $1<@$2>$3 remove trailing dot + + Using the above, say you had input of: + + joe<@tilde> + + OR + + joe<@[128.247.160.56]> + + Assuming "tilde" or the IP address is found, it might be + canonicalized as: + + joe<@tilde.csc.ti.com> + +6) As another instance of the NIS lookup feature, with a slightly + different twist, Sun implements reverse alias mapping in ruleset 22 + with the below: + + DZmail.byaddr + ... + R$-<@$-> $:$>3${Z$1@$2$} invert aliases + + To use this feature under v8, change the above rule a (remember to + define the alias map as I showed earlier): + + R$-<@$-> $:$>3$(aliasrev $1@$2 $) invert aliases + + + MAILER DEFINITIONS + +1) Where "TCP" is defined in the "P=" and "A=" parameters of mailers, I + changed it to "IPC". Version 8 will accept "TCP", but "IPC" is + preferred. + +2) On all IPC mailers, I also defined "E=\r\n" and added an "L=1000" as + in the below example: + + Mether, P=[IPC], F=mDFMuCX, S=11, R=21, L=1000, E=\r\n, A=IPC $h + + The "E=\r\n" will save you headaches interoperating with such things as + VMS TCP products. + + The "L=1000" is for RFC821 compatibility. Not strictly necessary. + + I also removed the "s" (strip quotes) mailer flag Sun puts in for + these mailers. Stripping quotes violates protocols, which say + clearly that you can't touch the local-part (left hand side of + the @) until you are on the delivering host. + +NOW. If I haven't left anything out, you should be able to run through +your Sun sendmail.cf file and convert it to run under v8. + + BUILD ISSUES + +Some important notes on building v8 on SunOS: + +Makefile + +The default makefile in the version 8 source (src) directory assumes the +new Berkeley make. Unless you want to go to the trouble of building it, +you can use your regular make, but you need to use a different makefile. +You can use "Makefile.dist" or "Makefile.SunOS" in the src directory. I +made changes to get it to build so it is as compatible as possible with +the file/directory locations Sun uses. Here are some relevant sections +out of my makefile: + + CC=gcc + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNDBM -DNEWDB -DYPCOMPAT -- use both plus YP compatility + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See README for a description of how these flags interact. + #DBMDEF= -DNDBM -DNEWDB + DBMDEF= -DNDBM -DNIS + + # environment definitions (e.g., -D_AIX3) + ENVDEF= + + # see also conf.h for additional compilation flags + + # library directories + LIBDIRS=-L/usr/local/lib + + # libraries required on your system + #LIBS= -ldb -ldbm + LIBS= -ldbm -lresolv + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/etc + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + +For the resolver library, you can use the one shipped with Sun if you +want. But I'd recommend using another version of the resolver library +(such as the one with Bind 4.8.3 or 4.9). Sun's resolver stuff (at +least with 4.1.x) is quite old - I believe it is of 4.3.1 vintage. (Do +you get the impression I don't TRUST what Sun ships with their systems?) + +If you want NIS host lookup while maintaining DNS capability, you might +take a look at resolv+, which has NIS capable gethostbyxxx() functions +in it. My recommendation, however, is to avoid doing NIS host lookups +in sendmail altogether, and to use a "pure" version of the resolver +library. + +There are probably no situations (at least I think so) where it makes +any sense to link in Sun's NIS gethostbyxxx() functions from libc. +You could, I guess do it (I haven't tried it) and wind up with a +sendmail equivalent to the non-mx version Sun ships. You'd need to +insure that NAMED_BIND is not defined in the build. (If you do +this and have the "-b" DNS passthru option set in NIS, remember that +while you have some DNS functionality you'll not have any MX support. +(This, IMO, is what makes this a non-optimal choice.) + + INSTALLATION/TESTING ISSUES + +The sendmail.hf file in the src directory should replace the one currently +in /usr/lib. You also might choose to edit it a bit to "localize" what it +says. + +The sendmail executable goes, of course, in /usr/lib in place of the current +one. What I did was create a subdirectory in /usr/lib and put all of the +Sun sendmail stuff in there. I named the v8 sendmail executable to be +sendmail.v8.mx and then symbolically linked it to sendmail. + +One other thing. If you use address test mode, keep in mind that +Version 8 is like IDA in that it does not automatically execute ruleset +3 first. So say you're playing around with things testing addresses and +you're used to things like: + + 0 jimbob@good.old.boy.com + +under v8 you need to say instead: + + 3,0 jimbob@good.old.boy.com + + INTEROPERABILITY ISSUES YOU MIGHT ENCOUNTER + +Be aware that sendmail v8 issues a multi-line SMTP welcome (220) +response upon a client connection. Most systems in your network should +handle it OK, but there are some that choke on it, because whoever wrote +the clients assumed only a single line. THIS IS NOT SENDMAIL's FAULT. +A multi-line 220 response is perfectly valid. A likely place you'll +encounter this problem is with non-Un*x SMTP clients. If you do run +into it, you should report it to the vendor. + +A final note about version 8 - if you follow the above configuration +scenario, you'll notice it doesn't like to get envelope sender +addresses it doesn't know how to get back to. Sun sendmail would take +anything, even though it might not be able to bounce the message back +should something happen downstream. So if another sendmail on a host +that's not locally known is trying to pump mail through your v8 host, +the ENVELOPE sender it gives had better be fully qualified. This is +a GREAT thing, because it helps clear up problems we've had with not +being able to get things back to the sender, resulting in an +overburdened postmaster. + +I hope this helps those running Sun sendmail feel more at ease with moving +on to v8. It's really worth going to. diff --git a/contrib/sendmail/contrib/doublebounce.pl b/contrib/sendmail/contrib/doublebounce.pl new file mode 100644 index 000000000000..a853ec14f37f --- /dev/null +++ b/contrib/sendmail/contrib/doublebounce.pl @@ -0,0 +1,232 @@ +#!/usr/bin/perl +# doublebounce.pl +# attempt to return a doubly-bounced email to a postmaster +# jr@terra.net, 12/4/97 +# +# invoke by creating an mail alias such as: +# doublebounce: "|/usr/local/sbin/doublebounce" +# then adding this line to your sendmail.cf: +# O DoubleBounceAddress=doublebounce +# +# optionally, add a "-d" flag in the aliases file, to send a +# debug trace to your own postmaster showing what is going on +# +# this allows the "postmaster" address to still go to a human being, +# while bounce messages can go to this script, which will bounce them +# back to the postmaster at the sending site. +# +# the algorithm is to scan the double-bounce error report generated +# by sendmail on stdin, for the original message (it starts after the +# second "Orignal message follows" marker), look for From, Sender, and +# Received headers from the point closest to the sender back to the point +# closest to us, and try to deliver a double-bounce report back to a +# postmaster at one of these sites in the hope that they can +# return the message to the original sender, or do something about +# the fact that that sender's return address is not valid. + + +use Socket; + +# look for debug flag +# +$dflag = 0; +$dflag = 1 if ($ARGV[0] eq "-d"); + +# get local host name +# you may need to edit these two lines for however your system does this +# +$host = `hostname`; chop($host); +$domain = `dnsdomainname`; chop($domain); + +# get temp file name +$tmp = "/tmp/doubb$$"; + +# save message from STDIN to a file +# I thought about reading it into a buffer here, but some messages +# are 10+Mb so a buffer may not be a good idea +# +if (! open(MSG, "+> $tmp")) { + # can't open temp file -- send message to local postmaster + # open(MAIL, "| /usr/sbin/sendmail -oeq postmaster"); + print MAIL <STDIN>; + close(MAIL); + exit(1); +} +print MSG <STDIN>; + +# scan message for list of possible sender sites +# note that original message appears after the second +# "Original message follows" marker +# look for From, Sender, and Reply-To and try them, too +# +$inhdr = 0; +$hdrs = 0; +$skip = 0; +seek(MSG, 0, 0); +while (<MSG>) { + chop; + if (/^ ----- Original message follows -----$/ + || /^ ----Unsent message follows----$/) { + $i = 0; + $inhdr = 1; + $hdrs++; + $skip = 1; + next; + } + if ($skip) { + $skip--; + next; + } + if (/^$/) { + last if ($hdrs >= 2); + $inhdr = 0; + next; + } + if (! $inhdr) { + next; + } + if (! /^[ \t]/) { $hdr[$i++] = $_ } + else { + $i--; + $hdr[$i++] .= $_; + } +} +$rcvd = 0; +for ($j = 0; $j < $i; $j++) { + print STDERR "DEBUG hdr[$j] = $hdr[$j]\n"; + if ($hdr[$j] =~ /^received:/i) { + ($addr[$rcvd++]) = $hdr[$j] =~ m/.*\sby\s([^\s]+)\s.*/; + } + if ($hdr[$j] =~ /^reply-to:/i) { + ($addr1{"reply-to"} = $hdr[$j]) =~ s/^reply-to: *//i; + } + if ($hdr[$j] =~ /^sender:/i) { + ($addr1{"sender"} = $hdr[$j]) =~ s/^sender: *//i; + } + if ($hdr[$j] =~ /^from:/i) { + ($addr1{"from"} = $hdr[$j]) =~ s/^from: *//i; + } +} + +# %addr and %addr1 arrays now contain lists of possible sites (or From headers). +# Go through them parsing for the site name, and attempting to send +# to the named person or postmaster@ each site in turn until successful +# +if ($dflag) { + open(DEBUG, "|/usr/sbin/sendmail postmaster"); + print DEBUG "Subject: double bounce dialog\n"; +} +$sent = 0; +# foreach $x ("from", "sender", "reply-to") { +foreach $x ("from", "sender") { + $y = &parseaddr($addr1{$x}); + if ($y) { + print DEBUG "Trying $y\n" if ($dflag); + if (&sendbounce("$y")) { + $sent++; + last; + } + $y =~ s/.*@//; + print DEBUG "Trying postmaster\@$y\n" if ($dflag); + if (&sendbounce("postmaster\@$y")) { + $sent++; + last; + } + } +} +if (! $sent) { + $rcvd--; + for ($i = $rcvd; $i >= 0; $i--) { + $y = &parseaddr($addr[$i]); + $y =~ s/.*@//; + if ($y) { + print DEBUG "Trying postmaster\@$y\n" if ($dflag); + if (&sendbounce("postmaster\@$y")) { + $sent++; + last; + } + } + } +} +if (! $sent) { + # queer things are happening to me + # $addr[0] should be own domain, so we should have just + # tried postmaster@our.domain. theoretically, we should + # not get here... + if ($dflag) { + print DEBUG "queer things are happening to me\n"; + print DEBUG "Trying postmaster\n"; + } + &sendbounce("postmaster"); +} + +# clean up and get out +# +if ($dflag) { + seek(MSG, 0, 0); + print DEBUG "\n---\n"; print DEBUG <MSG>; + close(DEBUG); +} +close(MSG); +unlink("$tmp"); +exit(0); + + + + + +# parseaddr() +# parse hostname from From: header +# +sub parseaddr { + local($hdr) = @_; + local($addr); + + if ($hdr =~ /<.*>/) { + ($addr) = $hdr =~ m/<(.*)>/; + return $addr; + } + if ($addr =~ /\s*\(/) { + ($addr) = $hdr =~ m/\s*(.*)\s*\(/; + return $addr; + } + ($addr) = $hdr =~ m/\s*(.*)\s*/; + return $addr; +} + + +# sendbounce() +# send bounce to postmaster +# +# this re-invokes sendmail in immediate and quiet mode to try +# to deliver to a postmaster. sendmail's exit status tells us +# wether the delivery attempt really was successful. +# +sub sendbounce { + local($dest) = @_; + local($st); + + open(MAIL, "| /usr/sbin/sendmail -ocn -odi -oeq $dest"); + print MAIL <<EOT; +From: Mail Delivery Subsystem <mail-router\@$domain> +Subject: Postmaster notify: double bounce +Reply-To: nobody\@$domain +Errors-To: nobody\@$domain +Precedence: junk +Auto-Submitted: auto-generated (postmaster notification) + +The following message was received at $host.$domain for an invalid +recipient. The sender's address was also invalid. Since the message +originated at or transited through your mailer, this notification is being +sent to you in the hope that you will determine the real originator and +have them correct their From or Sender address. + +The invalid sender address was: $addr1{"from"}. + + ----- The following is a double bounce at $host.$domain ----- + +EOT + seek(MSG, 0, 0); + print MAIL <MSG>; + return close(MAIL); +} diff --git a/usr.sbin/sendmail/contrib/etrn.pl b/contrib/sendmail/contrib/etrn.pl index 1e2cba9177ce..1e2cba9177ce 100755 --- a/usr.sbin/sendmail/contrib/etrn.pl +++ b/contrib/sendmail/contrib/etrn.pl diff --git a/usr.sbin/sendmail/contrib/expn.pl b/contrib/sendmail/contrib/expn.pl index 57f851560bcd..57f851560bcd 100755 --- a/usr.sbin/sendmail/contrib/expn.pl +++ b/contrib/sendmail/contrib/expn.pl diff --git a/contrib/sendmail/contrib/mail.local.linux b/contrib/sendmail/contrib/mail.local.linux new file mode 100644 index 000000000000..42d2c3c3d9ce --- /dev/null +++ b/contrib/sendmail/contrib/mail.local.linux @@ -0,0 +1,205 @@ +From: Karl London <karl@borg.demon.co.uk> +Message-Id: <199308111712.SAA05454@borg.demon.co.uk> +Subject: Final port of mail.local to Linux +To: eric@cs.berkeley.edu +Date: Wed, 11 Aug 1993 18:12:27 +0100 (BST) +X-Mailer: ELM [version 2.4 PL21] +MIME-Version: 1.0 +Content-Type: text/plain; charset=US-ASCII +Content-Transfer-Encoding: 7bit +Content-Length: 11415 + +Hi, + Sorry about this.. This is a final version of mail.local for +linux.. + +This is what I would like to see distributed with 8.6 if poss... + +Karl + +-------------- + +begin 600 mail.local.linux.tar.Z +M'YV0;<*D8>."S9LQ8=B\`,"PH<.'$"-*G$BQHL6*(&C`N`$#!@@`($#$N%'# +M(TB1)$V&7,D2A$<0-6C,D$%3QHT8+V/HI$$#9(V+0(,*'4HT8ITY=,+("0E@ +MC5(V12<ZE0,UJM6K6+-JW<KU:L"!!0\F?`$G#!TT;L*T*3/'!9JN<*WBA*%1 +M)<J2'T..Q'NRY0P;,6:$+`DC!@V:,VK(T#MCQDV0,.)*GFP4J5*F4ZMNS4RY +ML^?/H#^_4-%"`0@5((:\@9-'3IHS:.B`0#$FA<@<.3Q205,&A)0R9\JXH3,' +MQ!LS(,[VKN(FC9TR<N:DH9/'./(A"=.8>2.G>1@7IE$'8<,&A&O8Q,VSA?Z< +M#/C3X7V7(9,&J6LQ=>BD>>,&1!@W9(!P5&]I]#?'&W7(,49O_P4H1H%*5;>= +M'&W,P0((=TR'AG%+97@6@G3$U\8;])F1!D+Z\7>A4KW!`5T;T]$Q'PAPR/&& +M'6F0,>-99B7'&PC;D?=&AFZ<`<(8_-&7HAMSQ,<B"&O1H4-\,;@@'WWVI8'? +MDL4=!\*!"2YX)(F]M7&4;'*4D52!/C(HQHV](<G:>;'%MY(;;^BWX(5GU0<" +M&_7)YB62`$ZW'Y/^`=@FD&\(2:216([!AD!KR?$>:C)8^1N6=-R7WZ'%L?E@ +M6G)(R%T;4)ZI7HTDUB&F<OZ]^=R8<[Y6YVDLX:EG&7RBX2>@2%DW9J%<)AH@ +MK$$:]"@(D4Z:1J4@L*F<G2&1<5`=:PUGUJ'&OL"=<<HM%9",KB54'*LXZAB@ +MAQO"RJFG2UX*P@Q6CE=>&&0\)X=^TA4)I5G0I6$NE,(M6:"19I1A5H)L<2C@ +M'+UYV6=Q!YI!QQTL4IMJL%C",6EUR#:J[,'^C;$&GG>P,5]PV4H97@*[^<DJ +M&:[*5J"D=>A(\7$7/ZGC<P:YZ"#(/S+G''3246?=R]@!.J%W%PH!W1IEJ%Q= +M@]&F1VBG6N;'75OQT6"E$V5H"-VB::TE+*Q&ZYMT=7@N!6O:#7LY77%;P_NU +MQ@%5)T9O`Q[[!@C"61M=Q$NQ.J*,--I(\QCIZ>A:>T#:B.K$7_*,<9H:LPOB +MERZ.H=V)C>_7H6MTR-B?BQ36)QU_E\9'!1))3`'"%$\80<4504A1!`BU@P"% +M%$]8D00111`!@A!9@##[[[X?48035-@>A!/*#_$$]5(D(4055#PAA>U@@!&$ +M[;6?<`((UQ,1W_7-%X'%\$5,8;OXP#<!!1-))`\"[U*0PO6HT+\I7"@)3A@" +M$ZI`!`0>(6K@`X$3GD`%$/"O"4F@@O_"=Z'GQ2<)^N.?_P`H0.H5$`2Y`T$3 +MBB"%(2!A@$$00A+X1X7FM0\$1LB@$^IG.R/@+PC"ZQT!AU`%)O1.>%60`A2> +M,(4BO,]W(&C@%!08!!`FSTK`<X($GP""(EAA>A6<P@N9P`3G(0%Z19`>]>XG +MA=1LCPK=^U[XQK>\W_$OADQP(JY\V$;X13$)OAL"%0Z(/4`609"$',+QP!@$ +M)EQH"E`X9!(:>2'Y%2&$O<O"A?"G/2<T,0I5`.,DF1`?(@2A"4&0GNU0@$`% +M,M"!$*S@!"MXP0QN\`D7&MX3B.B[%5(/A4:X716$,`4"4@%\OSO"$YY`A"G$ +M!W]-E(+QAE"_'5B0B?<+9A6:>"%34B$(FVRC+G-8/6OB[WM30"`/LZC!`%8! +M"@3<7@KB@X0G7,&++$Q-$+;IOQMNCWU.:-[SQ->\%-Y1AC34Y/_.^+PV(M"- +MW`L"(F\'QR0(,CX'G6$&%8J_.5:0E0E<8`.=<`0)II%_:J0F"MM(P3-*X0JU +M*X)M>E<[!V81H,WC71:>&<$4/@\$_`2F&8.'.]T!L`B5_*(6DQ#,(!#!>$U4 +MGD_/*#QL>D^C-01F?*90!1=&\92I+$+L3I,`(*!@!"DHRUGHUA8T)*`&+A`, +M"J0F!ZI9S38Q>,%(7I"#&(3G!0H8P<W8D+/>\$"M:&BK#Q006!V9R`V]^0(4 +M@C"[+S!AEU307P)$\`(ZM`$.+S`(0@B"A=*:5@0*"(UJ5_L5@HAV+*T-RVA= +M,(;5@F8N=<G+7>RR%[NP9"0PJ$$-!B.3FMBD(XSAR0T@8]OF#N5,E_D(9[@R +M7>=:][K8E<QH2H,KU=0*/;.IS6URX[P?_28XP^D2<MC6'+=-ISI>:IIVN.,= +M>=G+/+9*3YH@)H?VC!4UFPH4O+B%M0%%RT`(4A"#%#6J"#&*0A;"D(8<YKG\ +MB(A$HT/1H5:4)AJ]*$8S0E>.=H2&'H7,420CE))`Y:0.1VE*N*K2E03<M6)Y +M"4P*'I..-H8F-0FD/[`*@ZSBM)K6Y%=CNCH1KWSTJT`)2\6&XD]QL';BD?FK +M692"CKPR->,L;0E4!P9!@TOU8%29*5AIFIFK>A/D(=/*R.A!<IZ4W*LF!VM0 +M28HRHJC\HV0-B618?M;9I,4;C5EK#-@JV+;XTZUOY8DWX@)8N=AP+ANE:T;L +M6M2[:GPH>=&+?>3Q3[Z@PR^2C2M@`VO9H4B6L(7MUV$&EIBO=F:QS96!;ZKJ +MV,<6Y>=EA<%D*%,9&5A6,!BK`&:S;ERK('=@G.DL<[7V61F`MIH9B8%HRVDO +MTMZ[-++*]VD"B]K4JE:&JRGJ;L/BVI:^)B^Q2;!LX4*;6B*VWJ)I.SK<CIN\ +MUZ+>K.&-/^KV6G3X%@:_`0YB@B,<@+Z&.&4OKD6.JUEQ)'>T`)G!<DRF=<\X +MAZN55%@V<PA=ADOWK3N@3G4>;MT<7N>&_P[5=D7=7>]^%SQ=&@]YRF.>&=&H +MQNH!-'MOC"/XQ$<^\Z%O"NK[^?L"VL7Y^<Y^*\W?_OJG/!(.L(")%"DLEQ?! +M65H0A+94'@=W_L$04OU_O2LA`>LGU!6V\(74BR%6;8@]'.IPG7QD7Q"E,,0B +M'A$*25QB$Y_X.RE2T8I$P.)#)]A%I89QC&7\:?3`R$:(5E2.1*_CU_&H1]3D +MW8\-#.0@LQCZ0XZ^E8N,NR-O%TE%4K+IE]Q?)L,)T4^&TH2-+"5853F;5FJ= +MI+'<(BW!KD&QXU)XQ./E)<$H5*X2TYC(!($RF>E,7$&3A=.LYC6AGD)^=I.R +MX(SZ.#,X!7.V$9WJA#H"VRF%=\;3"?/$53WO^<4V#F&?4?TY"K7HQX%*H:#! +ME%$)=2%7P%`N=5.=!$<2-7K%U#T7A2L"N%&TYU&]%U*O1%(F=00H-3TJA3\M +MQ4(PU40SU3WIA($/Y4<ZQ5,5-%6_$U13152Y(W.^DU33`SQ-]50Q)57!]%." +METX(M5%:A2M<Y56FA$K2<RF`%5C:`2!E@!R`,AP*,`8EMA1R`F>QL05=``(] +MH``B8%9HE1I%1B>R01MXA1NZ85[`43#]QEY'@V]*$U_9`6[?P05NP`6F<5]B +M6!S[Q1[SX0)T*`([$%B%HQT@,!H@H"M_4B"RH0))*%AFP(1.J(@*8!EZ<B13 +M^"5C,`;20098J(4@T(5GE0*Q]5H$,09OY0(V,!MT95?E9ALVH%<YP%<Q`(B" +M6"C(88B(^(2+V(B#55@@P`-SD`=S0!9*H19NL5B"Y0;.9EC!.(R4>(Q*J(R$ +MM6/`*(PO<"`FHR;0F(S+^(O-^`(FHC+;V(O4"%GZ88XO4"#C*(V^6(US8!!G +ML([=R`-F,`;#01!H@(SD:%CF2`9B((_3:%AP<`?ND8_1.(_ZL18`V8YUT!Q( +M49#ZR([4"!W=\08+28T/N1\7R8QT0`:`\H\&R8T!Z8U<4R0;^8F(Q59N@5J- +MU80%4@8)8`3@QP0)D`!^-0*.]9(),$LR^4TT"0.,I8@)H".`HB\@\`62A0(H +MH(@7(H67H0(ID`*!:`=OD",)0)%'F91+.1Q-*66RX91+H0(7X@)D&953695D +MD`!)9@9Y\"!F@!Q("05*"9:G898*()1(P1V1I95T"952J0!4:95'$0;!D95R +MB0*!209VJ0!?X08HH!1G,`8<=@9V,$\)H(C^(0>1&8@)T)<J`)EV$(A[H`!7 +MB0?DTA^8N1KG2`:<60:F"1W]T9>J"9F<:1\U0R-AL'($>1H#R9F8*8478@9D +M<"'3EA"<60<Y\@6R@9RL29I]>7%OT`:!2)K5Y@;PB`(B,(IBP08B<"&7=022 +MQ4+$(P7>^03@B4HS])>D"9VHT@,25$1,P)EWX"LJ,QNTL2'N&1QTH)J/J9F2 +MF9F4>2$B0`9FH`-RH`,B$)4@$`+N602Y8YD),`<>(H7W:1NC69,(`3$@<`)D +M<`(Z4).&*`:_M@:;$R!(\EG;(@;UR8BD69-BD"9AL`:<V9FYV1LG8`8>VJ(9 +M:J-RX*$@BAHB:C(E.B8HJA\JVALL6I.7B1PHP)X0F@`L09$HT).OEYUUP`;Z +MX3&]T0+(H9J@DJ`SF@#LZ8FSJ9EA^J(*(Z,Z6J,;^@,Y6I..%097ZC)*.IC! +M@0)_69-]0)J0.08@T`+NZ:4`PIF@"0(K$*APL)K3N:2S$0*?J9F5V:)V6@9X +MNJBC09JXD@3(,::(&')E(#HF,A\78F!S,V^5$YT@H)_P6"!X&BWU=FM0BAK, +M^2]T((5L<2&/!AT9`C&CJJ&EJC9C"BMEH9O<87$#`:NX@B1RL%]PD&?^LI^+ +MPIS@$:N`E0"SFI]JPIR52IJ$B`(A,*8F8`*-VJ08AZUTL*J.J:!\P`>8NA(A +M@`(#Z8GZ.9!I0Z[1J:Y\0"-WT`(^,)!?,*L,*B`Y$I4M.J;N":]W(*]J,I#: +MRIP*^@/ZRJ_^2C<@H`.?^`,82XOK&2#NF9=I8J]MD*<3,AO%61[N"0/6]*B4 +M:4TKL`*@":$E"P)\X)Y$V89-.IRG\;*MB0?3@0(E^Y=[.HG[^;%.ZIR7J`+L +M*9JDF4-Y=!IF``><F9!EH)S)80?&R:W#`20X6S4OR9E]20=N<"%/6`9;(`-T +M@0-=L*A@ZXGV03-P@`*215E(8%F8I3]YVJTWZXEML`9(40:?A0)@JZ`]X)XM +M$`,RFZ_O^K2>*)S5>;,">@<KD*`$6Y-22J6K)P(-*63U":W5F1Q^VZQRX&#A +M6`9@2IJ(B98IT)!/N`:`ZP8BFR:4&KB+>KH#*[4H8`)T8+5LD*>TJYA/ZQK# +M809-"@<":@085P+%@;S=>:IMT)2VB[NZNY@),+9;``-9Z)XGP`4P<`*<.;(^ +M.[:>&`/69`;Z.0<H,+87(AUZ4`;'<;XOF0+IVY$%(I46VJ+=2KW6JX782X<G +M\*1<"UGA.Z-5HZ$76I/=^K^]$:Z)"%G5>[W8:P3KH\`A(`9C\+?H^XG&BZK+ +M6P.3JZ2]FU;Y,08H<`(^<`+!"0=Y2KG@>[(SNJ<U^<&_JXC"^[0"JKQB^[XS +MVJT)LZS<,;P=G`!H&J.<&;0)8(B:2C`K1YB]@8B0E3(OZ;FMDQ8R@K.0-2/_ +M03BF&;I6DJ3=&@(%HB-XX+Z0=2'9ZP;]"Z$?#`<A/,+\>\)Y:HA/D!]J+!MA +M<(AEX,2094VZLF2?JS3\-@=*/&4=EA#*TH>G4:UIO,9E;,)`@L*SFY@I\):$ +M-0=HX,.^R:0[;"-RX,,PNZQ3.I,"*B.?Q1VB>ZP8@CJ]09'<4;H)D"9TD"". +M*9Q`RU@UJR^.>XCS9IF8*9Q>>[1TH[01VBFW28E?(@:U*<S,-JP2&B`JT)M8 +M^Y4P.L47T@9B()P7X@9R<,UW@*MO>2']=;6=>8EN:085<@9;,!==<"'X809; +M@`,J@!,R0`/IC)MGL06H-#]RFT=.D+;4^994BV@VTLU_`C%EP+KJ6<0J@*FH +M003U0<A#PBQ<JR\@,S@->3)#TA]L]:<M`#J?*C#ET5IO@@<-@Q#]\3<*#0(E +M!B#"%F:P`C$`TEK^`2@U6ARC.ZV'S*U,^J[Q:J[TJA8H0#=16;^4Z\D\"<J? +M6-$H@]'S9K$VC,MKD<*N#,LH$`-Y2L0?''+`2P?"BU@U/(Q-';>5A9Y,$'K7 +MG,N+VL6T$<TSXIZ4EA1T`*]F@0878@)S(`8*&J[M&A(H4-<N@!1?8)T%L@8+ +MZIZ&NZZW\P6UPP1.L`1[_8]^/2(Z$M0@4,!26M0^V=46N[HS,KK+BUA0G:W= +M,=55S5@(?=*[`1UE<`)39AZ_UAN0MJ4;?3&#PRH+LG(-TR=N(-C*X3>/=B1J +M308GC2S'BD4Q4QQK\1_%(=SU2=*(^#<"`MBYW8<*7:UX2\W"J85Y;1PNXIA< +MC4)?$`10$$G8PP=/\`5#X#N41=Y?<`7$XP1,H%!3@-CM-P52P`?QG017L$U2 +MH*`\X!)"?95$34&6B]D@T-3=;1^JO,D4B2=V69-1'=I4/<2D_<TFZQ*<:8BF +M9;%/L-U?@@8(P@8!XM`):P:BM08G0#+*70;61-`9X0(T0$R)=].,VJ0EC@+6 +MC;.7-01+\`7RHZ"4'>!4,."?B+Q,/0>='=?QFR8\K.#+RN!0K;L!W*)GD"># +M(Z+-F0!$#-#'@1QL3="L>^,7`@.KUT1%L./30P2\"\E8+<,H,,[EW-5`4`(@ +M_H=EO19-F2!;?K=,2FEE4-"W+.:/5`1E_@5-1`6V,;BSL>7*F0*%^]^5:]0B +M(,J@6\HJ4^3+B^!+[K--_@8-WLI03M@S.N70:N423IKS:<I*B<V>"*-D<,OK +MG+YIL+[MN\Z2[0/^7;#?@@);[HDH:QW(T=_8K,=+`:B'N,V^;JCNZ09W\*1X +MJ^R>:'+30:E@+F9U@!PKX.O7+`?\[=^3W:)#O<F67:5$7N!&?B$'WBD)KND5 +MV>DU*>J#(\S*&*8NW*VJWM\PX.B>+.21_KFD3&:C:^E)GNX+SNE_">]C\*$) +M`,,&#S`V7LTXJ^5O^>0)$>583MJ7&JNWHR:+<M%G@S5G8"-U``=8A`2!PATG +M0LAYH,X%`M-IIC!3G''^$2(8KS!2^"\#`=%%"1UY@$57L,2#8Q!%<C;6DG$K +MLG+8@N(E9C.O>M(<'QV^`@<.PSHPLG)@=@>H;8G_$1S'\MH8DIO^H1ZYR6@C +M:RT'<]('8M,L:N4?VJUC\-NVT:(P+(47W?#6'+']>@?_FB/FOJ]W_P5G,+"/ +MC+IF$(S*2/>*N0,_&D7\<0*R@3'3\6`"`@=D`#!;C,B0+"EO`#&&+Y6)GP2? +M!2BBLYS6>1!K4/FDW<44#J%KV9;:(;QN/@=GD*</[IBI'XA!FY@*L/KC;..P +M;YE]6<[`3(FD8YO,AHU.009D(`=?P";XDOS'O"U^NLN>6+C'+`>WZ>%]F[4J +M@`902YK$#W)\J/TAYYM9JS)N<-8YW?R6TB]?8`9J,1!Y\-^&*#5?<JQ92XCC +M_"7LH62'F"?^8;4#07.5`=-GP'+:7H-ZYHJ_V(%K0S>PTSA;7IB+#,`!R?6D +M9E\.,X#<3V%]"*3``.<-=B)%V(\.4,!NIZ0JFX"#="`P\TD)<G?IT%VF&WCL +MS@*V*!>6`-1?7RL0[>_]L8'JX)ZX'[]"`U]`_5$'%S&C*%B100$^T`<`0?4W +MUVP@^V."*`T._,`O8/[.P%E(84X0!X(NV="QI*`/F`-?8`M*N!GWZUP""%!@ +M38IMD3XU@0*"@!%`;#N$`>V2'4<$CH``:0)A3G`1+JI&`@$<N#N!E^T3&3\U +M`?"^A`O49.K.R<TH&5CQII=P8%N=POSQOMAGJ$3")9L-+HT,[*<F-<U@G]@2 +M#F'N0NPU9`9R2)_ZJTLF``JJ+_8EO-3?Y&()`<O\=;(_&.0@728<=:VO$&(Z +M1`@#9QE@0DL*8%+A*05PH1Y=(,1<@"PX6"SM-%I`P!;@4LPK"PV(I4"67$#I +M"EJ.*"L5$R(P!)#201I)P*@C0:9M-,!NC4AJ1U8K=&DFQ5*+2@1CP7W9$"EM +MPV[X!12`E,),]<'])04VT)68Q%<Z6N2,#HRELB2(^)P]]&3YT"PDA.#4!NB` +M+KM_<T`?@K/GU!`YD]7Z`F1`4K1#[4`,2=-%!!9TK/O%0T)'!;BA-TP`%]$R +M[(O'1+R`1$/\2R.@''K$,/`%5.);"P..;".:`8_8C*[3=^)Q`80A"D3_D!-1 +M(DTL'"Q1S\V&A+@/81;/>FL13@'LJ>Q"%:NB5;R*6#$K:L6M*!&8X5AH`C'* +M):D,KJ@5<`MR.0F]1;>DQ;[0$F2`3B`N,Z$F<(2<(`-L@&)@+F2QN4"7I2!= +MGD)7J"YY,3`*1LDP`LI**`*+5&-TG2*YLHK(3?P3"7KE!L@BQJ)+CD`/2`!> +MD0TH`%3B!'#`9<R,+@`HR9`)<@6<P&6T$7E"`8S&)L!,BD`/H`'"I0:H1@02 +M>GK`"Q@5C,4%[*-?)`;F@'M@%?%H;RV6P4@<BZ-Q/(Z",3.^`-"(`Y!C13"+ +MO"4EJ$7IR!97@@VP`3>`!@R&CF`#8*,,4`RI2"0TAL?@$IPC9=B+F,$O4A?U +M:![;HWMD"'Y(!("A[Q(;PDL9(B^G33Z@E_0@:[)-&WH;PN+;T!>!`1[B(Z@I +M#WE(/2A`Z18?%8"!##!>YE,PF@*CH=@$CA$36&/,F`H(<R$R3<G1$"#"07(! +M^0C9,LRB"5N9J45\F-018BS-B-EZ)J;/B(P_XR^@#)<0D?+Q2;P8'"D2-,5\ +MH#%?1LH(BPM)9';,F>DQ:P+(_`@A`R?>C!CBD7=BSNP)F`<2GTR>*19\IC?T +M&D!3'R1%EK$4/)++0,B`4RQ$!83P=Z>"QZR*B/,JEJ2;J4)/TD!&R5U19XI# +ME<0SQ`+,9$E&@6*N3)=T%M""T-P:.5DMKD7+.)&-9BGDJDA#+CQ:I;D1+U+" +MG`5-`R0E9,OAD9_FON`+?5%J_,6IF33&K6"L&G_1:E[9J_D6L:;>^(F*L7$& +MY8AD"4>26=0'CU%P>,V,]#7`9D@(&V(S'*9$?$0V,H--V@R)U#!8I:V!:-1& +M:(@9;`-4[@V`/`XX,@$(R.X0;I;'N+$:QL+?I!N]$1T*Y*MT-V3#;,B-'T&Q +M^F.S_(_YYEO\JKJ!'-!-WJ@Q>X-0_@N#\S!VQ.`H'`PGZEF./`%QEDWD"!B4 +M(U@E&V.9,>3EQ^%HH(ITU`C3<<I`S.KX,%0/=N!('CD[8)!1F3G`PW;8G$62 +M<P0*59D\:T3_)""A,T>*SOG(F$FG??!(/R(_Z`?W<2AF9X2DG:M3/[+.!7H@ +M7$>64)"O@T&*C_,X/A[$0(*0J2,S`PC-S"8JA(6X$!CR@[+*#2$G.P3J?)Z] +MTW>,B#@)/$S$B1A(C&EXC`CB43Q:A/'@DU\B1AI)Y/F8:83R1)V1Z3V&#AT1 +M`G9DD@B!/,(C/P_3*3T3A38:DKR90%)/((0DDN3U6!),\G]H3R>Q/:(D]QC( +M(A165HGON9G!Q^O4$I\Y=G2)\O$E*RB8.)]BDD&BS_1I)CSR^D@3BZ)]+@OW +MT2;<Y*M\$]HS?LI)U$$_41-]4`_QY'Z2@#SAD?,'G]@?_--/ZLX_Z3]GA*`( +ME0A40PB0`<HG#V5D+J!'4E$NBH$DGAREC5`@D.)*1DI)V2$:*`FDE-_A@1I* +M")(I[(,$V903Q'12D(%\`CUE!U$5%Z0^+:8,0BJ-IP8Q%?:!@_(/"ZHJ]N.J +M)!2M8B"'$!+X*D9(K$S,7^F%1)%`<"W;R07@@`1@`Q2H*KJ6K2@CO`";,!D; +MI`L@`@$B""S,\F`3+D0,P`U^Y8+*!K'F`G)<(P$!.,!!/H$FX0*FP(9P`J=$ +M:SH!,W-`94M"<)!.($!XK#)Q0,-,'0-I;P`/.$@7>CNRP`2!`NG$F;B`&6KS +M$.AH4:%0SPB4!^00!)8">W*05;1>4D.R-$0W!/*8(MT#GMA.)X!#4058!`ND +M2`&PNN3V(RP#@%`*`:)`S+'(EQP&QQ4K'"W@.'`I4X8U<.)V(P.A0C9`*YJ' +M!K#H4IB&&XJ%0H$?>D`50$U3`*?-D&I1QJ0JG%L=TUTY0HLZM0'H(*$`'("D +M/\)+"<DGX?5ZS1SPE4*@/+2`I&`D6D"&T(0;`@_(TBOJ`I*`;)"B0()]6%'+ +MH0"F@,AA2XLB$T('U;9)"V01T(PNP),J@"10*-)%'9AX,.V/!3*6]B.`*!Y( +MD3CO642[H9$H",=GH0X*`'SU&FMS-198;_@;?\\--`=_D6E:6DDR$N4C@Z$* +M]0$>@`CXVAH_!NGUABSA+^(IQE$?O6*?%HYA6APH5A]-#H+&$*J%3QHLR\`? +MM9>$X]=LB%J&V@)$-&4+R9"3`A$5]1\$&_CR$WYTH"8<0HK$,FH]355J30ZL +MTI2&]4(7Y#@;**!\E+#^%2TJC4,5J74T452'CZHDRP1&56(*X-35/"1QI1Q$ +MF0@48;$_C*PZYD]15=*I63""7)C3`JE,\R-,&UV"+)7A`9PA'8#&3EV#ZV+" +M.$@L8$5+'`B0`4&5/O'0FP=2X<!#=0^=]),>,5A1/L99TE&`_,]/S#YR.E:7 +M0OEB#QU0;0@&%J``8$7^6Y!+P4^LI30P([P$14T3%K6&QE50.BB9:&8,AOH! +M4"@-UX1N/`*CF0.NHK9%&*SA`SP"(;JC2\XX9*($`39:Z(:8'L:CO6%.!YE* +M_Q0K_5.O=%)^L8+A(&UI%[$#SD,+*(`J@'!R*L00I$O2K=J(A0DP$*K:T`/\ +M(6+T5.?*%I+"9S&FR)2(,JWZ05M5Z6UUI3EB4G:6SQ):$JAI,2U_ZD25!<C1 +M6V7#(BU$G@6TD"(7<%Y+2V'E=^I00APK%NI;W^L+2(?+\8"^@&D8#/D+,;6F +MLC)-0`[ND`<<Y#'MHK=#T+$/)H`[^FH3%0D@@+#2UZ6`!S(AAM6P9!5(F-7% +M`&+]JII0@(&U-PQ6"WNB`)ELP`$9UL)F0IB60ETK"*`=Q82@*``@`EI9QW%= +M&DN4AJ+1[:0`D&"#>$)&`L&R.I+A]:Q>J/%Z,.VQQC\%$%)91!QU`UA4-MB! +M&P`"P(/7$U8VXN.IA3)Z8<'#>SRS:#;-JMDURV;;K)M]LW`VSLK9.4MGZZR= +HO;-X-L_JV3W+9_NLG_VS@#;0"MI!2V@+K:$]M(@VT2K:1<MH&^UD`$MG +` +end diff --git a/usr.sbin/sendmail/contrib/mailprio b/contrib/sendmail/contrib/mailprio index 58feba7c22e4..58feba7c22e4 100644 --- a/usr.sbin/sendmail/contrib/mailprio +++ b/contrib/sendmail/contrib/mailprio diff --git a/contrib/sendmail/contrib/mh.patch b/contrib/sendmail/contrib/mh.patch new file mode 100644 index 000000000000..7b23a5b71dd4 --- /dev/null +++ b/contrib/sendmail/contrib/mh.patch @@ -0,0 +1,193 @@ +Message-Id: <199309031900.OAA19417@ignatz.acs.depaul.edu> +To: bug-mh@ics.uci.edu +cc: mh-users@ics.uci.edu, eric@cs.berkeley.edu +Subject: MH-6.8.1/Sendmail 8.X (MH patch) updated +Date: Fri, 03 Sep 1993 14:00:46 -0500 +From: Dave Nelson <dcn@ignatz.acs.depaul.edu> + + + This patch will fix the "X-auth..." warnings from the newer +Sendmails (8.X) while continuing to work with the old sendmails. + + I think the following patch will make everyone happy. + + 1) Anybody with MH-6.8.1 can install this. It doesn't matter + what version of sendmail you're running. It doesn't matter + if you're not running sendmail (but it won't fix anything + for you). + + 2) No configuration file hacks. If the -client switch is + absent (the default), the new sendmails will get an EHLO + using what LocalName() returns as the hostname. On my systems, + this returns the FQDN. If the EHLO fails with a result between + 500 and 599 and the -client switch is not set, we give up on + sending EHLO/HELO and just go deliver the mail. + + 3) No new configuration options. + + 4) Retains the undocumented -client switch. One warning: it + is possible using the -client switch to cause the old sendmails + to return "I refuse to talk to myself". You could do this under + the old code as well. This will happen if you claim to be the + same system as the sendmail you're sending to is running on. + That's pointless, but possible. If you do this, just like under + the old code, you will get an error. + + 5) If you're running a site with both old and new sendmails, you only + have to build MH once. The code's the same; works with them + both. + + If you decide to install this, make sure that you look the patch +over and that you agree with what it is doing. It works for me, but I +can't test it on every possible combination. Make sure that it works +before you really install it for your users, if any. No promises. + + To install this, save this to a file in the mts/sendmail directory. +Feed it to patch. Patch will ignore the non-patch stuff. You should have +"mts sendmail/smtp" in your configuration file. This works with old and +new sendmails. Using "mts sendmail" will cause the new sendmails to +print an "X-auth..." warning about who owns the process piping the mail +message. I don't know of anyway of getting rid of these. + + mh-config (if necessary), make, make inst-all. + + +I hope this helps people. + +/dcn + +Dave Nelson +Academic Computer Services +DePaul University, Chicago + +*** smail.c Fri Sep 3 11:58:05 1993 +--- smail.c Fri Sep 3 11:57:27 1993 +*************** +*** 239,261 **** + return RP_RPLY; + } + +! if (client && *client) { +! doingEHLO = 1; +! result = smtalk (SM_HELO, "EHLO %s", client); +! doingEHLO = 0; + +! if (500 <= result && result <= 599) + result = smtalk (SM_HELO, "HELO %s", client); +! +! switch (result) { + case 250: +! break; + + default: + (void) sm_end (NOTOK); + return RP_RPLY; + } + } + + #ifndef ZMAILER + if (onex) +--- 239,276 ---- + return RP_RPLY; + } + +! doingEHLO = 1; +! result = smtalk (SM_HELO, "EHLO %s", +! (client && *client) ? client : LocalName()); +! doingEHLO = 0; +! +! switch (result) +! { +! case 250: +! break; + +! default: +! if (!(500 <= result && result <= 599)) +! { +! (void) sm_end (NOTOK); +! return RP_RPLY; +! } +! +! if (client && *client) +! { + result = smtalk (SM_HELO, "HELO %s", client); +! switch (result) +! { + case 250: +! break; + + default: + (void) sm_end (NOTOK); + return RP_RPLY; ++ } + } + } ++ + + #ifndef ZMAILER + if (onex) +*************** +*** 357,380 **** + return RP_RPLY; + } + +! if (client && *client) { +! doingEHLO = 1; +! result = smtalk (SM_HELO, "EHLO %s", client); +! doingEHLO = 0; + +! if (500 <= result && result <= 599) + result = smtalk (SM_HELO, "HELO %s", client); +! +! switch (result) { +! case 250: + break; + +! default: + (void) sm_end (NOTOK); + return RP_RPLY; + } + } +! + send_options: ; + if (watch && EHLOset ("XVRB")) + (void) smtalk (SM_HELO, "VERB on"); +--- 372,409 ---- + return RP_RPLY; + } + +! doingEHLO = 1; +! result = smtalk (SM_HELO, "EHLO %s", +! (client && *client) ? client : LocalName()); +! doingEHLO = 0; +! +! switch (result) +! { +! case 250: +! break; +! +! default: +! if (!(500 <= result && result <= 599)) +! { +! (void) sm_end (NOTOK); +! return RP_RPLY; +! } + +! if (client && *client) +! { + result = smtalk (SM_HELO, "HELO %s", client); +! switch (result) +! { +! case 250: + break; + +! default: + (void) sm_end (NOTOK); + return RP_RPLY; ++ } + } + } +! + send_options: ; + if (watch && EHLOset ("XVRB")) + (void) smtalk (SM_HELO, "VERB on"); diff --git a/contrib/sendmail/contrib/mmuegel b/contrib/sendmail/contrib/mmuegel new file mode 100644 index 000000000000..6db4a45189c1 --- /dev/null +++ b/contrib/sendmail/contrib/mmuegel @@ -0,0 +1,2079 @@ +From: "Michael S. Muegel" <mmuegel@cssun6.corp.mot.com> +Message-Id: <199307280818.AA08111@cssun6.corp.mot.com> +Subject: Re: contributed software +To: eric@cs.berkeley.edu (Eric Allman) +Date: Wed, 28 Jul 1993 03:18:02 -0500 (CDT) +In-Reply-To: <199307221853.LAA04266@mastodon.CS.Berkeley.EDU> from "Eric Allman" at Jul 22, 93 11:53:47 am +X-Mailer: ELM [version 2.4 PL22] +Mime-Version: 1.0 +Content-Type: text/plain; charset=US-ASCII +Content-Transfer-Encoding: 7bit +Content-Length: 69132 + +OK. Here is a new shell archive. + +Cheers, +-Mike + +---- Cut Here and feed the following to sh ---- +#!/bin/sh +# This is a shell archive (produced by shar 3.49) +# To extract the files from this archive, save it to a file, remove +# everything above the "!/bin/sh" line above, and type "sh file_name". +# +# made 07/28/1993 08:13 UTC by mmuegel@mot.com (Michael S. Muegel) +# Source directory /home/ustart/NeXT/src/mail-tools/dist/foo +# +# existing files will NOT be overwritten unless -c is specified +# +# This shar contains: +# length mode name +# ------ ---------- ------------------------------------------ +# 4308 -r--r--r-- README +# 12339 -r--r--r-- libs/date.pl +# 3198 -r--r--r-- libs/elapsed.pl +# 4356 -r--r--r-- libs/mail.pl +# 6908 -r--r--r-- libs/mqueue.pl +# 7024 -r--r--r-- libs/newgetopts.pl +# 4687 -r--r--r-- libs/strings1.pl +# 1609 -r--r--r-- libs/timespec.pl +# 5212 -r--r--r-- man/cqueue.1 +# 2078 -r--r--r-- man/postclip.1 +# 6647 -r-xr-xr-x src/cqueue +# 1836 -r-xr-xr-x src/postclip +# +# ============= README ============== +if test -f 'README' -a X"$1" != X"-c"; then + echo 'x - skipping README (File already exists)' +else +echo 'x - extracting README (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'README' && +------------------------------------------------------------------------------- +Document Revision Control Information: +X mmuegel +X /usr/local/ustart/src/mail-tools/dist/foo/README,v +X 1.1 of 1993/07/28 08:12:53 +------------------------------------------------------------------------------- +X +1. Introduction +--------------- +X +These tools may be of use to those sites using sendmail. Both are written in +Perl. Our site, Mot.COM, receives a ton of mail being a top-level domain +gateway. We have over 24 domains under us. Needless to say, we must have +a robust mail system or my head, and others, would be on the chopping block. +X +2. Description +-------------- +X +The first tool, cqueue, checks the sendmail queue for problems. We use +it to flag problems with subdomain mail servers (and even our own servers +once in a while ;-). We run it via a cron job every hour during the day. +You may find this too frequent, however. +X +The other program, postclip, is used to "filter" non-deliverable NDNs that +get sent to our Postmaster account now and then. This ensures privacy of +e-mail and helps avoid disk problems from huge NDNs. It is different than +a brute force "just keep the header" approach because it tries hard to keep +other parts of the message that look like non-delivery information. +X +Both have been used for some time at our site with no problems. Everything +you need should be in this distribution: source, manual pages, and support +libs. See the manual pages for a complete description of each tool. +X +3. Installation +--------------- +X +No fancy Makefile simply because these tools are all under a large +hierarchy at my site. Installation should be a snap, however. Install +the nroff(1) man(5) manual pages from the man subdirectory to the +appropriate directory on your system. This might be something like +/usr/local/man/man1. +X +Next, install all of the Perl libraries located in the lib subdirectory +to your Perl library area. /usr/local/lib/perl is a good bet. The person +who installed Perl at your site will be able to tell you for sure. +X +Finally, you need to install the programs. Note that cqueue wants to +run setuid root by default. This is because the sendmail queue is normally +only readable by root or some special group. In order to let any user +run this suidperl is used. suidperl allows a Perl program to run with the +privileges of another user. +X +You will have to edit both the cqueue and postclip programs to change +the #! line at the top of each. Just change the pathname to whatever is +appropriate on your system. Note that Larry Wall's fixin program from +the Camel book can also be used to do this. It is very handy. It changes +#! lines by looking at your PATH. +X +If you do not have suidperl on your system change the #! line in cqueue +to reference perl instead of suidperl. +X +You may also wish to change some constants in cqueue. $DEF_QUEUE should be +changed to your queue directory if it is not /usr/spool/mqueue. $DEF_TIME +could be changed easy enough also. It is the time spec for the time duration +after which a mail message will be reported on if the -a option has not been +specified. See the manual page for more information and the format of this +constant (same as the -t argument). Then again, neither of these has to +be changed. Command line options are there to override their default +values. +X +After you have edited the programs as necessary, all that remains is to +install them to some executable directory. Install postclip mode 555 +and cqueue mode 4555 with owner root (if using suidperl) or mode 555 +(if not using suidperl). +X +4. Gripes, Comments, Etc +------------------------ +X +If you start using either of these let me know. I have other mail tools I +will likely post in the future if these prove useful. Also, if you think +something is just plain dumb/wrong/stupid let me know! +X +Cheers, +-Mike +X +-- ++----------------------------------------------------------------------------+ +| Michael S. Muegel | Internet E-Mail: mmuegel@mot.com | +| UNIX Applications Startup Group | Moto Dist E-Mail: X10090 | +| Corporate Information Office | Voice: (708) 576-0507 | +| Motorola | Fax: (708) 576-4153 | ++----------------------------------------------------------------------------+ +SHAR_EOF +chmod 0444 README || +echo 'restore of README failed' +Wc_c="`wc -c < 'README'`" +test 4308 -eq "$Wc_c" || + echo 'README: original size 4308, current size' "$Wc_c" +fi +# ============= libs/date.pl ============== +if test ! -d 'libs'; then + echo 'x - creating directory libs' + mkdir 'libs' +fi +if test -f 'libs/date.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/date.pl (File already exists)' +else +echo 'x - extracting libs/date.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/date.pl' && +;# +;# Name +;# date.pl - Perl emulation of (the output side of) date(1) +;# +;# Synopsis +;# require "date.pl"; +;# $Date = &date(time); +;# $Date = &date(time, $format); +;# +;# Description +;# This package implements the output formatting functions of date(1) in +;# Perl. The format options are based on those supported by Ultrix 4.0 +;# plus a couple of additions from SunOS 4.1.1 and elsewhere: +;# +;# %a abbreviated weekday name - Sun to Sat +;# %A full weekday name - Sunday to Saturday +;# %b abbreviated month name - Jan to Dec +;# %B full month name - January to December +;# %c date and time in local format [+] +;# %C date and time in long local format [+] +;# %d day of month - 01 to 31 +;# %D date as mm/dd/yy +;# %e day of month (space padded) - ` 1' to `31' +;# %E day of month (with suffix: 1st, 2nd, 3rd...) +;# %f month of year (space padded) - ` 1' to `12' +;# %h abbreviated month name - Jan to Dec +;# %H hour - 00 to 23 +;# %i hour (space padded) - ` 1' to `12' +;# %I hour - 01 to 12 +;# %j day of the year (Julian date) - 001 to 366 +;# %k hour (space padded) - ` 0' to `23' +;# %l date in ls(1) format +;# %m month of year - 01 to 12 +;# %M minute - 00 to 59 +;# %n insert a newline character +;# %p ante-meridiem or post-meridiem indicator (AM or PM) +;# %r time in AM/PM notation +;# %R time as HH:MM +;# %S second - 00 to 59 +;# %t insert a tab character +;# %T time as HH:MM:SS +;# %u date/time in date(1) required format +;# %U week number, Sunday as first day of week - 00 to 53 +;# %V date-time in SysV touch format (mmddHHMMyy) +;# %w day of week - 0 (Sunday) to 6 +;# %W week number, Monday as first day of week - 00 to 53 +;# %x date in local format [+] +;# %X time in local format [+] +;# %y last 2 digits of year - 00 to 99 +;# %Y all 4 digits of year ~ 1700 to 2000 odd ? +;# %z time zone from TZ environment variable w/ a trailing space +;# %Z time zone from TZ environment variable +;# %% insert a `%' character +;# %+ insert a `+' character +;# +;# [+]: These may need adjustment to fit local conventions, see below. +;# +;# For the sake of compatibility, a leading `+' in the format +;# specificaiton is removed if present. +;# +;# Remarks +;# This is version 3.4 of date.pl +;# +;# An extension of `ctime.pl' by Waldemar Kebsch (kebsch.pad@nixpbe.UUCP), +;# as modified by Marion Hakanson (hakanson@ogicse.ogi.edu). +;# +;# Unlike date(1), unknown format tags are silently replaced by "". +;# +;# defaultTZ is a blatant hack, but I wanted to be able to get date(1) +;# like behaviour by default and there does'nt seem to be an easy (read +;# portable) way to get the local TZ name back... +;# +;# For a cheap date, try... +;# +;# #!/usr/local/bin/perl +;# require "date.pl"; +;# exit print (&date(time, shift @ARGV) . "\n") ? 0 : 1; +;# +;# This package is redistributable under the same terms as apply to +;# the Perl 4.0 release. See the COPYING file in your Perl kit for +;# more information. +;# +;# Please send any bug reports or comments to tmcgonigal@gallium.com +;# +;# Modification History +;# Nmemonic Version Date Who +;# +;# NONE 1.0 02feb91 Terry McGonigal (tmcgonigal@gallium.com) +;# Created from ctime.pl +;# +;# NONE 2.0 07feb91 tmcgonigal +;# Added some of Marion Hakanson (hakanson@ogicse.ogi.edu)'s ctime.pl +;# TZ handling changes. +;# +;# NONE 2.1 09feb91 tmcgonigal +;# Corrected week number calculations. +;# +;# NONE 2.2 21oct91 tmcgonigal +;# Added ls(1) date format, `%l'. +;# +;# NONE 2.3 06nov91 tmcgonigal +;# Added SysV touch(1) date-time format, `%V' (pretty thin as +;# mnemonics go, I know, but `t' and `T' were both gone already!) +;# +;# NONE 2.4 05jan92 tmcgonigal +;# Corrected slight (cosmetic) problem with %V replacment string +;# +;# NONE 3.0 09jul92 tmcgonigal +;# Fixed a couple of problems with &ls as pointed out by +;# Thomas Richter (richter@ki1.chemie.fu-berlin.de), thanks Thomas! +;# Also added a couple of SunOS 4.1.1 strftime-ish formats, %i and %k +;# for space padded hours (` 1' to `12' and ` 0' to `23' respectivly), +;# and %C for locale long date/time format. Changed &mH to take a +;# pad char parameter to make to evaled code for %i and %k simpler. +;# Added %E for suffixed day-of-month (ie 1st, 3rd, 4th etc). +;# +;# NONE 3.1 16jul92 tmcgonigal +;# Added `%u' format to generate date/time in date(1) required +;# format (ie '%y%m%d%H%M.%S'). +;# +;# NONE 3.2 23jan93 tmcgonigal +;# Added `%f' format to generate space padded month numbers, added +;# `%E' to the header comments, it seems to have been left out (and +;# I'm sure I wanted to use it at some point in the past...). +;# +;# NONE 3.3 03feb93 tmcgonigal +;# Corrected some problems with AM/PM handling pointed out by +;# Michael S. Muegel (mmuegel@mot.com). Thanks Michael, I hope +;# this is the behaviour you were looking for, it seems more +;# correct to me... +;# +;# NONE 3.4 26jul93 tmcgonigal +;# Incorporated some fixes provided by DaviD W. Sanderson +;# (dws@ssec.wisc.edu): February was spelled incorrectly and +;# &wkno() was always using the current year while calculating +;# week numbers, regardless of year implied by the time value +;# passed to &date(). DaviD also contributed an improved &date() +;# test script, thanks DaviD, I appreciate the effort. Finally, +;# changed my mailling address from @gvc.com to @gallium.com +;# to reflect, well, my new address! +;# +;# SccsId = "%W% %E%" +;# +require 'timelocal.pl'; +package date; +X +# Months of the year +@MoY = ('January', 'February', 'March', 'April', 'May', 'June', +X 'July', 'August', 'September','October', 'November', 'December'); +X +# days of the week +@DoW = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', +X 'Thursday', 'Friday', 'Saturday'); +X +# CUSTOMIZE - defaults +$defaultTZ = 'CST'; # time zone (hack!) +$defaultFMT = '%a %h %e %T %z%Y'; # format (ala date(1)) +X +# CUSTOMIZE - `local' formats +$locTF = '%T'; # time (as HH:MM:SS) +$locDF = '%D'; # date (as mm/dd/yy) +$locDTF = '%a %b %d %T %Y'; # date/time (as dow mon dd HH:MM:SS yyyy) +$locLDTF = '%i:%M:%S %p %A %B %E %Y'; # long date/time (as HH:MM:SS a/p day month dom yyyy) +X +# Time zone info +$TZ; # wkno needs this info too +X +# define the known format tags as associative keys with their associated +# replacement strings as values. Each replacement string should be +# an eval-able expresion assigning a value to $rep. These expressions are +# eval-ed, then the value of $rep is substituted into the supplied +# format (if any). +%Tags = ( '%a', q|($rep = $DoW[$wday])=~ s/^(...).*/\1/|, # abbr. weekday name - Sun to Sat +X '%A', q|$rep = $DoW[$wday]|, # full weekday name - Sunday to Saturday +X '%b', q|($rep = $MoY[$mon]) =~ s/^(...).*/\1/|, # abbr. month name - Jan to Dec +X '%B', q|$rep = $MoY[$mon]|, # full month name - January to December +X '%c', q|$rep = $locDTF; 1|, # date/time in local format +X '%C', q|$rep = $locLDTF; 1|, # date/time in local long format +X '%d', q|$rep = &date'pad($mday, 2, "0")|, # day of month - 01 to 31 +X '%D', q|$rep = '%m/%d/%y'|, # date as mm/dd/yy +X '%e', q|$rep = &date'pad($mday, 2, " ")|, # day of month (space padded) ` 1' to `31' +X '%E', q|$rep = &date'dsuf($mday)|, # day of month (w/suffix) `1st' to `31st' +X '%f', q|$rep = &date'pad($mon+1, 2, " ")|, # month of year (space padded) ` 1' to `12' +X '%h', q|$rep = '%b'|, # abbr. month name (same as %b) +X '%H', q|$rep = &date'pad($hour, 2, "0")|, # hour - 00 to 23 +X '%i', q|$rep = &date'ampmH($hour, " ")|, # hour (space padded ` 1' to `12' +X '%I', q|$rep = &date'ampmH($hour, "0")|, # hour - 01 to 12 +X '%j', q|$rep = &date'pad($yday+1, 3, "0")|, # Julian date 001 - 366 +X '%k', q|$rep = &date'pad($hour, 2, " ")|, # hour (space padded) ` 0' to `23' +X '%l', q|$rep = '%b %d ' . &date'ls($year)|, # ls(1) style date +X '%m', q|$rep = &date'pad($mon+1, 2, "0")|, # month of year - 01 to 12 +X '%M', q|$rep = &date'pad($min, 2, "0")|, # minute - 00 to 59 +X '%n', q|$rep = "\n"|, # insert a newline +X '%p', q|$rep = &date'ampmD($hour)|, # insert `AM' or `PM' +X '%r', q|$rep = '%I:%M:%S %p'|, # time in AM/PM notation +X '%R', q|$rep = '%H:%M'|, # time as HH:MM +X '%S', q|$rep = &date'pad($sec, 2, "0")|, # second - 00 to 59 +X '%t', q|$rep = "\t"|, # insert a tab +X '%T', q|$rep = '%H:%M:%S'|, # time as HH:MM:SS +X '%u', q|$rep = '%y%m%d%H%M.%S'|, # daaate/time in date(1) required format +X '%U', q|$rep = &date'wkno($year, $yday, 0)|, # week number (weeks start on Sun) - 00 to 53 +X '%V', q|$rep = '%m%d%H%M%y'|, # SysV touch(1) date-time format (mmddHHMMyy) +X '%w', q|$rep = $wday; 1|, # day of week - Sunday = 0 +X '%W', q|$rep = &date'wkno($year, $yday, 1)|, # week number (weeks start on Mon) - 00 to 53 +X '%x', q|$rep = $locDF; 1|, # date in local format +X '%X', q|$rep = $locTF; 1|, # time in local format +X '%y', q|($rep = $year) =~ s/..(..)/\1/|, # last 2 digits of year - 00 to 99 +X '%Y', q|$rep = "$year"; 1|, # full year ~ 1700 to 2000 odd +X '%z', q|$rep = $TZ eq "" ? "" : "$TZ "|, # time zone from TZ env var (w/trail. space) +X '%Z', q|$rep = $TZ; 1|, # time zone from TZ env. var. +X '%%', q|$rep = '%'; $adv=1|, # insert a `%' +X '%+', q|$rep = '+'| # insert a `+' +); +X +sub main'date { +X local($time, $format) = @_; +X local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); +X local($pos, $tag, $rep, $adv) = (0, "", "", 0); +X +X # default to date/ctime format or strip leading `+'... +X if ($format eq "") { +X $format = $defaultFMT; +X } elsif ($format =~ /^\+/) { +X $format = $'; +X } +X +X # Use local time if can't find a TZ in the environment +X $TZ = defined($ENV{'TZ'}) ? $ENV{'TZ'} : $defaultTZ; +X ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = +X &gettime ($TZ, $time); +X +X # Hack to deal with 'PST8PDT' format of TZ +X # Note that this can't deal with all the esoteric forms, but it +X # does recognize the most common: [:]STDoff[DST[off][,rule]] +X if ($TZ =~ /^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/) { +X $TZ = $isdst ? $4 : $1; +X } +X +X # watch out in 2070... +X $year += ($year < 70) ? 2000 : 1900; +X +X # now loop throught the supplied format looking for tags... +X while (($pos = index ($format, '%')) != -1) { +X +X # grab the format tag +X $tag = substr($format, $pos, 2); +X $adv = 0; # for `%%' processing +X +X # do we have a replacement string? +X if (defined $Tags{$tag}) { +X +X # trap dead evals... +X if (! eval $Tags{$tag}) { +X print STDERR "date.pl: internal error: eval for $tag failed: $@\n"; +X return ""; +X } +X } else { +X $rep = ""; +X } +X +X # do the substitution +X substr ($format, $pos, 2) =~ s/$tag/$rep/; +X $pos++ if ($adv); +X } +X +X $format; +} +X +# dsuf - add `st', `nd', `rd', `th' to a date (ie 1st, 22nd, 29th) +sub dsuf { +X local ($mday) = @_; +X +X return $mday . 'st' if ($mday =~ m/.*1$/); +X return $mday . 'nd' if ($mday =~ m/.*2$/); +X return $mday . 'rd' if ($mday =~ m/.*3$/); +X return $mday . 'th'; +} +X +# weekno - figure out week number +sub wkno { +X local ($year, $yday, $firstweekday) = @_; +X local ($jan1, @jan1, $wks); +X +X # figure out the `time' value for January 1 of the given year +X $jan1 = &maketime ($TZ, 0, 0, 0, 1, 0, $year-1900); +X +X # figure out what day of the week January 1 was +X @jan1= &gettime ($TZ, $jan1); +X +X # and calculate the week number +X $wks = (($yday + ($jan1[6] - $firstweekday)) + 1)/ 7; +X $wks += (($wks - int($wks) > 0.0) ? 1 : 0); +X +X # supply zero padding +X &pad (int($wks), 2, "0"); +} +X +# ampmH - figure out am/pm (1 - 12) mode hour value, padded with $p (0 or ' ') +sub ampmH { local ($h, $p) = @_; &pad($h>12 ? $h-12 : ($h ? $h : 12), 2, $p); } +X +# ampmD - figure out am/pm designator +sub ampmD { shift @_ >= 12 ? "PM" : "AM"; } +X +# gettime - get the time via {local,gmt}time +sub gettime { ((shift @_) eq 'GMT') ? gmtime(shift @_) : localtime(shift @_); } +X +# maketime - make a time via time{local,gmt} +sub maketime { ((shift @_) eq 'GMT') ? &main'timegm(@_) : &main'timelocal(@_); } +X +# ls - generate the time/year portion of an ls(1) style date +sub ls { +X return ((&gettime ($TZ, time))[5] == @_[0]) ? "%R" : " %Y"; +} +X +# pad - pad $in with leading $pad until lenght $len +sub pad { +X local ($in, $len, $pad) = @_; +X local ($out) = "$in"; +X +X $out = $pad . $out until (length ($out) == $len); +X return $out; +} +X +1; +SHAR_EOF +chmod 0444 libs/date.pl || +echo 'restore of libs/date.pl failed' +Wc_c="`wc -c < 'libs/date.pl'`" +test 12339 -eq "$Wc_c" || + echo 'libs/date.pl: original size 12339, current size' "$Wc_c" +fi +# ============= libs/elapsed.pl ============== +if test -f 'libs/elapsed.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/elapsed.pl (File already exists)' +else +echo 'x - extracting libs/elapsed.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/elapsed.pl' && +;# NAME +;# elapsed.pl - convert seconds to elapsed time format +;# +;# AUTHOR +;# Michael S. Muegel <mmuegel@mot.com> +;# +;# RCS INFORMATION +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/elapsed.pl,v +;# 1.1 of 1993/07/28 08:07:19 +X +package elapsed; +X +# Time field types +$DAYS = 1; +$HOURS = 2; +$MINUTES = 3; +$SECONDS = 4; +X +# The array contains four records each with four fields. The fields are, +# in order: +# +# Type Specifies what kind of time field this is. Once of +# $DAYS, $HOURS, $MINUTES, or $SECONDS. +# +# Multiplier Specifies what time field this is via the minimum +# number of seconds this time field may specify. For +# example, the minutes field would be non-zero +# when there are 60 or more seconds. +# +# Separator How to separate this time field from the next +# *greater* field. +# +# Format sprintf() format specifier on how to print this +# time field. +@MULT_AND_SEPS = ($DAYS, 60 * 60 * 24, "+", "%d", +X $HOURS, 60 * 60, ":", "%d", +X $MINUTES, 60, ":", "%02d", +X $SECONDS, 1, "", "%02d" +X ); +X +;############################################################################### +;# Seconds_To_Elapsed +;# +;# Coverts a seconds count to form [d+]h:mm:ss. If $Collapse +;# is true then the result is compacted somewhat. The string returned +;# will be of the form [d+][[h:]mm]:ss. +;# +;# Arguments: +;# $Seconds, $Collapse +;# +;# Examples: +;# &Seconds_To_Elapsed (0, 0) -> 0:00:00 +;# &Seconds_To_Elapsed (0, 1) -> :00 +;# +;# &Seconds_To_Elapsed (119, 0) -> 0:01:59 +;# &Seconds_To_Elapsed (119, 1) -> 01:59 +;# +;# &Seconds_To_Elapsed (3601, 0) -> 1:00:01 +;# &Seconds_To_Elapsed (3601, 1) -> 1:00:01 +;# +;# &Seconds_To_Elapsed (86401, 0) -> 1+0:00:01 +;# &Seconds_To_Elapsed (86401, 1) -> 1+:01 +;# +;# Returns: +;# $Elapsed +;############################################################################### +sub main'Seconds_To_Elapsed +{ +X local ($Seconds, $Collapse) = @_; +X local ($Type, $Multiplier, @Multipliers, $Separator, $DHMS_Used, +X $Elapsed, @Mult_And_Seps, $Print_Field); +X +X $Multiplier = 1; +X @Mult_And_Seps = @MULT_AND_SEPS; +X +X # Keep subtracting the number of seconds corresponding to a time field +X # from the number of seconds passed to the function. +X while (1) +X { +X ($Type, $Multiplier, $Separator, $Format) = splice (@Mult_And_Seps, 0, 4); +X last if (! $Multiplier); +X $Seconds -= $DHMS_Used * $Multiplier +X if ($DHMS_Used = int ($Seconds / $Multiplier)); +X +X # Figure out if we should print this field +X if ($Type == $DAYS) +X { +X $Print_Field = $DHMS_Used; +X } +X +X elsif ($Collapse) +X { +X if ($Type == $HOURS) +X { +X $Print_Field = $DHMS_Used; +X } +X elsif ($Type == $MINUTES) +X { +X $Print_Field = $DHMS_Used || $Printed_Field {$HOURS}; +X } +X else +X { +X $Format = ":%02d" +X if (! $Printed_Field {$MINUTES}); +X $Print_Field = 1; +X }; +X } +X +X else +X { +X $Print_Field = 1; +X }; +X +X $Printed_Field {$Type} = $Print_Field; +X $Elapsed .= sprintf ("$Format%s", $DHMS_Used, $Separator) +X if ($Print_Field); +X }; +X +X return ($Elapsed); +}; +X +1; +SHAR_EOF +chmod 0444 libs/elapsed.pl || +echo 'restore of libs/elapsed.pl failed' +Wc_c="`wc -c < 'libs/elapsed.pl'`" +test 3198 -eq "$Wc_c" || + echo 'libs/elapsed.pl: original size 3198, current size' "$Wc_c" +fi +# ============= libs/mail.pl ============== +if test -f 'libs/mail.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/mail.pl (File already exists)' +else +echo 'x - extracting libs/mail.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/mail.pl' && +;# NAME +;# mail.pl - perl function(s) to handle mail processing +;# +;# AUTHOR +;# Michael S. Muegel (mmuegel@mot.com) +;# +;# RCS INFORMATION +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/mail.pl,v 1.1 1993/07/28 08:07:19 mmuegel Exp +X +package mail; +X +# Mailer statement to eval. $Users, $Subject, and $Verbose are substituted +# via eval +$BIN_MAILER = "/usr/ucb/mail \$Verbose -s '\$Subject' \$Users"; +X +# Sendmail command to use when $Use_Sendmail is true. +$SENDMAIL = '/usr/lib/sendmail $Verbose $Users'; +X +;############################################################################### +;# Send_Mail +;# +;# Sends $Message to $Users with a subject of $Subject. If $Message_Is_File +;# is true then $Message is assumed to be a filename pointing to the mail +;# message. This is a new option and thus the backwards-compatible hack. +;# $Users should be a space separated list of mail-ids. +;# +;# If everything went OK $Status will be 1 and $Error_Msg can be ignored; +;# otherwise, $Status will be 0 and $Error_Msg will contain an error message. +;# +;# If $Use_Sendmail is 1 then sendmail is used to send the message. Normally +;# a mailer such as Mail is used. By specifiying this you can include +;# headers in addition to text in either $Message or $Message_Is_File. +;# If either $Message or $Message_Is_File contain a Subject: header then +;# $Subject is ignored; otherwise, a Subject: header is automatically created. +;# Similar to the Subject: header, if a To: header does not exist one +;# is automatically created from the $Users argument. The mail is still +;# sent, however, to the recipients listed in $Users. This is keeping with +;# normal sendmail usage (header vs. envelope). +;# +;# In both bin mailer and sendmail modes $Verbose will turn on verbose mode +;# (normally just sendmail verbose mode output). +;# +;# Arguments: +;# $Users, $Subject, $Message, $Message_Is_File, $Verbose, $Use_Sendmail +;# +;# Returns: +;# $Status, $Error_Msg +;############################################################################### +sub main'Send_Mail +{ +X local ($Users, $Subject, $Message, $Message_Is_File, $Verbose, +X $Use_Sendmail) = @_; +X local ($BIN_MAILER_HANDLE, $Mailer_Command, $Header_Found, %Header_Map, +X $Header_Extra, $Mailer); +X +X # If the message is contained in a file read it in so we can have one +X # consistent interface +X if ($Message_Is_File) +X { +X undef $/; +X $Message_Is_File = 0; +X open (Message) || return (0, "error reading $Message: $!"); +X $Message = <Message>; +X close (Message); +X }; +X +X # If sendmail mode see if we need to add some headers +X if ($Use_Sendmail) +X { +X # Determine if a header block is included in the message and what headers +X # are there +X foreach (split (/\n/, $Message)) +X { +X last if ($_ eq ""); +X $Header_Found = $Header_Map {$1} = 1 if (/^([A-Z]\S*): /); +X }; +X +X # Add some headers? +X if (! $Header_Map {"To"}) +X { +X $Header_Extra .= "To: " . join (", ", $Users) . "\n"; +X }; +X if (($Subject ne "") && (! $Header_Map {"Subject"})) +X { +X $Header_Extra .= "Subject: $Subject\n"; +X }; +X +X # Add the required blank line between header/body if there where no +X # headers to begin with +X if ($Header_Found) +X { +X $Message = "$Header_Extra$Message"; +X } +X else +X { +X $Message = "$Header_Extra\n$Message"; +X }; +X }; +X +X # Get a string that is the mail command +X $Verbose = ($Verbose) ? "-v" : ""; +X $Mailer = ($Use_Sendmail) ? $SENDMAIL : $BIN_MAILER; +X eval "\$Mailer = \"$Mailer\""; +X return (0, "error setting \$Mailer: $@") if ($@); +X +X # need to catch SIGPIPE in case the $Mailer call fails +X $SIG {'PIPE'} = "mail'Cleanup"; +X +X # Open mailer +X return (0, "can not open mail program: $Mailer") if (! open (MAILER, "| $Mailer")); +X +X # Send off the mail! +X print MAILER $Message; +X close (MAILER); +X return (0, "error running mail program: $Mailer") if ($?); +X +X # Everything must have went AOK +X return (1); +}; +X +;############################################################################### +;# Cleanup +;# +;# Simply here so we can catch SIGPIPE and not exit. +;# +;# Globals: +;# None +;# +;# Arguments: +;# None +;# +;# Returns: +;# Nothing exciting +;############################################################################### +sub Cleanup +{ +}; +X +1; +SHAR_EOF +chmod 0444 libs/mail.pl || +echo 'restore of libs/mail.pl failed' +Wc_c="`wc -c < 'libs/mail.pl'`" +test 4356 -eq "$Wc_c" || + echo 'libs/mail.pl: original size 4356, current size' "$Wc_c" +fi +# ============= libs/mqueue.pl ============== +if test -f 'libs/mqueue.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/mqueue.pl (File already exists)' +else +echo 'x - extracting libs/mqueue.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/mqueue.pl' && +;# NAME +;# mqueue.pl - functions to work with the sendmail queue +;# +;# DESCRIPTION +;# Both Get_Queue_IDs and Parse_Control_File are available to get +;# information about the sendmail queue. The cqueue program is a good +;# example of how these functions work. +;# +;# AUTHOR +;# Michael S. Muegel (mmuegel@mot.com) +;# +;# RCS INFORMATION +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/mqueue.pl,v +;# 1.1 of 1993/07/28 08:07:19 +X +package mqueue; +X +;############################################################################### +;# Get_Queue_IDs +;# +;# Will figure out the queue IDs in $Queue that have both control and data +;# files. They are returned in @Valid_IDs. Those IDs that have a +;# control file and no data file are saved to the array globbed by +;# *Missing_Control_IDs. Likewise, those IDs that have a data file and no +;# control file are saved to the array globbed by *Missing_Data_IDs. +;# +;# If $Skip_Locked is true they a message that has a lock file is skipped +;# and will not show up in any of the arrays. +;# +;# If everything went AOK then $Status is 1; otherwise, $Status is 0 and +;# $Msg tells what went wrong. +;# +;# Globals: +;# None +;# +;# Arguments: +;# $Queue, $Skip_Locked, *Missing_Control_IDs, *Missing_Data_IDs +;# +;# Returns: +;# $Status, $Msg, @Valid_IDs +;############################################################################### +sub main'Get_Queue_IDs +{ +X local ($Queue, $Skip_Locked, *Missing_Control_IDs, +X *Missing_Data_IDs) = @_; +X local (*QUEUE, @Files, %Lock_IDs, %Data_IDs, %Control_IDs, $_); +X +X # Make sure that the * argument @arrays ar empty +X @Missing_Control_IDs = @Missing_Data_IDs = (); +X +X # Save each data, lock, and queue file in @Files +X opendir (QUEUE, $Queue) || return (0, "error getting directory listing of $Queue"); +X @Files = grep (/^(df|lf|qf)/, readdir (QUEUE)); +X closedir (QUEUE); +X +X # Create indexed list of data and control files. IF $Skip_Locked is true +X # then skip either if there is a lock file present. +X if ($Skip_Locked) +X { +X grep ((s/^lf//) && ($Lock_IDs {$_} = 1), @Files); +X grep ((s/^df//) && (! $Lock_IDs {$_}) && ($Data_IDs {$_} = 1), @Files); +X grep ((s/^qf//) && (! $Lock_IDs {$_}) && ($Control_IDs {$_} = 1), @Files); +X } +X else +X { +X grep ((s/^df//) && ($Data_IDs {$_} = 1), @Files); +X grep ((s/^qf//) && ($Control_IDs {$_} = 1), @Files); +X }; +X +X # Find missing control and data files and remove them from the lists of each +X @Missing_Control_IDs = sort (grep ((! $Control_IDs {$_}) && (delete $Data_IDs {$_}), keys (%Data_IDs))); +X @Missing_Data_IDs = sort (grep ((! $Data_IDs {$_} && (delete $Control_IDs {$_})), keys (%Control_IDs))); +X +X +X # Return the IDs in an appartently random order +X return (1, "", keys (%Control_IDs)); +}; +X +X +;############################################################################### +;# Parse_Control_File +;# +;# Will pase a sendmail queue control file for useful information. See the +;# Sendmail Installtion and Operation Guide (SMM:07) for a complete +;# explanation of each field. +;# +;# The following globbed variables are set (or cleared) by this function: +;# +;# $Sender The sender's address. +;# +;# @Recipients One or more addresses for the recipient of the mail. +;# +;# @Errors_To One or more addresses for addresses to which mail +;# delivery errors should be sent. +;# +;# $Creation_Time The job creation time in time(3) format. That is, +;# seconds since 00:00:00 GMT 1/1/70. +;# +;# $Priority An integer representing the current message priority. +;# This is used to order the queue. Higher numbers mean +;# lower priorities. +;# +;# $Status_Message The status of the mail message. It can contain any +;# text. +;# +;# @Headers Message headers unparsed but in their original order. +;# Headers that span multiple lines are not mucked with, +;# embedded \ns will be evident. +;# +;# In all e-mail addresses bounding <> pairs are stripped. +;# +;# If everything went AOK then $Status is 1. If the message with queue ID +;# $Queue_ID just does not exist anymore -1 is returned. This is very +;# possible and should be allowed for. Otherwise, $Status is 0 and $Msg +;# tells what went wrong. +;# +;# Globals: +;# None +;# +;# Arguments: +;# $Queue, $Queue_ID, *Sender, *Recipients, *Errors_To, *Creation_Time, +;# *Priority, *Status_Message, *Headers +;# +;# Returns: +;# $Status, $Msg +;############################################################################### +sub main'Parse_Control_File +{ +X local ($Queue, $Queue_ID, *Sender, *Recipients, *Errors_To, *Creation_Time, +X *Priority, *Status_Message, *Headers) = @_; +X local (*Control, $_, $Not_Empty); +X +X # Required variables and the associated control. If empty at the end of +X # parsing we return a bad status. +X @REQUIRED_INFO = ('$Creation_Time', 'T', '$Sender', 'S', '@Recipients', 'R', +X '$Priority', 'P'); +X +X # Open up the control file for read +X $Control = "$Queue/qf$Queue_ID"; +X if (! open (Control)) +X { +X return (-1) if ((-x $Queue) && (! -f "$Queue/qf$Queue_ID") && +X (! -f "$Queue/df$Queue_ID")); +X return (0, "error opening $Control for read: $!"); +X }; +X +X # Reset the globbed variables just in case +X $Sender = $Creation_Time = $Priority = $Status_Message = ""; +X @Recipients = @Errors_To = @Headers = (); +X +X # Look for a few things in the control file +X READ: while (<Control>) +X { +X $Not_Empty = 1; +X chop; +X +X PARSE: +X { +X if (/^T(\d+)$/) +X { +X $Creation_Time = $1; +X } +X elsif (/^S(<)?([^>]+)/) +X { +X $Sender = $2; +X } +X elsif (/^R(<)?([^>]+)/) +X { +X push (@Recipients, $2); +X } +X elsif (/^E(<)?([^>]+)/) +X { +X push (@Errors_To, $2); +X } +X elsif (/^M(.*)/) +X { +X $Status_Message = $1; +X } +X elsif (/^P(\d+)$/) +X { +X $Priority = $1; +X } +X elsif (/^H(.*)/) +X { +X $Header = $1; +X while (<Control>) +X { +X chop; +X last if (/^[A-Z]/); +X $Header .= "\n$_"; +X }; +X push (@Headers, $Header); +X redo PARSE if ($_); +X last if (eof); +X }; +X }; +X }; +X +X # If the file was empty scream bloody murder +X return (0, "empty control file") if (! $Not_Empty); +X +X # Yell if we could not find a required field +X while (($Var, $Control) = splice (@REQUIRED_INFO, 0, 2)) +X { +X eval "return (0, 'required control field $Control not found') +X if (! $Var)"; +X return (0, "error checking \$Var: $@") if ($@); +X }; +X +X # Everything went AOK +X return (1); +}; +X +1; +SHAR_EOF +chmod 0444 libs/mqueue.pl || +echo 'restore of libs/mqueue.pl failed' +Wc_c="`wc -c < 'libs/mqueue.pl'`" +test 6908 -eq "$Wc_c" || + echo 'libs/mqueue.pl: original size 6908, current size' "$Wc_c" +fi +# ============= libs/newgetopts.pl ============== +if test -f 'libs/newgetopts.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/newgetopts.pl (File already exists)' +else +echo 'x - extracting libs/newgetopts.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/newgetopts.pl' && +;# NAME +;# newgetopts.pl - a better newgetopt (which is a better getopts which is +;# a better getopt ;-) +;# +;# AUTHOR +;# Mike Muegel (mmuegel@mot.com) +;# +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/newgetopts.pl,v 1.1 1993/07/28 08:07:19 mmuegel Exp +X +;############################################################################### +;# New_Getopts +;# +;# Does not care about order of switches, options, and arguments like +;# getopts.pl. Thus all non-switches/options will be kept in ARGV even if they +;# are not at the end. If $Pass_Invalid is set all unkown options will be +;# passed back to the caller by keeping them in @ARGV. This is useful when +;# parsing a command line for your script while ignoring options that you +;# may pass to another script. If this is set New_Getopts tries to maintain +;# the switch clustering on the unkown switches. +;# +;# Accepts the special argument -usage to print the Usage string. Also accepts +;# the special option -version which prints the contents of the string +;# $VERSION. $VERSION may or may not have an embeded \n in it. If -usage +;# or -version are specified a status of -1 is returned. Note that the usage +;# option is only accepted if the usage string is not null. +;# +;# $Switches is just like the formal arguemnt of getopts.pl. $Usage is a usage +;# string with or without a trailing \n. *Switch_To_Order is an optional +;# pointer to the name of an associative array which will contain a mapping of +;# switch names to the order in which (if at all) the argument was entered. +;# +;# For example, if @ARGV contains -v, -x, test: +;# +;# $Switch_To_Order {"v"} = 1; +;# $Switch_To_Order {"x"} = 2; +;# +;# Note that in the case of multiple occurances of an option $Switch_To_Order +;# will store each occurance of the argument via a string that emulates +;# an array. This is done by using join ($;, ...). You can retrieve the +;# array by using split (/$;/, ...). +;# +;# *Split_ARGV is an optional pointer to an array which will conatin the +;# original switches along with their values. For the example used above +;# Split_ARGV would contain: +;# +;# @Split_ARGV = ("v", "", "x", "test"); +;# +;# Another exciting ;-) feature that newgetopts has. Along with creating the +;# normal $opt_ scalars for the last value of an argument the list @opt_ is +;# created. It is an array which contains all the values of arguments to the +;# basename of the variable. They are stored in the order which they occured +;# on the command line starting with $[. Note that blank arguments are stored +;# as "". Along with providing support for multiple options on the command +;# line this also provides a method of counting the number of times an option +;# was specified via $#opt_. +;# +;# Automatically resets all $opt_, @opt_, %Switch_To_Order, and @Split_ARGV +;# variables so that New_Getopts may be called more than once from within +;# the same program. Thus, if $opt_v is set upon entry to New_Getopts and +;# -v is not in @ARGV $opt_v will not be set upon exit. +;# +;# Arguments: +;# $Switches, $Usage, $Pass_Invalid, *Switch_To_Order, *Split_ARGV +;# +;# Returns: +;# -1, 0, or 1 depending on status (printed Usage/Version, OK, not OK) +;############################################################################### +sub New_Getopts +{ +X local($taint_argumentative, $Usage, $Pass_Invalid, *Switch_To_Order, +X *Split_ARGV) = @_; +X local(@args,$_,$first,$rest,$errs, @leftovers, @current_leftovers, +X %Switch_Found); +X local($[, $*, $Script_Name, $argumentative); +X +X # Untaint the argument cluster so that we can use this with taintperl +X $taint_argumentative =~ /^(.*)$/; +X $argumentative = $1; +X +X # Clear anything that might still be set from a previous New_Getopts +X # call. +X @Split_ARGV = (); +X +X # Get the basename of the calling script +X ($Script_Name = $0) =~ s/.*\///; +X +X # Make Usage have a trailing \n +X $Usage .= "\n" if ($Usage !~ /\n$/); +X +X @args = split( / */, $argumentative ); +X +X # Clear anything that might still be set from a previous New_Getopts call. +X foreach $first (@args) +X { +X next if ($first eq ":"); +X delete $Switch_Found {$first}; +X delete $Switch_To_Order {$first}; +X eval "undef \@opt_$first; undef \$opt_$first;"; +X }; +X +X while (@ARGV) +X { +X # Let usage through +X if (($ARGV[0] eq "-usage") && ($Usage ne "\n")) +X { +X print $Usage; +X exit (-1); +X } +X +X elsif ($ARGV[0] eq "-version") +X { +X if ($VERSION) +X { +X print $VERSION; +X print "\n" if ($VERSION !~ /\n$/); +X } +X else +X { +X warn "${Script_Name}: no version information available, sorry\n"; +X } +X exit (-1); +X } +X +X elsif (($_ = $ARGV[0]) =~ /^-(.)(.*)/) +X { +X ($first,$rest) = ($1,$2); +X $pos = index($argumentative,$first); +X +X $Switch_To_Order {$first} = join ($;, split (/$;/, $Switch_To_Order {$first}), ++$Order); +X +X if($pos >= $[) +X { +X if($args[$pos+1] eq ':') +X { +X shift(@ARGV); +X if($rest eq '') +X { +X $rest = shift(@ARGV); +X } +X +X eval "\$opt_$first = \$rest;"; +X eval "push (\@opt_$first, \$rest);"; +X push (@Split_ARGV, $first, $rest); +X } +X else +X { +X eval "\$opt_$first = 1"; +X eval "push (\@opt_$first, '');"; +X push (@Split_ARGV, $first, ""); +X +X if($rest eq '') +X { +X shift(@ARGV); +X } +X else +X { +X $ARGV[0] = "-$rest"; +X } +X } +X } +X +X else +X { +X # Save any other switches if $Pass_Valid +X if ($Pass_Invalid) +X { +X push (@current_leftovers, $first); +X } +X else +X { +X warn "${Script_Name}: unknown option: $first\n"; +X ++$errs; +X }; +X if($rest ne '') +X { +X $ARGV[0] = "-$rest"; +X } +X else +X { +X shift(@ARGV); +X } +X } +X } +X +X else +X { +X push (@leftovers, shift (@ARGV)); +X }; +X +X # Save any other switches if $Pass_Valid +X if ((@current_leftovers) && ($rest eq '')) +X { +X push (@leftovers, "-" . join ("", @current_leftovers)); +X @current_leftovers = (); +X }; +X }; +X +X # Automatically print Usage if a warning was given +X @ARGV = @leftovers; +X if ($errs != 0) +X { +X warn $Usage; +X return (0); +X } +X else +X { +X return (1); +X } +X +} +X +1; +SHAR_EOF +chmod 0444 libs/newgetopts.pl || +echo 'restore of libs/newgetopts.pl failed' +Wc_c="`wc -c < 'libs/newgetopts.pl'`" +test 7024 -eq "$Wc_c" || + echo 'libs/newgetopts.pl: original size 7024, current size' "$Wc_c" +fi +# ============= libs/strings1.pl ============== +if test -f 'libs/strings1.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/strings1.pl (File already exists)' +else +echo 'x - extracting libs/strings1.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/strings1.pl' && +;# NAME +;# strings1.pl - FUN with strings #1 +;# +;# NOTES +;# I wrote Format_Text_Block when I just started programming Perl so +;# it is probably not very Perlish code. Center is more like it :-). +;# +;# AUTHOR +;# Michael S. Muegel (mmuegel@mot.com) +;# +;# RCS INFORMATION +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/strings1.pl,v 1.1 1993/07/28 08:07:19 mmuegel Exp +X +package strings1; +X +;###############################################################################;# Center +;# +;# Center $Text assuming the output should be $Columns wide. $Text can span +;# multiple lines, of course :-). Lines within $Text that contain only +;# whitespace are not centered and are instead collapsed. This may save time +;# when printing them later. +;# +;# Arguments: +;# $Text, $Columns +;# +;# Returns: +;# $Centered_Text +;############################################################################### +sub main'Center +{ +X local ($_, $Columns) = @_; +X local ($*) = 1; +X +X s@^(.*)$@" " x (($Columns - length ($1)) / 2) . $1@eg; +X s/^[\t ]*$//g; +X return ($_); +}; +X +;############################################################################### +;# Format_Text_Block +;# +;# Formats a text string to be printed to the display or other similar device. +;# Text in $String will be fomratted such that the following hold: +;# +;# + $String contains the (possibly) multi-line text to print. It is +;# automatically word-wrapped to fit in $Columns. +;# +;# + \n'd are maintained and are not folded. +;# +;# + $Offset is pre-pended before each separate line of text. +;# +;# + If $Offset_Once is $TRUE $Offset will only appear on the first line. +;# All other lines will be indented to match the amount of whitespace of +;# $Offset. +;# +;# + If $Bullet_Indent is $TRUE $Offset will only be applied to the begining +;# of lines as they occured in the original $String. Lines that are created +;# by this routine will always be indented by blank spaces. +;# +;# + If $Columns is 0 no word-wrap is done. This might be useful to still +;# to offset each line in a buffer. +;# +;# + If $Split_Expr is supplied the string is split on it. If not supplied +;# the string is split on " \t\/\-\,\." by default. +;# +;# + If $Offset_Blank is $TRUE then empty lines will have $Offset pre-pended +;# to them. Otherwise, they will still empty. +;# +;# This is a realy workhorse routine that I use in many places because of its +;# veratility. +;# +;# Arguments: +;# $String, $Offset, $Offset_Once, $Bullet_Indent, $Columns, $Split_Expr, +;# $Offset_Blank +;# +;# Returns: +;# $Buffer +;############################################################################### +sub main'Format_Text_Block +{ +X local ($String, $Real_Offset, $Offset_Once, $Bullet_Indent, $Columns, +X $Split_Expr, $Offset_Blank) = @_; +X +X local ($New_Line, $Line, $Chars_Per_Line, $Space_Offset, $Buffer, +X $Next_New_Line, $Num_Lines, $Num_Offsets, $Offset); +X local ($*) = 0; +X local ($BLANK_TAG) = "__FORMAT_BLANK__"; +X local ($Blank_Offset) = $Real_Offset if ($Offset_Blank); +X +X # What should we split on? +X $Split_Expr = " \\t\\/\\-\\,\\." if (! $Split_Expr); +X +X # Pre-process the string - convert blank lines to __FORMAT_BLANK__ sequence +X $String =~ s/\n\n/\n$BLANK_TAG\n/g; +X $String =~ s/^\n/$BLANK_TAG\n/g; +X $String =~ s/\n$/\n$BLANK_TAG/g; +X +X # If bad $Columns/$Offset combo or no $Columns make a VERRRYYY wide $Column +X $Offset = $Real_Offset; +X $Chars_Per_Line = 16000 if (($Chars_Per_Line = $Columns - length ($Offset)) <= 0); +X $Space_Offset = " " x length ($Offset); +X +X # Get a buffer +X foreach $Line (split ("\n", $String)) +X { +X $Offset = $Real_Offset if ($Bullet_Indent); +X +X # Find where to split the line +X if ($Line ne $BLANK_TAG) +X { +X $New_Line = ""; +X while ($Line =~ /^([$Split_Expr]*)([^$Split_Expr]+)/) +X { +X if (length ("$New_Line$&") >= $Chars_Per_Line) +X { +X $Next_New_Line = $+; +X $New_Line = "$Offset$New_Line$1"; +X $Buffer .= "\n" if ($Num_Lines++); +X $Buffer .= $New_Line; +X $Offset = $Space_Offset if (($Offset) && ($Offset_Once)); +X $New_Line = $Next_New_Line; +X ++$Num_Lines; +X } +X else +X { +X $New_Line .= $&; +X }; +X $Line = $'; +X }; +X +X $Buffer .= "\n" if ($Num_Lines++); +X $Buffer .= "$Offset$New_Line$Line"; +X $Offset = $Space_Offset if (($Offset) && ($Offset_Once)); +X } +X +X else +X { +X $Buffer .= "\n$Blank_Offset"; +X }; +X }; +X +X return ($Buffer); +X +}; +X +1; +SHAR_EOF +chmod 0444 libs/strings1.pl || +echo 'restore of libs/strings1.pl failed' +Wc_c="`wc -c < 'libs/strings1.pl'`" +test 4687 -eq "$Wc_c" || + echo 'libs/strings1.pl: original size 4687, current size' "$Wc_c" +fi +# ============= libs/timespec.pl ============== +if test -f 'libs/timespec.pl' -a X"$1" != X"-c"; then + echo 'x - skipping libs/timespec.pl (File already exists)' +else +echo 'x - extracting libs/timespec.pl (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'libs/timespec.pl' && +;# NAME +;# timespec.pl - convert a pre-defined time specifyer to seconds +;# +;# AUTHOR +;# Michael S. Muegel (mmuegel@mot.com) +;# +;# RCS INFORMATION +;# mmuegel +;# /usr/local/ustart/src/mail-tools/dist/foo/libs/timespec.pl,v 1.1 1993/07/28 08:07:19 mmuegel Exp +X +package timespec; +X +%TIME_SPEC_TO_SECONDS = ("s", 1, +X "m", 60, +X "h", 60 * 60, +X "d", 60 * 60 * 24 +X ); +X +$VALID_TIME_SPEC_EXPR = "[" . join ("", keys (%TIME_SPEC_TO_SECONDS)) . "]"; +X +;############################################################################### +;# Time_Spec_To_Seconds +;# +;# Converts a string of the form: +;# +;# (<number>(s|m|h|d))+ +;# +;# to seconds. The second part of the time spec specifies seconds, minutes, +;# hours, or days, respectfully. The first part is the number of those untis. +;# There can be any number of such specifiers. As an example, 1h30m means 1 +;# hour and 30 minutes. +;# +;# If the parsing went OK then $Status is 1, $Msg is undefined, and $Seconds +;# is $Time_Spec converted to seconds. If something went wrong then $Status +;# is 0 and $Msg explains what went wrong. +;# +;# Arguments: +;# $Time_Spec +;# +;# Returns: +;# $Status, $Msg, $Seconds +;############################################################################### +sub main'Time_Spec_To_Seconds +{ +X $Time_Spec = $_[0]; +X +X $Seconds = 0; +X while ($Time_Spec =~ /^(\d+)($VALID_TIME_SPEC_EXPR)/) +X { +X $Seconds += $1 * $TIME_SPEC_TO_SECONDS {$2}; +X $Time_Spec = $'; +X }; +X +X return (0, "error parsing time spec: $Time_Spec") if ($Time_Spec ne ""); +X return (1, "", $Seconds); +X +}; +X +X +1; +SHAR_EOF +chmod 0444 libs/timespec.pl || +echo 'restore of libs/timespec.pl failed' +Wc_c="`wc -c < 'libs/timespec.pl'`" +test 1609 -eq "$Wc_c" || + echo 'libs/timespec.pl: original size 1609, current size' "$Wc_c" +fi +# ============= man/cqueue.1 ============== +if test ! -d 'man'; then + echo 'x - creating directory man' + mkdir 'man' +fi +if test -f 'man/cqueue.1' -a X"$1" != X"-c"; then + echo 'x - skipping man/cqueue.1 (File already exists)' +else +echo 'x - extracting man/cqueue.1 (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'man/cqueue.1' && +.TH CQUEUE 1L +\" +\" mmuegel +\" /usr/local/ustart/src/mail-tools/dist/foo/man/cqueue.1,v 1.1 1993/07/28 08:08:25 mmuegel Exp +\" +.ds mp \fBcqueue\fR +.de IB +.IP \(bu 2 +.. +.SH NAME +\*(mp - check sendmail queue for problems +.SH SYNOPSIS +.IP \*(mp 7 +[ \fB-abdms\fR ] [ \fB-q\fR \fIqueue-dir\fI ] [ \fB-t\fR \fItime\fR ] +[ \fB-u\fR \fIusers\fR ] [ \fB-w\fR \fIwidth\fR ] +.SH DESCRIPTION +Reports on problems in the sendmail queue. With no options this simply +means listing messages that have been in the queue longer than a default +period along with a summary of queue mail by host and status message. +.SH OPTIONS +.IP \fB-a\fR 14 +Report on all messages in the queue. This is equivalent to saying \fB-t\fR 0s. +You may like this command so much that you use it as a replacement for +\fBmqueue\fR. For example: +.sp 1 +.RS +.RS +\fBalias mqueue cqueue -a\fR +.RE +.RE +.IP \fB-b\fR 14 +Also report on bogus queue files. Those are files that +have data files and no control files or vice versa. +.IP \fB-d\fR +Print a detailed report of mail messages that have been queued longer than +the specified or default time. Information that is presented includes: +.RS +.RS +.IB +Sendmail queue identifier. +.IB +Date the message was first queued. +.IB +Sender of the message. +.IB +One or more recipients of the message. +.IB +An optional status of the message. This usually indicates why the message +has not been delivered. +.RE +.RE +.IP \fB-m\fR 14 +Mail off the results if any problems were found. +Normaly results are printed to stdout. If this option +is specified they are mailed to one or more users. Results +are not printed to stdout in this case. Results are \fBonly\fR +mailed if \*(mp found something wrong. +.IP "\fB-q\fR \fIqueue-dir\fI" +The sendmail mail queue directory. Default is \fB/usr/spool/mqueue\fR or +some other site configured value. +.IP "\fB-t\fR \fItime\fR" +List messages that have been in the queue longer than +\fItime\fR. Time should of the form: +.sp 1 +.RS +.RS +(<number>(s|m|h|d))+ +.sp 1 +.RE +.RE +.RS 14 +The second portion of the above definition +specifies seconds, minutes, hours, or +days, respectfully. The first portion is the number of +those units. There can be any number of such specifiers. +As an example, 1h30m means 1 hour and 30 minutes. +.sp 1 +The default is 2 hours. +.RE +.IP \fB-s\fR 14 +Print a summary of messages that have been queued longer than +the specified or default time. Two separate types of summaries are printed. +The first summarizes the queue messages by destination host. The host name +is gleaned from the recipient addresses for each message. +Thus the actual host names for this summary should be taken with a grain +of salt since ruleset 0 has not been applied to the address the host was +taken from nor were MX records consulted. It would be possible to add +this; however, the execution time of the script would increase +dramatically. The second summary is by status message. +.IP "\fB-u\fR \fIusers\fR" +Specify list of users to send a mail report to other than +the invoker. This option is only valid when \fB-m\fR has been +specified. Multiple recipients may be separated by spaces. +.IP "\fB-w\fR \fIwidth\fR" +Specify the page width to which the output should tailored. \fIwidth\fR +should be an integer representing some character position. The default is +80 or some other site configured value. Output is folded neatly to match +\fIwidth\fR. +.SH EXAMPLES +.nf +% \fBdate\fR +Tue Jan 19 12:07:20 CST 1993 +X +% \fBcqueue -t 21h45m -w 70\fR +X +Summary of messages in queue longer than 21:45:00 by destination +host: +X +X Number of +X Messages Destination Host +X --------- ---------------- +X 2 cigseg.rtsg.mot.com +X 1 mnesouth.corp.mot.com +X --------- +X 3 +X +Summary of messages in queue longer than 21:45:00 by status message: +X +X Number of +X Messages Status Message +X --------- -------------- +X 1 Deferred: Connection refused by mnesouth.corp.mot.com +X 2 Deferred: Host Name Lookup Failure +X --------- +X 3 +X +Detail of messages in queue longer than 21:45:00 sorted by creation +date: +X +X ID: AA20573 +X Date: 02:09:27 PM 01/18/93 +X Sender: melrose-place-owner@ferkel.ucsb.edu +X Recipient: pbaker@cigseg.rtsg.mot.com +X Status: Deferred: Host Name Lookup Failure +X +X ID: AA20757 +X Date: 02:11:30 PM 01/18/93 +X Sender: 90210-owner@ferkel.ucsb.edu +X Recipient: pbaker@cigseg.rtsg.mot.com +X Status: Deferred: Host Name Lookup Failure +X +X ID: AA21110 +X Date: 02:17:01 PM 01/18/93 +X Sender: rd_lap_wg@mdd.comm.mot.com +X Recipient: jim_mathis@mnesouth.corp.mot.com +X Status: Deferred: Connection refused by mnesouth.corp.mot.com +.fi +.SH AUTHOR +.nf +Michael S. Muegel (mmuegel@mot.com) +UNIX Applications Startup Group +Corporate Information Office, Schaumburg, IL +Motorola, Inc. +.fi +.SH COPYRIGHT NOTICE +Copyright 1993, Motorola, Inc. +.sp 1 +Permission to use, copy, modify and distribute without charge this +software, documentation, etc. is granted, provided that this +comment and the author's name is retained. The author nor Motorola assume any +responsibility for problems resulting from the use of this software. +.SH SEE ALSO +.nf +\fBsendmail(8)\fR +\fISendmail Installation and Operation Guide\fR. +.fi +SHAR_EOF +chmod 0444 man/cqueue.1 || +echo 'restore of man/cqueue.1 failed' +Wc_c="`wc -c < 'man/cqueue.1'`" +test 5212 -eq "$Wc_c" || + echo 'man/cqueue.1: original size 5212, current size' "$Wc_c" +fi +# ============= man/postclip.1 ============== +if test -f 'man/postclip.1' -a X"$1" != X"-c"; then + echo 'x - skipping man/postclip.1 (File already exists)' +else +echo 'x - extracting man/postclip.1 (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'man/postclip.1' && +.TH POSTCLIP 1L +\" +\" mmuegel +\" /usr/local/ustart/src/mail-tools/dist/foo/man/postclip.1,v 1.1 1993/07/28 08:08:25 mmuegel Exp +\" +.ds mp \fBpostclip\fR +.SH NAME +\*(mp - send only the headers to Postmaster +.SH SYNOPSIS +\*(mp [ \fB-v\fR ] [ \fIto\fR ... ] +.SH DESCRIPTION +\*(mp will forward non-delivery reports to a postmaster after deleting the body +of the message. This keeps bounced mail private and helps to avoid disk space problems. \*(mp tries its best to keep as much of the header trail as possible. +Hopefully only the original body of the message will be filtered. Only messages +that have a subject that begins with 'Returned mail:' are filtered. This +ensures that other mail is not accidently mucked with. Finally, note that +\fBsendmail\fR is used to deliver the message after it has been (possibly) +filtered. All of the original headers will remain intact. +.sp 1 +You can use this with any \fBsendmail\fR by modifying the Postmaster alias. +If you use IDA \fBsendmail\fR you could add the following to <machine>.m4: +.sp 1 +.RS +define(POSTMASTERBOUNCE, mailer-errors) +.RE +.sp 1 +In the aliases file, add a line similar to the following: +.sp 1 +.RS +mailer-errors: "|/usr/local/bin/postclip postmaster" +.RE +.SH OPTIONS +.IP \fB-v\fR +Be verbose about delivery. Probably only useful when debugging \*(mp. +.IP \fIto\fR +A list of one or more e-mail ids to send the modified +Postmaster messages to. If none are specified postmaster +is used. +.SH AUTHOR +.nf +Michael S. Muegel (mmuegel@mot.com) +UNIX Applications Startup Group +Corporate Information Office, Schaumburg, IL +Motorola, Inc. +.fi +.SH CREDITS +The original idea to filter Postmaster mail was taken from a script by +Christopher Davis <ckd@eff.org>. +.SH COPYRIGHT NOTICE +Copyright 1992, Motorola, Inc. +.sp 1 +Permission to use, copy, modify and distribute without charge this +software, documentation, etc. is granted, provided that this +comment and the author's name is retained. The author nor Motorola assume any +responsibility for problems resulting from the use of this software. +.SH SEE ALSO +.nf +\fBsendmail(8)\fR +.fi +SHAR_EOF +chmod 0444 man/postclip.1 || +echo 'restore of man/postclip.1 failed' +Wc_c="`wc -c < 'man/postclip.1'`" +test 2078 -eq "$Wc_c" || + echo 'man/postclip.1: original size 2078, current size' "$Wc_c" +fi +# ============= src/cqueue ============== +if test ! -d 'src'; then + echo 'x - creating directory src' + mkdir 'src' +fi +if test -f 'src/cqueue' -a X"$1" != X"-c"; then + echo 'x - skipping src/cqueue (File already exists)' +else +echo 'x - extracting src/cqueue (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'src/cqueue' && +#!/usr/local/ustart/bin/suidperl +X +# NAME +# cqueue - check sendmail queue for problems +# +# SYNOPSIS +# Type cqueue -usage +# +# AUTHOR +# Michael S. Muegel <mmuegel@mot.com> +# +# RCS INFORMATION +# mmuegel +# /usr/local/ustart/src/mail-tools/dist/foo/src/cqueue,v 1.1 1993/07/28 08:09:02 mmuegel Exp +X +# So that date.pl does not yell (Domain/OS version does a ``) +$ENV{'PATH'} = ""; +X +# A better getopts routine +require "newgetopts.pl"; +require "timespec.pl"; +require "mail.pl"; +require "date.pl"; +require "mqueue.pl"; +require "strings1.pl"; +require "elapsed.pl"; +X +($Script_Name = $0) =~ s/.*\///; +X +# Some defaults you may want to change +$DEF_TIME = "2h"; +$DEF_QUEUE = "/usr/spool/mqueue"; +$DEF_COLUMNS = 80; +$DATE_FORMAT = "%r %D"; +X +# Constants that probably should not be changed +$USAGE = "Usage: $Script_Name [ -abdms ] [ -q queue-dir ] [ -t time ] [ -u user ] [ -w width ]\n"; +$VERSION = "${Script_Name} by mmuegel; 1.1 of 1993/07/28 08:09:02"; +$SWITCHES = "abdmst:u:q:w:"; +$SPLIT_EXPR = '\s,\.@!%:'; +$ADDR_PART_EXPR = '[^!@%]+'; +X +# Let getopts parse for switches +$Status = &New_Getopts ($SWITCHES, $USAGE); +exit (0) if ($Status == -1); +exit (1) if (! $Status); +X +# Check args +die "${Script_Name}: -u only valid with -m\n" if (($opt_u) && (! $opt_m)); +die "${Script_Name}: -a not valid with -t option\n" if ($opt_a && $opt_t); +$opt_u = getlogin || (getpwuid ($<))[0] || $ENV{"USER"} || die "${Script_Name}: can not determine who you are!\n" if (! $opt_u); +X +# Set defaults +$opt_t = "0s" if ($opt_a); +$opt_t = $DEF_TIME if ($opt_t eq ""); +$opt_w = $DEF_COLUMNS if ($opt_w eq ""); +$opt_q = $DEF_QUEUE if ($opt_q eq ""); +$opt_s = $opt_d = 1 if (! ($opt_s || $opt_d)); +X +# Untaint the users to mail to +$opt_u =~ /^(.*)$/; +$Users = $1; +X +# Convert time option to seconds and seconds to elapsed form +die "${Script_Name}: $Msg\n" if (! (($Status, $Msg, $Seconds) = &Time_Spec_To_Seconds ($opt_t))[0]); +$Elapsed = &Seconds_To_Elapsed ($Seconds, 1); +$Time_Info = " longer than $Elapsed" if ($Seconds); +X +# Get the current time +$Current_Time = time; +$Current_Date = &date ($Current_Time, $DATE_FORMAT); +X +($Status, $Msg, @Queue_IDs) = &Get_Queue_IDs ($opt_q, 1, @Missing_Control_IDs, +X @Missing_Data_IDs); +die "$Script_Name: $Msg\n" if (! $Status); +X +# Yell about missing data/control files? +if ($opt_b) +{ +X +X $Report = "\nMessages missing control files:\n\n " . +X join ("\n ", @Missing_Control_IDs) . +X "\n" +X if (@Missing_Control_IDs); +X +X $Report .= "\nMessages missing data files:\n\n " . +X join ("\n ", @Missing_Data_IDs) . +X "\n" +X if (@Missing_Data_IDs); +}; +X +# See if any mail messages are older than $Seconds +foreach $Queue_ID (@Queue_IDs) +{ +X # Get lots of info about this sendmail message via the control file +X ($Status, $Msg) = &Parse_Control_File ($opt_q, $Queue_ID, *Sender, +X *Recipients, *Errors_To, *Creation_Time, *Priority, *Status_Message, +X *Headers); +X next if ($Status == -1); +X if (! $Status) +X { +X warn "$Script_Name: $Queue_ID: $Msg\n"; +X next; +X }; +X +X # Report on message if it is older than $Seconds +X if ($Current_Time - $Creation_Time >= $Seconds) +X { +X # Build summary by host information. Keep track of each host destination +X # encountered. +X if ($opt_s) +X { +X %Host_Map = (); +X foreach (@Recipients) +X { +X if ((/@($ADDR_PART_EXPR)$/) || (/($ADDR_PART_EXPR)!$ADDR_PART_EXPR$/)) +X { +X ($Host = $1) =~ tr/A-Z/a-z/; +X $Host_Map {$Host} = 1; +X } +X else +X { +X warn "$Script_Name: could not find host part from $_; contact author\n"; +X }; +X }; +X +X # For each unique target host add to its stats +X grep ($Host_Queued {$_}++, keys (%Host_Map)); +X +X # Build summary by message information. +X $Message_Queued {$Status_Message}++ if ($Status_Message); +X }; +X +X # Build long report information for this creation time (there may be +X # more than one message created at the same time) +X if ($opt_d) +X { +X $Creation_Date = &date ($Creation_Time, $DATE_FORMAT); +X $Recipient_Info = &Format_Text_Block (join (", ", @Recipients), +X " Recipient: ", 1, 0, $opt_w, $SPLIT_EXPR); +X $Time_To_Report {$Creation_Time} .= <<"EOS"; +X +X ID: $Queue_ID +X Date: $Creation_Date +X Sender: $Sender +$Recipient_Info +EOS +X +X # Add the status message if available to long report +X if ($Status_Message) +X { +X $Time_To_Report {$Creation_Time} .= &Format_Text_Block ($Status_Message, +X " Status: ", 1, 0, $opt_w, $SPLIT_EXPR) . "\n"; +X }; +X }; +X }; +X +}; +X +# Add the summary report by target host? +if ($opt_s) +{ +X foreach $Host (sort (keys (%Host_Queued))) +X { +X $Host_Report .= &Format_Text_Block ($Host, +X sprintf (" %-9d ", $Host_Queued{$Host}), 1, 0, $opt_w, +X $SPLIT_EXPR) . "\n"; +X $Num_Hosts += $Host_Queued{$Host}; +X }; +X if ($Host_Report) +X { +X chop ($Host_Report); +X $Report .= &Format_Text_Block("\nSummary of messages in queue$Time_Info by destination host:\n", "", 0, 0, $opt_w); +X +X $Report .= <<"EOS"; +X +X Number of +X Messages Destination Host +X --------- ---------------- +$Host_Report +X --------- +X $Num_Hosts +EOS +X }; +}; +X +# Add the summary by message report? +if ($opt_s) +{ +X foreach $Message (sort (keys (%Message_Queued))) +X { +X $Message_Report .= &Format_Text_Block ($Message, +X sprintf (" %-9d ", $Message_Queued{$Message}), 1, 0, $opt_w, +X $SPLIT_EXPR) . "\n"; +X $Num_Messages += $Message_Queued{$Message}; +X }; +X if ($Message_Report) +X { +X chop ($Message_Report); +X $Report .= &Format_Text_Block ("\nSummary of messages in queue$Time_Info by status message:\n", "", 0, 0, $opt_w); +X +X $Report .= <<"EOS"; +X +X Number of +X Messages Status Message +X --------- -------------- +$Message_Report +X --------- +X $Num_Messages +EOS +X }; +}; +X +# Add the detailed message reports? +if ($opt_d) +{ +X foreach $Time (sort { $a <=> $b} (keys (%Time_To_Report))) +X { +X $Report .= &Format_Text_Block ("\nDetail of messages in queue$Time_Info sorted by creation date:\n","", 0, 0, $opt_w) if (! $Detailed_Header++); +X $Report .= $Time_To_Report {$Time}; +X }; +}; +X +# Now mail or print the report +if ($Report) +{ +X $Report .= "\n"; +X if ($opt_m) +X { +X ($Status, $Msg) = &Send_Mail ($Users, "sendmail queue report for $Current_Date", $Report, 0); +X die "${Script_Name}: $Msg" if (! $Status); +X } +X +X else +X { +X print $Report; +X }; +X +}; +X +# I am outta here... +exit (0); +SHAR_EOF +chmod 0555 src/cqueue || +echo 'restore of src/cqueue failed' +Wc_c="`wc -c < 'src/cqueue'`" +test 6647 -eq "$Wc_c" || + echo 'src/cqueue: original size 6647, current size' "$Wc_c" +fi +# ============= src/postclip ============== +if test -f 'src/postclip' -a X"$1" != X"-c"; then + echo 'x - skipping src/postclip (File already exists)' +else +echo 'x - extracting src/postclip (Text)' +sed 's/^X//' << 'SHAR_EOF' > 'src/postclip' && +#!/usr/local/bin/perl +X +# NAME +# postclip - send only the headers to Postmaster +# +# SYNOPSIS +# postclip [ -v ] [ to ... ] +# +# AUTHOR +# Michael S. Muegel <mmuegel@mot.com> +# +# RCS INFORMATION +# /usr/local/ustart/src/mail-tools/dist/foo/src/postclip,v +# 1.1 of 1993/07/28 08:09:02 +X +# We use this to send off the mail +require "newgetopts.pl"; +require "mail.pl"; +X +# Get the basename of the script +($Script_Name = $0) =~ s/.*\///; +X +# Some famous constants +$USAGE = "Usage: $Script_Name [ -v ] [ to ... ]\n"; +$VERSION = "${Script_Name} by mmuegel; 1.1 of 1993/07/28 08:09:02"; +$SWITCHES = "v"; +X +# Let getopts parse for switches +$Status = &New_Getopts ($SWITCHES, $USAGE); +exit (0) if ($Status == -1); +exit (1) if (! $Status); +X +# Who should we send the modified mail to? +@ARGV = ("postmaster") if (! @ARGV); +$Users = join (" ", @ARGV); +@ARGV = (); +X +# Suck in the original header and save a few interesting lines +while (<>) +{ +X $Buffer .= $_ if (! /^From /); +X $Subject = $1 if (/^Subject:\s+(.*)$/); +X $From = $1 if (/^From:\s+(.*)$/); +X last if (/^$/); +}; +X +# Do not filter the message unless it has a subject and the subject indicates +# it is an NDN +if ($Subject && ($Subject =~ /^returned mail/i)) +{ +X # Slurp input by paragraph. Keep track of the last time we saw what +X # appeared to be NDN text. We keep this. +X $/ = "\n\n"; +X $* = 1; +X while (<>) +X { +X push (@Paragraphs, $_); +X $Last_Error_Para = $#Paragraphs +X if (/unsent message follows/i || /was not delivered because/); +X }; +X +X # Now save the NDN text into $Buffer +X $Buffer .= join ("", @Paragraphs [0..$Last_Error_Para]); +} +X +else +{ +X undef $/; +X $Buffer .= <>; +}; +X +# Send off the (possibly) modified mail +($Status, $Msg) = &Send_Mail ($Users, "", $Buffer, 0, $opt_v, 1); +die "$Script_Name: $Msg\n" if (! $Status); +SHAR_EOF +chmod 0555 src/postclip || +echo 'restore of src/postclip failed' +Wc_c="`wc -c < 'src/postclip'`" +test 1836 -eq "$Wc_c" || + echo 'src/postclip: original size 1836, current size' "$Wc_c" +fi +exit 0 + +-- ++----------------------------------------------------------------------------+ +| Michael S. Muegel | Internet E-Mail: mmuegel@mot.com | +| UNIX Applications Startup Group | Moto Dist E-Mail: X10090 | +| Corporate Information Office | Voice: (708) 576-0507 | +| Motorola | Fax: (708) 576-4153 | ++----------------------------------------------------------------------------+ + + "I'm disturbed, I'm depressed, I'm inadequate -- I've got it all!" + -- George from _Seinfeld_ diff --git a/contrib/sendmail/contrib/oldbind.compat.c b/contrib/sendmail/contrib/oldbind.compat.c new file mode 100644 index 000000000000..1621a7ba5e80 --- /dev/null +++ b/contrib/sendmail/contrib/oldbind.compat.c @@ -0,0 +1,79 @@ +/* +** OLDBIND.COMPAT.C +** +** Very old systems do not have res_query(), res_querydomain() or +** res_search(), so emulate them here. +** +** You really ought to be upgrading to a newer version of BIND +** (4.8.2 or later) rather than be using this. +** +** J.R. Oldroyd <jr@inset.com> +*/ + +#include <sys/types.h> +#include <netinet/in.h> +#include <arpa/nameser.h> +#include <resolv.h> + +typedef union +{ + HEADER qb1; + char qb2[PACKETSZ]; +} querybuf; + +res_query(dname, class, type, data, datalen) + char * dname; + int class; + int type; + char * data; + int datalen; +{ + int n; + querybuf buf; + + n = res_mkquery(QUERY, dname, class, type, (char *) NULL, 0, + NULL, (char *) &buf, sizeof buf); + n = res_send((char *)&buf, n, data, datalen); + + return n; +} + +res_querydomain(host, dname, class, type, data, datalen) + char * host; + char * dname; + int class; + int type; + char * data; + int datalen; +{ + int n; + querybuf buf; |