summaryrefslogtreecommitdiff
path: root/debian/local
diff options
context:
space:
mode:
authorRichard A Nelson (Rick) <cowboy@debian.org>2000-05-25 17:00:00 -0500
committerAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:40 +0200
commite138436bd1943587e16b03505f8b8cc0307c4211 (patch)
tree23d7165ea5ea99bb43ae1568f4b74d5e59a3bddb /debian/local
parent4e2c4cdcd62c4ab1d5e884e8afaa0bbe1b981e42 (diff)
downloadsendmail-debian/8.9.3-23.tar.gz
Imported Debian patch 8.9.3-23debian/8.9.3-23
Diffstat (limited to 'debian/local')
-rw-r--r--debian/local/configure903
-rw-r--r--debian/local/configure.in10
-rw-r--r--debian/local/el33t.h6
-rw-r--r--debian/local/ip-down.d43
-rw-r--r--debian/local/ip-up.d100
-rw-r--r--debian/local/parsemc608
-rw-r--r--debian/local/provider10
-rw-r--r--debian/local/runq27
-rw-r--r--debian/local/runq.131
-rw-r--r--debian/local/sendmailconfig650
-rw-r--r--debian/local/sendmailconfig.841
-rw-r--r--debian/local/sensible-mda.880
-rw-r--r--debian/local/sensible-mda.c124
-rw-r--r--debian/local/service.switch7
-rw-r--r--debian/local/service.switch-nodns8
-rw-r--r--debian/local/site.config.m4.in59
-rw-r--r--debian/local/updatedb481
17 files changed, 3188 insertions, 0 deletions
diff --git a/debian/local/configure b/debian/local/configure
new file mode 100644
index 0000000..648e260
--- /dev/null
+++ b/debian/local/configure
@@ -0,0 +1,903 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=configure.in
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+#
+# Check for presence if NISPLUS headers
+#
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:530: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 545 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 562 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 579 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in rpcsvc/nis.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:613: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 618 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
+# Fini - update site.config.m4 for sendmail build
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "site.config.m4" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CPP@%$CPP%g
+s%@ac_cv_header_rpcsvc_nis_h@%$ac_cv_header_rpcsvc_nis_h%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"site.config.m4"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/debian/local/configure.in b/debian/local/configure.in
new file mode 100644
index 0000000..7099c2b
--- /dev/null
+++ b/debian/local/configure.in
@@ -0,0 +1,10 @@
+AC_INIT(configure.in)
+
+#
+# Check for presence if NISPLUS headers
+#
+AC_CHECK_HEADERS(rpcsvc/nis.h)
+AC_SUBST(ac_cv_header_rpcsvc_nis_h)
+
+# Fini - update site.config.m4 for sendmail build
+AC_OUTPUT(site.config.m4)
diff --git a/debian/local/el33t.h b/debian/local/el33t.h
new file mode 100644
index 0000000..ce7bf94
--- /dev/null
+++ b/debian/local/el33t.h
@@ -0,0 +1,6 @@
+#define _FFR_DSN_RRT_OPTION 1
+#define _FFR_PIDFILE_OPTION 1
+#define _FFR_WRITABLE_DIRECTORIES_ARE_FATAL_OPTION 1
+#define _FFR_DONT_PROBE_INTERFACES_OPTION 1
+#define _FFR_MAXRCPT_OPTION 1
+#define _FFR_DEADLETTERDROP_OPTION 1
diff --git a/debian/local/ip-down.d b/debian/local/ip-down.d
new file mode 100644
index 0000000..1881437
--- /dev/null
+++ b/debian/local/ip-down.d
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# This script is called when ppp disconnects from the network.
+#
+# Here is where we'll stop sendmail if needed
+#
+# Written By Richard Nelson <cowboy@debian.org>
+#
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+#
+# Exit by default, check for validity before commenting out the next line:
+exit 0
+
+# New mail will only be queued
+file="/etc/mail/dialup.m4"
+if [ -f "$file" ]; then
+ echo "LOCAL_CONFIG" >> $file
+ echo "#------------------------------------------------------------" >> $file
+ echo "#" > $file
+ echo "# Dynamic updates from $0" >> $file
+ echo "#" >> $file
+ echo "# sendmail is to only queue messages until connected again" >> $file
+ echo "define(\`confDELIVERY_MODE', \`deferred')dnl" >> $file
+ echo "# Allow the queue to age without carping every four hours" >> $file
+ echo "define(\`confTO_QUEUEWARN',\`1d')dnl" >> $file
+ echo "# Don't keep host status while the network is down" >> $file
+ echo "define(\`confHOST_STATUS_DIRECTORY')dnl" >> $file
+ echo "#------------------------------------------------------------" >> $file
+ fi
+
+# Build a new sendmail.cf from sendmail.mc, including our address.
+# NOTE: The following line (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')
+m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \
+ >/etc/mail/sendmail.cf.pnew
+chmod 0640 /etc/mail/sendmail.cf.pnew
+chown root.mail /etc/mail/sendmail.cf.pnew
+mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf
+
+# Stop/reload sendmail daemon as needed
+/etc/init.d/sendmail reload
diff --git a/debian/local/ip-up.d b/debian/local/ip-up.d
new file mode 100644
index 0000000..9053a4e
--- /dev/null
+++ b/debian/local/ip-up.d
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# This script is called when ppp connects to the network.
+#
+# Here is where we'll start sendmail if needed, and will
+# run the queue in either case.
+#
+# Written By Richard Nelson <cowboy@debian.org>
+#
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+#
+# ALSO: make sure ipparam is specified somewhere in the ppp options;
+# it will be used as the name of a file in /etc/mail/peers
+#
+# Exit by default, check for validity before commenting out the next line:
+exit 0
+
+# Define our domain name (from PPP) for sendmail.
+
+# These variables are for the use of the scripts run by run-parts
+#PPP_IFACE="$1"
+#PPP_TTY="$2"
+#PPP_SPEED="$3"
+#PPP_LOCAL="$4"
+#PPP_REMOTE="$5"
+#PPP_IPPARAM="$6"
+
+if [ ! -z "$PPP_LOCAL" ]; then
+ addr=$PPP_LOCAL
+ provider=$PPP_IPPARAM
+else
+ addr=$1
+ provider=$2
+ fi
+
+# Determine our fqdn from our ISP
+maxloop=20
+cntr=0
+name=""
+until (test ! -z "$name"); do
+ cntr=$(($cntr+1))
+ name=$(nslookup $addr | grep '^Name:' | awk '{print $2}')
+ test=$(echo $name | cut -d ' ' -f 1)
+ if [ "$name" != "**" ]; then
+ break
+ elif (($cntr > $maxloop)); then
+ name=""
+ break
+ fi
+ done
+
+if [ ! -z "$name" ]; then
+ file="/etc/mail/dialup.m4"
+ echo "LOCAL_CONFIG" >> $file
+ echo "#------------------------------------------------------------" >> $file
+ echo "#" > $file
+ echo "# Dynamic updates from $0" >> $file
+ echo "#" >> $file
+ echo "# Define our true hostname (from our ISP) becomes \$j" >> $file
+ echo "define(\`confDOMAIN_NAME', \`$name')dnl" >> $file
+ echo "# Make sure we accept mail as this name (for bounces, etc)" >> $file
+ echo "Cw$name" >> $file
+ echo "# Add our hostname to class G for genericstable support" >> $file
+ echo "CG$name" >> $file
+ echo "#------------------------------------------------------------" >> $file
+ fi
+
+# Add smarthost information (if any)... But not if provider.m4 is a link !
+if [ -f /etc/mail/peers/$provider -a ! -L /etc/mail/provider.m4 ]; then
+ file="/etc/mail/provider.m4"
+ echo "LOCAL_CONFIG" >> $file
+ echo "#------------------------------------------------------------" >> $file
+ echo "#" > $file
+ echo "# Dynamic updates from $0" >> $file
+ echo "#" >> $file
+ echo "# Provider information from /etc/mail/peers/$provider" >> $file
+ cat /etc/mail/peers/$provider >> $file
+ echo "#------------------------------------------------------------" >> $file
+ fi
+
+# Build a new sendmail.cf from sendmail.mc, including our address.
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \
+ >/etc/mail/sendmail.cf.pnew
+chmod 0640 /etc/mail/sendmail.cf.pnew
+chown root.mail /etc/mail/sendmail.cf.pnew
+mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf
+
+# Purge any latent host status that might cause us to *NOT* send mail
+purgestat
+
+# Start/reload sendmail as needed
+/etc/init.d/sendmail reload # may be up, or down
+
+# Process the sendmail queue (background so as to not defer other ip-up work)
+runq &
diff --git a/debian/local/parsemc b/debian/local/parsemc
new file mode 100644
index 0000000..81a180e
--- /dev/null
+++ b/debian/local/parsemc
@@ -0,0 +1,608 @@
+#!/bin/bash
+#
+# Parse Sendmail config for databases
+#
+# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>.
+# Time-stamp: <1999/05/19 10:00:00 cowboy>
+#
+# Notes (to all):
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+# * Does *not* run with sh=ash (no echo -e support)
+#
+# Notes (to self):
+# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4
+# * remember to change gawk to awk before release (gawk is more anal)
+# * multiple db options not supported
+# * chmod/chown of secondary alias databases not being done - no harm...
+# * userdb can also have multiple databases and then a forward!
+# * need sendmail stop/start
+#
+# List of db features
+db_features="access_db bitdomain domaintable genericstable \
+ mailertable uucpdomain virtusertable use_cw_file use_ct_file";
+export db_features;
+# kluge for userdb, cr, ct, and cw files support
+db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE";
+db_files="sendmail.mc $db_features $db_files";
+export db_files;
+#
+# Variables for documentation
+date=$(date)
+export date
+user=$USER
+export user
+hostname=$(hostname)
+export hostname
+script=$0
+export script
+directory=$(pwd)
+export directory
+
+#------------------------------------------------------------------------
+# My first awk program ;-}
+pattern='BEGIN { \
+ # List of db features, split into an array \
+ str = ENVIRON["db_features"]; \
+ split(str, db_features); \
+ str = ENVIRON["db_files"]; \
+ split(str, db_files); \
+ # Prefill entries based upon sendmail/debian defaults \
+ str = "sendmail.mc m4 - /etc/mail/sendmail.mc -"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "MAIL_SETTINGS_DIR /etc/mail/ - - -"; \
+ split(str, entry); \
+ db_loc=entry[2]; \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "DATABASE_MAP_TYPE hash - - -"; \
+ split(str, entry); \
+ db_type=entry[2]; \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "confUSERDB_SPEC btree -o /etc/mail/users -"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "confCR_FILE - -o /etc/mail/relay-domains %[^\#]"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "confCT_FILE - -o /etc/mail/trusted-users %[^\#]"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "confCW_FILE - -o /etc/mail/local-host-names %[^\#]"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ str = "ALIAS_FILE newaliases - /etc/mail/aliases -"; \
+ split(str, entry); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ }; \
+ # Look for default database location \
+ # define(MAIL_SETTINGS_DIR, /etc/mail/)dnl # comment \
+ /^[:space:]*define\([:space:]*`?MAIL_SETTINGS_DIR/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/define\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ sub(/\,/, "", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ split(str, entry); \
+ entry[5] = "-"; \
+ entry[4] = "-"; \
+ entry[3] = "-"; \
+ db_loc=entry[2]; \
+ # Save lastmost entry \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ } \
+ # Look for default database type \
+ # define(DATABASE_MAP_TYPE, hash)dnl # comment \
+ /^[:space:]*define\([:space:]*`?DATABASE_MAP_TYPE/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/define\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ sub(/\,/, "", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ split(str, entry); \
+ entry[5] = "-"; \
+ entry[4] = "-"; \
+ entry[3] = "-"; \
+ db_type=entry[2]; \
+ # Save lastmost entry \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ } \
+ # Look for userdb specification \
+ # define(confUSERDB_SPEC, /etc/mail/users.db)dnl # comment \
+ /^[:space:]*define\([:space:]*`?confUSERDB_SPEC/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/define\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ sub(/\,/, "", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ split(str, entry); \
+ entry[5] = "-"; \
+ entry[4] = entry[2]; \
+ entry[3] = "-o"; \
+ entry[2] = "btree"; \
+ # Save lastmost entry \
+ sub(/\.db/, "", entry[4]); \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ } \
+ # Look for all confC?_FILE specifications \
+ # define(confCR_FILE, -o /etc/mail/relay-domains %[^\#])dnl \
+ # define(confCT_FILE, -o /etc/mail/sendmail.ct %[^\#])dnl \
+ # define(confCW_FILE, -o /etc/mail/sendmail.cw %[^\#])dnl \
+ /^[:space:]*define\([:space:]*`?confC[RTW]_FILE/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/define\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ sub(/\,/, "", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ split(str, entry); \
+ # Default elided info - format: \
+ # name [ [opts] file [opts] ] \
+ if (entry[2] == "-o") { \
+ entry[5] = entry[4]; \
+ entry[4] = entry[3]; \
+ entry[3] = entry[2]; \
+ } \
+ else { \
+ entry[5] = entry[3]; \
+ entry[4] = entry[2]; \
+ entry[3] = "-"; \
+ entry[2] = "-"; \
+ } \
+ # Save lastmost entry \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ } \
+ # Look for all ALIAS_FILE specifications \
+ #define(ALIAS_FILE, /etc/mail/aliases.private,/etc/mail/aliases)dnl \
+ /^[:space:]*define\([:space:]*`?ALIAS_FILE/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/define\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ gsub(/ /, "", str); \
+ sub(/\,/, " ", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ split(str, entry); \
+ entry[5] = "-"; \
+ entry[4] = entry[2]; \
+ entry[3] = "-"; \
+ entry[2] = "newaliases"; \
+ # Save lastmost entry \
+ dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ } \
+ # Locate all non-commented FEATURE macros \
+ # FEATURE(name[, type [flags] file])dnl #comment \
+ /^[:space:]*FEATURE\(.*\)/ { \
+ str = $0; \
+ # Strip garbage from string \
+ sub(/FEATURE\(/, "", str); \
+ sub(/\)(dnl)?.*/, "", str); \
+ if (index(str, ",") != 0) { \
+ sub(/\,/, "", str); \
+ gsub(/`/, "", str); \
+ gsub(/'"'"'/, "", str); \
+ }; \
+ split(str, entry); \
+ # Ignore non-db features \
+ for (x in db_features) { \
+ if (entry[1] == db_features[x]) { \
+ # Default elided info - format: \
+ # name [type [opts] file] \
+ if (entry[2] == "") { \
+ entry[5] = "-"; \
+ entry[4] = db_loc""entry[1]; \
+ entry[3] = "-o"; \
+ entry[2] = db_type; \
+ if (entry[1] == "use_ct_file" || \
+ entry[1] == "use_cw_file") { \
+ if (entry[1] == "use_ct_file") \
+ str = entry[1]":"dbs["confCT_FILE"]; \
+ else \
+ str = entry[1]":"dbs["confCW_FILE"]; \
+ split(str, entry, ":"); \
+ } \
+ else if (entry[1] == "access_db") \
+ entry[4] = db_loc"access"; \
+ else if (entry[1] == "uucpdomain") \
+ entry[4] = db_loc"uudomain"; \
+ } \
+ else if (entry[3] == "") { \
+ entry[5] = "-"; \
+ entry[4] = entry[2]; \
+ entry[3] = "-"; \
+ entry[2] = db_type; \
+ } \
+ else if (entry[4] == "") { \
+ entry[5] = "-"; \
+ entry[4] = entry[3]; \
+ entry[3] = "-"; \
+ }; \
+ # Save lastmost entry \
+ sub(/\.db/, "", entry[4]); \
+ dbs[entry[1]]=entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
+ }; \
+ }; \
+ }; \
+ END { \
+ # Print the found features \
+ date = ENVIRON["date"]; \
+ user = ENVIRON["user"]; \
+ hostname = ENVIRON["hostname"]; \
+ script = ENVIRON["script"]; \
+ directory = ENVIRON["directory"]; \
+ print "####################################################################"; \
+ print "##### This file is automatically generated -- edit at your own risk"; \
+ print "#####"; \
+ print "##### file: /etc/mail/databases"; \
+ print "##### generated via: "script; \
+ print "##### by: "user"@"hostname; \
+ print "##### on: "date; \
+ print "##### in: "directory; \
+ print "#####"; \
+ print "##### The following databases are used by sendmail"; \
+ print "#####"; \
+ print "####################################################################"; \
+ # delete unneeded elements \
+ #delete dbs["MAIL_SETTINGS_DIR"]; \
+ #delete dbs["DATABASE_MAP_TYPE"]; \
+ #delete dbs["confCT_FILE"]; \
+ #delete dbs["confCW_FILE"]; \
+ for (x in dbs) \
+ if (x != "ALIAS_FILE" && \
+ x != "confUSERDB_SPEC") { \
+ print x":"dbs[x]; \
+ } \
+ else { \
+ split(x":"dbs[x], entry, ":"); \
+ pfx = entry[1]":"entry[2]":"entry[3]; \
+ str = entry[4]; \
+ sfx = entry[5]":"; \
+ sub(/\,/, " ", str); \
+ split(str, entry); \
+ for (y in entry) \
+ print pfx":"entry[y]":"sfx; \
+ } \
+ }; \
+ ';
+
+#------------------------------------------------------------------------
+# Make sure not using text mailertable (it doesn't work)
+if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then
+ sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \
+ /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
+ chown root.mail /etc/mail/sendmail.mc.new
+ chmod 0664 /etc/mail/sendmail.mc.new
+ mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
+ fi;
+
+#------------------------------------------------------------------------
+# parse /etc/mail/sendmail.mc
+echo "Scanning /etc/mail/sendmail.mc"
+awk -- "$pattern" /etc/mail/sendmail.mc > /etc/mail/databases; \
+chown root.mail /etc/mail/databases
+chmod 0664 /etc/mail/databases
+#cat /etc/mail/databases
+#exit 0
+
+#------------------------------------------------------------------------
+# check for extant, non automagically generated Makefile and abort if found
+CFGFILE="/etc/mail/Makefile"
+HEADER="##### This file is automatically generated -- edit at your own risk"
+if [ -s $CFGFILE ]; then
+ if ! head -3 $CFGFILE | grep -q "^$HEADER" ; then
+ echo "Error: the current $CFGFILE is not automatically generated."
+ if [ "$1" != "force" ]; then
+ echo "Use \"$0 force\" to force (re)generation."
+ exit 1
+ else
+ echo "force specified, (re)generating file anyway."
+ fi;
+ fi;
+
+ fi;
+
+#------------------------------------------------------------------------
+echo -n "Creating /etc/mail/Makefile"
+makefile="/etc/mail/Makefile.new "
+cat <<EOT > $makefile
+#!/usr/bin/make -f
+####################################################################
+##### This file is automatically generated -- edit at your own risk
+#####
+##### file: /etc/mail/Makefile
+##### generated via: $script
+##### by: $user@$hostname
+##### on: $date
+##### in: $directory
+#####
+##### Makefile for Sendmail databases
+#####
+####################################################################
+SHELL=/bin/sh
+
+# flag used to ensure only one newaliases command is run
+newaliases_run=0
+
+#
+# all, the default target will update everything
+#
+all: \\
+EOT
+echo -n "."
+#
+# create all target
+#
+cnt=0
+for file in $db_files; do
+ line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1)
+ line=$(echo "$line" | cut -d "
+" -f 2)
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1)
+ dbtype=$(echo "$str" | cut -d ":" -f 2)
+ dbopts=$(echo "$str" | cut -d ":" -f 3)
+ dbname=$(echo "$str" | cut -d ":" -f 4)
+ dbregx=$(echo "$str" | cut -d ":" -f 5)
+ if [ $(dirname "$dbname") = "/etc/mail" ]; then
+ dbsname=$(basename "$dbname")
+ else
+ dbsname="$dbname"
+ fi;
+ if [ "$dbtype" != "-" ]; then
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -ne 1 ]; then
+ echo -e " \\" >> $makefile
+ fi;
+ if [ "$dbtype" = "m4" ]; then
+ echo -ne "\tsendmail.cf" >> $makefile
+ else
+ echo -ne "\t$dbsname.db" >> $makefile
+ fi;
+ fi;
+ done;
+ done;
+
+#------------------------------------------------------------------------
+cat <<EOT >> $makefile
+
+#
+# clean target, remove sendmail.cf and databases
+#
+clean:
+EOT
+echo -n "."
+for file in $db_files; do
+ line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1)
+ line=$(echo "$line" | cut -d "
+" -f 2)
+
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1)
+ dbtype=$(echo "$str" | cut -d ":" -f 2)
+ dbopts=$(echo "$str" | cut -d ":" -f 3)
+ dbname=$(echo "$str" | cut -d ":" -f 4)
+ dbregx=$(echo "$str" | cut -d ":" -f 5)
+ if [ $(dirname "$dbname") = "/etc/mail" ]; then
+ dbsname=$(basename "$dbname")
+ else
+ dbsname="$dbname"
+ fi;
+ if [ "$dbtype" != "-" ]; then
+ if [ "$dbtype" = "m4" ]; then
+ echo -e "\trm -f sendmail.cf" >> $makefile
+ else
+ echo -e "\trm -f $dbsname.db" >> $makefile
+ fi;
+ fi;
+ done;
+ done;
+
+#------------------------------------------------------------------------
+cat <<EOT >> $makefile
+
+#
+# Individual targets
+#
+EOT
+echo -n "."
+cnt=0
+for file in $db_files; do
+ line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1)
+ line=$(echo "$line" | cut -d "
+" -f 2)
+
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1)
+ dbtype=$(echo "$str" | cut -d ":" -f 2)
+ dbopts=$(echo "$str" | cut -d ":" -f 3)
+ dbname=$(echo "$str" | cut -d ":" -f 4)
+ dbregx=$(echo "$str" | cut -d ":" -f 5)
+ if [ $(dirname "$dbname") = "/etc/mail" ]; then
+ dbsname=$(basename "$dbname")
+ else
+ dbsname="$dbname"
+ fi;
+ if [ "$dbtype" != "-" ]; then
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -ne 1 ]; then
+ echo -e " " >> $makefile
+ fi;
+ if [ "$dbtype" = "m4" ]; then
+ echo -ne "sendmail.cf:\t$dbsname" >> $makefile
+ echo -e " dialup.m4 provider.m4" >> $makefile
+ else
+ echo -e "$dbsname.db:\t$dbsname" >> $makefile
+ fi;
+ pad="\t"
+ sfx=""
+ if [ "$dbopts" = "-o" ]; then
+ pad="\t\t"
+ sfx="; \\"
+ echo -e "\trm -f $dbname.db" >> $makefile
+ echo -e "\tif [ -s $dbname ] && \\" >> $makefile
+ echo -e "\t " \
+ "egrep -qe \"^[[:space:]]*[^\$$\#]\"" \
+ "$dbname; then \\" \
+ >> $makefile
+ fi;
+ case "$dbtype" in
+ btree)
+ echo -e $pad"makemap -d $dbtype" \
+ "$dbname.db < $dbname"$sfx >> $makefile
+ echo -e $pad"chown root.mail $dbname.db"$sfx \
+ >> $makefile
+ echo -e $pad"chmod 0664 $dbname.db"$sfx \
+ >> $makefile
+ ;;
+ dbm | btree | hash)
+ echo -e $pad"makemap $dbtype" \
+ "$dbname.db < $dbname"$sfx >> $makefile
+ echo -e $pad"chown root.mail $dbname.db"$sfx \
+ >> $makefile
+ echo -e $pad"chmod 0664 $dbname.db"$sfx \
+ >> $makefile
+ ;;
+ text)
+ true;
+ ;;
+ newaliases)
+ echo -ne $pad"if [ \$(newaliases_run)" \
+ >> $makefile
+ echo -e " -eq 0 ]; then \\" \
+ >> $makefile
+ echo -e $pad"\tnewaliases_run=1; \\" \
+ >> $makefile
+ echo -e $pad"\tnewaliases; \\" >> $makefile
+ echo -e $pad"\tfi" >> $makefile
+ echo -e $pad"chown root.mail $dbname.db" \
+ >> $makefile
+ echo -e $pad"chmod 0664 $dbname.db" \
+ >> $makefile
+ ;;
+ m4)
+ cat <<EOT >> $makefile
+ echo "Generating /etc/mail/sendmail.cf ..."
+ m4 \\
+ /usr/share/sendmail/sendmail.cf/m4/cf.m4 \\
+ /etc/mail/sendmail.mc \\
+ > /etc/mail/sendmail.cf.new \\
+ 2> /etc/mail/sendmail.cf.errors
+ chown root.mail /etc/mail/sendmail.cf.new
+ chmod 0644 /etc/mail/sendmail.cf.new
+ if [ ! -s /etc/mail/sendmail.cf.errors ]; then \\
+ rm /etc/mail/sendmail.cf.errors; \\
+ else \\
+ cat /etc/mail/sendmail.cf.errors; \\
+ echo ""; \\
+ fi;
+ # Can't tell if the errors are fatal or not ;-{
+ mv -f /etc/mail/sendmail.cf.new /etc/mail/sendmail.cf;
+EOT
+ ;;
+ *)
+ echo -e $pad"# $dbtype map not done herein" \
+ >> $makefile
+ ;;
+ esac
+ if [ "$dbopts" = "-o" ]; then
+ echo -e "\t\tfi;" >> $makefile
+ fi;
+ fi;
+ done;
+ done;
+
+cat <<EOT >> $makefile
+#
+# Optional targets... Will be touched if they don't exist.
+#
+EOT
+echo -n "."
+cnt=0
+for file in $db_files; do
+ line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1)
+ line=$(echo "$line" | cut -d "
+" -f 2)
+
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1)
+ dbtype=$(echo "$str" | cut -d ":" -f 2)
+ dbopts=$(echo "$str" | cut -d ":" -f 3)
+ dbname=$(echo "$str" | cut -d ":" -f 4)
+ dbregx=$(echo "$str" | cut -d ":" -f 5)
+ if [ $(dirname "$dbname") = "/etc/mail" ]; then
+ dbsname=$(basename "$dbname")
+ else
+ dbsname="$dbname"
+ fi;
+
+ if [ "$dbopts" = "-o" ]; then
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -ne 1 ]; then
+ echo -e " " >> $makefile
+ fi;
+ echo -e "$dbsname:" >>$makefile
+ echo -e "\ttouch $dbname" >>$makefile
+ echo -e "\tchmod 0664 $dbname" >>$makefile
+ echo -e "\tchown root.mail $dbname" >>$makefile
+ fi;
+
+ done;
+ done;
+
+cat <<EOT >> $makefile
+
+#
+# A few special targets that may not exists...
+#
+
+# dialup.m4 - created/updated by /etc/ppp/ip-up.d/sendmail
+# used to provide the true, hopefully resolvable
+# hostname (from the ISP nameservers)
+#
+# To activate, put this in /etc/mail/sendmail.mc:
+# include(\`/etc/mail/dialup.m4')dnl
+dialup.m4:
+ touch /etc/mail/dialup.m4
+ chmod 0664 /etc/mail/dialup.m4
+ chown root.mail /etc/mail/dialup.m4
+
+# provider.m4 - created by the user, or /etc/ppp/ip-up.d/sendmail
+# used to provide ISP information (masquerade_as, etc.)
+# If its a link, it will *not* be overwritten
+#
+# To activate, put this in /etc/mail/sendmail.mc:
+# include(\`/etc/mail/provider.m4')dnl
+provider.m4:
+ touch /etc/mail/provider.m4
+ chmod 0664 /etc/mail/provider.m4
+ chown root.mail /etc/mail/provider.m4
+
+EOT
+echo -n "."
+
+echo " done."
+
+#------------------------------------------------------------------------
+chown root.mail $makefile
+chmod 0770 $makefile
+mv $makefile /etc/mail/Makefile
+exit 0
diff --git a/debian/local/provider b/debian/local/provider
new file mode 100644
index 0000000..2a5bfa4
--- /dev/null
+++ b/debian/local/provider
@@ -0,0 +1,10 @@
+#/etc/mail/peers/provider
+#
+# Sample provider file for sendmail
+# used to provide ISP information (masquerade_as, smarthost, etc.)
+#
+# This is what I use when connecting to mindspring.com:
+# remove the leading dnl to activate
+LOCAL_CONFIG
+dnldefine(`SMART_HOST', `mail.mindspring.com.')dnl
+dnlMASQUERADE_AS(mindspring.com)dnl
diff --git a/debian/local/runq b/debian/local/runq
new file mode 100644
index 0000000..a62522c
--- /dev/null
+++ b/debian/local/runq
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+usage="Usage: $0 [OPTION]...
+Run the sendmail queue (sendmail -q)
+
+ --help display this help and exit
+ --version output version information and exit
+
+Report bugs to submit@bugs.debian.org"
+
+case $# in
+ 1 )
+ case "z${1}" in
+ z--help )
+ echo "$usage"; exit 0 ;;
+ z--version )
+ echo -n "runq (Debian GNU/Linux) 1.00. ";
+ echo "Copyright (c) 1997 Johnie Ingram. >= GNU GPL 2."
+ exit 0 ;;
+ * ) ;;
+ esac
+ ;;
+ * ) ;;
+esac
+
+COMMAND=/usr/sbin/sendmail
+exec $COMMAND -q $*
diff --git a/debian/local/runq.1 b/debian/local/runq.1
new file mode 100644
index 0000000..99f97a9
--- /dev/null
+++ b/debian/local/runq.1
@@ -0,0 +1,31 @@
+.TH TRUE 1 "1997 July 20" "Debian Distribution" \" -*- nroff -*-
+.SH NAME
+runq \- run the sendmail queue
+.SH SYNOPSIS
+.B runq
+.br
+.B runq
+.I sendmail options
+.br
+.B runq
+{ \-\-help, \-\-version }
+.SH DESCRIPTION
+This
+.B runq
+command is a wrapper around sendmail which tells it to run the mail
+queue in the background.
+.SH OPTIONS
+When called with exactly one argument, the following options are
+handled internally:
+.TP
+.I "\-\-help"
+Print a usage message on standard output and exit successfully.
+.TP
+.I "\-\-version"
+Print version information on standard output then exit successfully.
+.P
+In other cases, the options are simply passed on to
+.B sendmail -q.
+.SH "SEE ALSO"
+.LP
+.BR sendmail (8).
diff --git a/debian/local/sendmailconfig b/debian/local/sendmailconfig
new file mode 100644
index 0000000..96e6c88
--- /dev/null
+++ b/debian/local/sendmailconfig
@@ -0,0 +1,650 @@
+#!/bin/sh
+#
+# Interactively configure Sendmail for Debian
+#
+# Robert Leslie <rob@mars.org>,
+# Rick Nelson <cowboy@debian.org>
+
+PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+FILE="/etc/mail/sendmail.mc"
+#FILE="/u/src/sendmail/sendmail.mc"
+
+set +e
+reload="yes"
+umask 022
+
+#------------------------------------------------------------------------------
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ --no-reload)
+ reload=""
+ shift
+ ;;
+
+ *)
+ echo "Usage: $0 [--no-reload]" >&2
+ exit 1
+ ;;
+ esac
+done
+
+#------------------------------------------------------------------------------
+
+descrip() {
+ echo ""
+ echo "$1"
+ echo "$1" | sed -e 's/./-/g'
+ cat -
+ echo ""
+}
+
+yesno() {
+ local N="N" Y="Y"
+ local q="$1" def=$(eval "echo -n \$$2")
+
+ while :
+ do
+ echo -n "$q? [$def] "
+ read REPLY
+ REPLY=$(echo -n "$REPLY" | sed -e "s/^\ *//" -e "s/^\t*//")
+ test -n "$REPLY" || REPLY="$def"
+
+ case "$REPLY" in
+ [Yy]*)
+ echo yes > /dev/null
+ eval "$2=\"Y\""
+ return 0
+ ;;
+
+ [Nn]*)
+ echo no > /dev/null
+ eval "$2=\"N\""
+ return 1
+ ;;
+ esac
+ done
+}
+
+input() {
+ local q="$1" def=$(eval "echo -n \$$2")
+
+ echo -n "$q? [$def] "
+ read REPLY
+ REPLY=$(echo "$REPLY" | sed -e 's/^[ ]*//' -e 's/[ ]*$//' | cat)
+ test -n "$REPLY" || REPLY="$def"
+
+ if [ NONE = "$3" ]; then
+ test NONE != "$REPLY" || REPLY=""
+ fi
+
+ eval "$2=\"$REPLY\""
+}
+
+testconfig() {
+ CONFIG=$(grep "$1" $FILE 2>/dev/null)
+}
+
+testwrap() {
+ WRAP=$(grep "^[^#:]*sendmail[^:]*[:]" /etc/hosts.allow 2>/dev/null)
+}
+
+updatewrap() {
+ echo "Updating /etc/hosts.allow, adding \"sendmail: all\"."
+ echo "sendmail: all" | cat - /etc/hosts.allow >/etc/hosts.allow.new
+ mv -f /etc/hosts.allow.new /etc/hosts.allow
+ if [ -e /etc/init.d/netbase ]; then
+ /etc/init.d/netbase reload >/dev/null
+ else
+ /etc/init.d/inetd reload >/dev/null
+ fi
+}
+
+makecf() {
+ echo "Updating sendmail databases ..."
+ /usr/share/sendmail/updatedb
+
+ testwrap
+ if [ "$WRAP" = "" ]; then
+ updatewrap
+ fi
+
+ if [ "$reload" ] && \
+ yesno "Reload the running sendmail now with the new configuration" Y
+ then
+ echo "Reloading sendmail ..."
+ /etc/init.d/sendmail reload >/dev/null
+ fi
+}
+
+#------------------------------------------------------------------------------
+
+if [ -f $FILE ]; then
+ if yesno "Configure sendmail with the existing /etc/mail/sendmail.mc" Y
+ then
+ makecf
+ exit 0
+ fi
+fi
+
+###############################################################################
+
+exec 3>$FILE.new
+trap "rm -f $FILE.new" 0
+
+###############################################################################
+
+descrip "Sendmail Configuration" <<-EOT
+By answering the following questions, you can configure sendmail for your
+system. Default values are determined either by your existing configuration
+or from common usage.
+EOT
+
+echo -n "Press [ENTER] "
+read REPLY
+
+cat /usr/share/sendmail/sendmail.cf/cf/debproto.mc >&3
+echo "LOCAL_CONFIG" >&3
+
+###############################################################################
+
+descrip "Mail Name" <<EOT
+Your \`mail name' is the hostname portion of the address to be shown on
+outgoing news and mail messages (following the username and @ sign). This
+name will be used by other programs besides sendmail; it should be the single,
+full domain name (FQDN) from which mail will appear to originate.
+EOT
+
+mailname=$(cat /etc/mailname 2>/dev/null || hostname --fqdn)
+input "Mail name" mailname
+
+echo "$mailname" >/etc/mailname
+
+###############################################################################
+
+#descrip "Null Client" <<EOT
+#A special configuration known as the "null client" can be created for this
+#host if all mail should be forwarded to a central hub via a local SMTP-based
+#network. This may be a suitable configuration if you want to forward all of
+#your mail to your local Internet service provider (ISP) for delivery.
+#
+#To enable this option, give the name of the host to which all mail should be
+#forwarded. Otherwise leave the option empty or answer \`NONE' to disable it.
+#EOT
+
+nullclient=""
+! testconfig "FEATURE(nullclient" ||
+ nullclient=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *\([^)]*\).*/\1/')
+#
+#input "Null client forward host" nullclient NONE
+#
+#test -z "$nullclient" || echo "FEATURE(nullclient, $nullclient)dnl" >&3
+
+if [ -n "$nullclient" ]; then
+ echo " "
+ echo " *** IMPORTANT *** "
+ echo " "
+ echo "You are using a nullclient setup. This is ill advised as it"
+ echo "makes your machine an open relay: If you ever connect to the"
+ echo "internet, anyone can forge mail and send it through your machine"
+ echo "to anyone else on the internet! - not a pretty picture."
+ echo " "
+ echo "I will convert this into a Smart Host config for you. A Smart Host"
+ echo "setup is a superset of nullclient - you lose nothing, but gain local"
+ echo "delivery without kluges, and, of course you're no longer an open relay"
+ echo " "
+ echo "You will need to accept your nullclient hostname below, when asked"
+ echo "for a smart host."
+ echo " "
+ echo "Press <Enter> to continue"
+ read yn
+ fi
+
+###############################################################################
+descrip "Smart Host" <<EOT
+A "Smart Host" is one that can deliver mail to external machines. By using
+a "Smart Host", we don't need DNS, or good connectivity ourselves. This is
+most likely what you want if you have a dialup link, or sit behind a firewall.
+
+To enable this option, give the name of the host to which all non-local mail
+should be forwarded. Otherwise leave the option empty.
+EOT
+
+smarthost=""
+if [ -n "$nullclient" ]; then
+ smarthost="$nullclient"
+ fi
+! testconfig "define(\`SMART_HOST'" ||
+ smarthost=$(echo -n "$CONFIG" | sed -e 's/[^:]*:*\([^)]*\).*/\1/')
+input "Smart Host:" smarthost ""
+
+test -z "$smarthost" || echo "define(\`SMART_HOST', \`$smarthost')dnl" >&3
+if [ -n "$nullclient" -a ! -z "$smarthost" ]; then
+ echo "undefine(\`ALIAS_FILE')dnl" >&3
+ echo "define(\`confFORWARD_PATH', \`')dnl" >&3
+ echo "define(\`MAIL_HUB', \`$smarthost')dnl" >&3
+ echo "MASQUERADE_AS(\`$smarthost')dnl" >&3
+ echo "FEATURE(\`allmasquerade')dnl" >&3
+ echo "FEATURE(\`masquerade_envelope')dnl" >&3
+ fi
+###############################################################################
+
+descrip "Address Canonification" <<EOT
+Usually sendmail will canonify all addresses by consulting a name server and
+resolving hosts to their fully qualified domain name (FQDN). Under special
+circumstances you may want to disable this feature, for example if this
+machine acts only as a mail gateway.
+EOT
+
+test -z "$nullclient" || cat <<EOT
+Since this host will be configured as a null client, this option controls
+whether addresses will be qualified with \`$mailname' when
+sent to the central hub via SMTP. Disabling this feature may cause mail to
+appear to come from (and be qualified by the domain for) the hub machine
+rather than this host.
+
+EOT
+
+nocanonify="N"
+! testconfig "FEATURE(nocanonify)" || nocanonify="Y"
+
+! yesno "Disable address canonification" nocanonify ||
+ echo "FEATURE(nocanonify)dnl" >&3
+
+###############################################################################
+
+if [ -z "$nullclient" ]
+then
+
+###############################################################################
+
+descrip "SMTP Mailer" <<EOT
+If you plan to exchange mail with other computers, you should enable the
+SMTP mailer. Even if you don't plan to exchange mail with other computers,
+it is still a good idea to enable this so local programs can use it.
+EOT
+
+smtp="Y"
+if [ -f $FILE ]
+then
+ testconfig "MAILER(smtp)" || smtp="N"
+fi
+
+yesno "Enable the SMTP mailer" smtp || true
+
+###############################################################################
+
+descrip "Masquerade Envelope" <<EOT
+If you want mail envelopes (as well as mail headers) to appear to come from
+\`$mailname', you can enable this option.
+EOT
+
+masqenvelope="Y"
+if [ -f $FILE ]
+then
+ testconfig "FEATURE(masquerade_envelope)" || masqenvelope="N"
+fi
+
+! yesno "Masquerade envelopes" masqenvelope ||
+ echo "FEATURE(masquerade_envelope)dnl" >&3
+
+###############################################################################
+
+descrip "All Masquerade" <<EOT
+If enabled, this feature will cause recipient addresses to also appear to come
+from \`$mailname'. Normally they get the local hostname.
+Although this may be right for ordinary users, it can break local aliases. For
+example, if you send to "localalias", the originating sendmail will find that
+alias and send to all members, but send the message with
+"To: localalias@$mailname". Since that alias likely does
+not exist, replies will fail. Use this feature ONLY if you can guarantee that
+the ENTIRE namespace of \`$mailname' supersets all the
+local entries. If in doubt, it is safe to leave this option disabled.
+EOT
+
+allmasquerade="N"
+! testconfig "FEATURE(allmasquerade)" || allmasquerade="Y"
+
+! yesno "All masquerade" allmasquerade ||
+ echo "FEATURE(allmasquerade)dnl" >&3
+
+###############################################################################
+
+descrip "Always Add Domain" <<EOT
+If enabled, the local host domain is included even on locally delivered mail.
+Normally it is not added unless it is already present.
+EOT
+
+alwaysdomain="N"
+! testconfig "FEATURE(always_add_domain)" || alwaysdomain="Y"
+
+! yesno "Always add domain" alwaysdomain ||
+ echo "FEATURE(always_add_domain)dnl" >&3
+
+###############################################################################
+
+descrip "Mail Acceptance" <<EOT
+Sendmail is usually configured to accept mail for your mail name
+($mailname). However, under special circumstances you
+may not wish sendmail to do this, particularly if (and disabling this option
+generally requires that) mail for \`$mailname' is MXed
+to another host. If in doubt, it is safe to leave this option enabled.
+EOT
+
+acceptmailname="Y"
+if [ -f $FILE ]
+then
+ testconfig "^Cw.*$mailname" || acceptmailname="N"
+fi
+
+yesno "Accept mail for \`$mailname'" acceptmailname || true
+test "N" = "$acceptmailname" || echo "Cw$mailname" >&3
+
+###############################################################################
+
+descrip "Alternate Names" <<EOT
+In addition to the canonical mail name \`$mailname', you can
+add any number of additional alternate names to recognize for receiving mail.
+If other hosts are MXed to you for local mail, this is where you should list
+them. This list is saved into the file /etc/mail/sendmail.cw so it can be
+changed later as needed.
+
+To answer this question, separate each alternate name with a space, or answer
+\`NONE' to eliminate all alternate names.
+EOT
+
+if [ -f /etc/mail/local-host-names ]; then
+ cw_file="/etc/mail/local-host-names"
+else
+ cw_file="/etc/mail/sendmail.cw"
+ fi
+altnames=$(cat "$cw_file" 2>/dev/null | tr -s '\n \t' ' ' |
+ sed -e 's/^ *//' -e 's/ *$//')
+input "Alternate names" altnames NONE
+
+if [ -n "$altnames" ]
+then
+ echo "$altnames" | tr -s ' \t' '\n' >$cw_file
+else
+ cat /dev/null >$cw_file
+fi
+
+echo "FEATURE(use_cw_file)dnl" >&3
+
+###############################################################################
+
+descrip "Trusted Users" <<EOT
+Sendmail allows a special group of users to set their envelope "From" address
+using the -f option without generating a warning message. If you have
+software such as Majordomo installed, you will want to include the usernames
+from such software here. Note that "root", "daemon", and "uucp" are included
+automatically and do not need to be specified. This list is saved into the
+file /etc/mail/sendmail.ct so it can be changed later as needed.
+
+To answer this question, separate each username with a space, or answer
+\`NONE' to eliminate all usernames.
+EOT
+
+if [ -f /etc/mail/trusted-users ]; then
+ ct_file="/etc/mail/trusted-users"
+else
+ ct_file="/etc/mail/sendmail.ct"
+ fi
+
+trusted=$(cat "$ct_file" 2>/dev/null | tr -s '\n \t' ' ' |
+ sed -e 's/^ *//' -e 's/ *$//')
+input "Trusted users" trusted NONE
+
+if [ -n "$trusted" ]
+then
+ echo "$trusted" | tr -s ' \t' '\n' >$ct_file
+else
+ cat /dev/null >$ct_file
+fi
+
+echo "FEATURE(use_ct_file)dnl" >&3
+
+###############################################################################
+
+descrip "Redirect Feature" <<EOT
+If enabled, this feature will allow you to alias old names to
+<new-address>.REDIRECT, causing sendmail to return mail to the sender with
+an error but indicating the recipient's new address.
+EOT
+
+redirect="N"
+! testconfig "FEATURE(redirect)" || redirect="Y"
+
+! yesno "Enable redirect option" redirect || echo "FEATURE(redirect)dnl" >&3
+
+###############################################################################
+
+descrip "UUCP Addresses" <<EOT
+Sendmail can be configured to be smart about UUCP addresses, or it can do
+nothing special with UUCP addresses at all. If you care about UUCP, you will
+need to do some additional configuration, perhaps outside of this script.
+
+*** NOTE *** If you use a smart host, it is important that you say "Yes"
+here to prevent a multi-level relay hole - unless you know for *SURE* that
+your smart-host does not deal with UUCP addresses.
+EOT
+
+uucp="N"
+if [ -f $FILE ]
+then
+ testconfig "FEATURE(nouucp)" || uucp="Y"
+fi
+
+yesno "Enable UUCP addressing" uucp || echo "FEATURE(nouucp)dnl" >&3
+
+###############################################################################
+
+descrip "Sticky Host" <<EOT
+If enabled, mail sent to \`user@$mailname' is marked as
+"sticky" -- that is, the local addresses aren't matched against UDB and don't
+go through ruleset 5. This is used if you want a setup where \`user' is not
+necessarily the same as \`user@$mailname', e.g., to make
+a distinct domain-wide namespace. If in doubt, it is safe to leave this
+option disabled.
+EOT
+
+sticky="N"
+! testconfig "FEATURE(stickyhost)" || sticky="Y"
+
+! yesno "Enable sticky host option" sticky || echo "FEATURE(stickyhost)dnl" >&3
+
+###############################################################################
+
+descrip "DNS" <<EOT
+If you are directly connected to the Internet and have access to a domain
+name server, you should enable this option.
+EOT
+
+dns="Y"
+! testconfig "FEATURE(nodns)" || dns="N"
+
+yesno "Enable DNS" dns || echo "FEATURE(nodns)dnl" >&3
+
+###############################################################################
+
+if [ Y = "$dns" ]
+then
+
+###############################################################################
+
+descrip "Best MX is Local" <<EOT
+If enabled, this option will cause sendmail to accept mail as though locally
+addressed for any host that lists this machine as the best possible MX record.
+This generates additional DNS traffic, but should be OK for low-to-medium
+traffic hosts. N.B.: 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.
+EOT
+
+bestmxlocal="N"
+! testconfig "FEATURE(bestmx_is_local)" || bestmxlocal="Y"
+
+! yesno "Assume best MX is local" bestmxlocal ||
+ echo "FEATURE(bestmx_is_local)dnl" >&3
+
+###############################################################################
+
+fi # finished DNS configuration
+
+###############################################################################
+
+descrip "Mailertable" <<EOT
+If enabled, this option causes sendmail to read mail routing rules from
+the text file /etc/mail/mailertable. This is needed for unusual mailers like
+ifmail and fax programs.
+More information is in /usr/share/doc/sendmail/op.txt.gz.
+EOT
+
+mailertable="N"
+! testconfig "FEATURE(mailertable" || mailertable="Y"
+
+! yesno "Enable the mailertable feature" mailertable ||
+ echo "FEATURE(mailertable)dnl" >&3
+
+###############################################################################
+
+descrip "Sendmail Restricted Shell" <<EOT
+If enabled, this option causes sendmail to use the sendmail restricted shell
+program (smrsh) instead of /bin/sh for mailing to programs. This improves your
+ability to control what gets run via email; only those programs which appear
+in a special directory can be run. If you enable this option, please carefully
+read the smrsh(8) man page for further information.
+EOT
+
+smrsh="N"
+! testconfig "FEATURE(smrsh" || smrsh="Y"
+
+! yesno "Use the Sendmail Restricted Shell (smrsh)" smrsh ||
+ echo "FEATURE(smrsh, \`/usr/lib/sm.bin/smrsh')dnl" >&3
+
+###############################################################################
+
+descrip "Mailer Name" <<EOT
+You can change the name used for internally generated outgoing messages.
+Usually this is \`MAILER-DAEMON' but it would not be unreasonable to change
+it to something such as \`postmaster'.
+EOT
+
+daemon="MAILER-DAEMON"
+! testconfig "confMAILER_NAME" ||
+ daemon=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+
+input "Mailer name" daemon
+
+test "MAILER-DAEMON" = "$daemon" ||
+ echo "define(\`confMAILER_NAME', \`$daemon')dnl" >&3
+
+###############################################################################
+
+descrip "Me Too" <<EOT
+Sendmail normally excludes the sender address from group expansion. Enabling
+this option will cause the sender to be included.
+EOT
+
+metoo="N"
+! testconfig "confME_TOO.*True" || metoo="Y"
+
+! yesno "Enable me too option" metoo ||
+ echo "define(\`confME_TOO', True)dnl" >&3
+
+###############################################################################
+
+descrip "Message Timeouts" <<EOT
+Sendmail will issue a warning message to the sender if it can't deliver a
+message within a reasonable amount of time. It will also send a failure
+notification and give up trying to deliver the message if it can't deliver it
+after an unreasonable amount of time.
+
+You can configure the message timeouts after which warning and failure
+notifications are sent. Sendmail's defaults are 4 hours and 5 days (4h/5d),
+respectively, but many people feel warnings after only 4 hours are premature.
+EOT
+
+qw="4h"
+! testconfig "confTO_QUEUEWARN" ||
+ qw=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+
+qr="5d"
+! testconfig "confTO_QUEUERETURN" ||
+ qr=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+
+timeouts="$qw/$qr"
+
+input "Message timeouts" timeouts
+
+qw=$(expr "$timeouts" : '\([^/]*\)/')
+qr=$(expr "$timeouts" : '[^/]*/\(.*\)')
+
+test "4h" = "$qw" || echo "define(\`confTO_QUEUEWARN', \`$qw')dnl" >&3
+test "5d" = "$qr" || echo "define(\`confTO_QUEUERETURN', \`$qr')dnl" >&3
+
+###############################################################################
+echo "MAILER_DEFINITIONS" >&3
+echo "MAILER(local)dnl" >&3
+
+test "N" = "$smtp" || echo "MAILER(smtp)dnl" >&3
+
+###############################################################################
+
+if [ -e /etc/ifmail/config ] && \
+ [ -e /usr/share/sendmail/sendmail.cf/mailer/ifmail.m4 ];
+then
+ echo "MAILER(ifmail)dnl" >&3
+fi
+
+###############################################################################
+
+fi # finished non-"null client" configuration
+
+
+###############################################################################
+
+echo "" >&3
+echo "LOCAL_CONFIG" >&3
+if [ -z $nullclient ]; then
+ echo "MASQUERADE_AS($mailname)dnl" >&3
+ fi
+
+if [ -f $FILE ]; then
+ sed -n -e '/^## Custom/,$p' $FILE >&3
+else
+ echo "## Custom configurations below (will be preserved)" >&3
+fi
+
+descrip "Configuration Complete" <<EOT
+Advanced configuration, such as alternate mailers, the use of mailertables,
+Bitnet domains, and UUCP domains can be accomplished by manually editing the
+/etc/mail/sendmail.mc configuration file and rerunning
+\`$0' to generate the appropriate /etc/mail/sendmail.cf
+file. (Local changes made at the end of /etc/mail/sendmail.mc will be
+preserved by \`$0'.)
+
+The m4 library files for sendmail configuration are kept in the
+/usr/share/sendmail/sendmail.cf directory. You may wish to review the
+documentation in /usr/share/doc/sendmail to assist in further customization.
+
+You may wish to customize your alias database; see the aliases(5) man page
+for information on the format and use of the /etc/aliases file.
+EOT
+
+###############################################################################
+
+exec 3>&-
+
+if [ -f $FILE ]
+then
+ echo "Saving old /etc/mail/sendmail.mc as /etc/mail/sendmail.mc.old ..."
+ mv -f $FILE $FILE.old
+fi
+
+mv -f $FILE.new $FILE
+trap 0
+
+makecf
+exit 0
diff --git a/debian/local/sendmailconfig.8 b/debian/local/sendmailconfig.8
new file mode 100644
index 0000000..b2cd52c
--- /dev/null
+++ b/debian/local/sendmailconfig.8
@@ -0,0 +1,41 @@
+.TH SENDMAILCONFIG 8 21-Jan-1997
+.SH NAME
+sendmailconfig \- configure sendmail for Debian systems
+.SH SYNOPSIS
+sendmailconfig [--no-reload]
+.SH DESCRIPTION
+.B sendmailconfig
+is used to simplify the configuration of sendmail(8) for use on Debian
+systems.
+.PP
+In the simplest case, you may run this program to (re)configure sendmail for
+your Debian system at any time. It will modify the file /etc/mail/sendmail.mc
+in order to create a working sendmail configuration which will be written to
+the file /etc/mail/sendmail.cf.
+.PP
+For advanced configurations, you can modify the sendmail.mc file before
+generating sendmail.cf. Future invokations of
+.B sendmailconfig
+will preserve these changes provided they are made at the end of the file.
+.PP
+Normally
+.B sendmailconfig
+will ask if you want to reload sendmail after making changes to its
+configuration. The --no-reload option will avoid this question.
+.SH FILES
+.TP
+/etc/mail/sendmail.mc
+sendmail m4 input to generate sendmail.cf
+.TP
+/etc/mail/sendmail.cf
+actual sendmail configuration file
+.TP
+/etc/mail/sendmail.cw
+names for which we will accept mail in the standard configuration
+.TP
+/etc/mail/sendmail.ct
+names of trusted users in the standard configuration
+.SH SEE ALSO
+sendmail(8)
+.SH AUTHOR
+Robert Leslie <rob@mars.org>
diff --git a/debian/local/sensible-mda.8 b/debian/local/sensible-mda.8
new file mode 100644
index 0000000..bdb1186
--- /dev/null
+++ b/debian/local/sensible-mda.8
@@ -0,0 +1,80 @@
+.\" Copyright (c) 1998, 1999 Richard A Nelson <cowboy@debian.org>
+.\" All rights reserved.
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License
+.\"
+.\" $Id: sendmailconfig.8,v 2.0 1999/10/21 11:30:00 cowboy Exp $
+.\"
+.TH SENDMAILCONFIG 8 "October 21 1999"
+.UC 4
+.SH NAME
+sensible\-mda \- a generic sendmail local MDA for Debian systems
+.SH SYNOPSIS
+.B sensible\-mda
+.IR from
+.IR to
+.IR detail
+.IR client\-addr
+.br
+.SH DESCRIPTION
+.B sensible\-mda
+is used to simplify the installation and configuration of
+.BR sendmail (8)
+for use on Debian systems. With sensible\-mda, sendmail can support
+a plethora of MDAs (procmail, deliver, etc.) without having pick any
+.I one
+of them as required.
+.LP
+.SH FUNCTION
+.B sensible\-mda
+is called by sendmail as a local mailer when the following exists in
+sendmail.mc:
+.br
+.I define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl
+.LP
+sensible-mda
+will look for the following MDAs (in this order), and pass the mail
+on to the first SUID MDA found:
+.BR procmail (1),
+.BR deliver (8)
+.LP
+.SH OPTIONS
+Available command line options are the following:
+.TP
+.I from
+The sender of this email
+(sendmail $g variable)
+.TP
+.I to
+The recipient of this email
+(sendmail $u variable)
+.TP
+.I detail
+The detail portion of the recipient userid
+(sendmail $h variable)
+\- ie:
+.br
+cowboy\+\fIsendmail\fP@debian.org
+.TP
+.I client\-addr
+TCP/IP address of the sender
+(sendmail ${client_addr} variable)
+Not used (for the nonce)
+.SH FILES
+.TP
+.I /etc/mail/sendmail.mc
+sendmail m4 input to generate sendmail.cf
+.TP
+.I /etc/mail/sendmail.cf
+actual sendmail configuration file (treated as a binary file)
+.SH "SEE ALSO"
+.BR sendmail (8),
+.BR procmail (1),
+.BR deliver (8)
+.br
+.SH BUGS
+None known so far.
+.SH AUTHOR
+Richard Nelson <cowboy@debian.org>
+.SH HISTORY
diff --git a/debian/local/sensible-mda.c b/debian/local/sensible-mda.c
new file mode 100644
index 0000000..d42b0cb
--- /dev/null
+++ b/debian/local/sensible-mda.c
@@ -0,0 +1,124 @@
+/*
+ * sensible-mda.c
+ * Copyright (c) 1998, Johnie Ingram.
+ * Copyright (c) 1998, Richard Nelson <cowboy@debian.org>.
+ * Time-stamp: <1998/08/13 10:00:00 cowboy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+// TODO: declare -x TCPREMOTEIP="$3"
+
+#define PROCMAIL "/usr/bin/procmail"
+#define DELIVER "/usr/bin/deliver"
+#define PROCMAILRCS "/etc/procmailrcs/"
+
+static void help(void);
+static unsigned char program[64];
+
+static struct stat MDA_stat;
+static struct stat procmailrc_stat;
+static int done = 1;
+static struct passwd* passwd_entry;
+
+int
+main (int argc, char *argv[])
+{
+
+ char *procmailrc;
+
+ /*----------------------------------------------------------------*/
+ /* Parse input to determine to whom to speak and who we are... */
+ /* Must have at least three parameters unless first is ?,-?,/?. */
+ /*----------------------------------------------------------------*/
+ (void) strcpy(program, argv[0]);
+ if (argc >= 2 &&
+ (strcmp(argv[1],"?") == 0 || strcmp(argv[1],"-?") == 0 ||
+ strcmp(argv[1],"/?") == 0 || strcmp(argv[1],"\\?") == 0 ||
+ strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0)) {
+ help();
+ return (0);
+ }
+ if (argc < 3) {
+ (void)printf("%s - Required parameters elided.\n",program);
+ help();
+ return (0);
+ }
+
+
+ if (!stat(PROCMAIL, &MDA_stat)) {
+ if (MDA_stat.st_mode & S_ISUID) {
+ procmailrc=malloc(strlen(PROCMAILRCS)+strlen(argv[2])+1);
+ sprintf(procmailrc,"%s%s",PROCMAILRCS,argv[2]);
+ passwd_entry=getpwnam(argv[2]);
+ /*
+ * If argv[2] is a valid user &
+ * /etc/procmailrcs/argv[2] exists & is owned by argv[2]
+ */
+ if (passwd_entry &&
+ !stat(procmailrc, &procmailrc_stat) &&
+ procmailrc_stat.st_uid==passwd_entry->pw_uid) {
+ done = 0;
+ execl (PROCMAIL, PROCMAIL, "-t",
+ "-f", argv[1], "-m", procmailrc, "-a", argv[3], NULL);
+ } else {
+ done = 0;
+ execl (PROCMAIL, PROCMAIL, "-t",
+ "-f", argv[1], "-a", argv[3], "-d", argv[2], NULL);
+ }
+ }
+ else
+ fprintf(stderr, "Ack!?! %s is not setuid!\n", PROCMAIL);
+ }
+
+ if (done && !stat(DELIVER, &MDA_stat)) {
+ if (MDA_stat.st_mode & S_ISUID) {
+ done = 0;
+ execl (DELIVER, DELIVER, "-r", argv[1], argv[2], NULL);
+ }
+ else
+ fprintf(stderr, "Ack!?! %s is not setuid!\n", DELIVER);
+ }
+
+ fprintf (stderr, "Huh? Neither %s nor %s was found (or was suid)!\n",
+ PROCMAIL, DELIVER);
+
+ return (75);
+}
+
+
+/*-------------------------------------------------------------------*/
+/* Help... */
+/*-------------------------------------------------------------------*/
+static void help(void)
+{
+ (void)printf("\n%s - Help information.\n"
+ "%s: sendmail MTA->MDA wrapper, supporting these MDAs:\n"
+ "\tprocmail, deliver\n"
+ "\n"
+ "Syntax: %s from to\n"
+ ,program, program, program
+ );
+ return;
+}
+
diff --git a/debian/local/service.switch b/debian/local/service.switch
new file mode 100644
index 0000000..2a64668
--- /dev/null
+++ b/debian/local/service.switch
@@ -0,0 +1,7 @@
+# /etc/mail/nsswitch.conf
+#
+# This is the format that sendmail expects (no colon after the service)
+#
+passwd files
+hosts files dns
+aliases files
diff --git a/debian/local/service.switch-nodns b/debian/local/service.switch-nodns
new file mode 100644
index 0000000..583b238
--- /dev/null
+++ b/debian/local/service.switch-nodns
@@ -0,0 +1,8 @@
+# /etc/mail/nsswitch.conf
+#
+# This is the format that sendmail expects (no colon after the service)
+# This file will prevent dns usage
+#
+passwd files
+hosts files
+aliases files
diff --git a/debian/local/site.config.m4.in b/debian/local/site.config.m4.in
new file mode 100644
index 0000000..9df1cee
--- /dev/null
+++ b/debian/local/site.config.m4.in
@@ -0,0 +1,59 @@
+#
+# Debian site config file for building sendmail
+#
+# src
+APPENDDEF(`confENVDEF', `-DTCPWRAPPERS=1')dnl
+APPENDDEF(`confENVDEF', `-D_PATH_VARTMP=\"/var/lib/sendmail/\"')dnl
+APPENDDEF(`confENVDEF', `-DPICKY_HELO_CHECK')dnl
+APPENDDEF(`confENVDEF', `-D_PATH_SENDMAILCF=\"/etc/mail/sendmail.cf\"')dnl
+# src - mime header size (pine, etc. exploit)
+APPENDDEF(`confENVDEF', `-D_FFR_MAX_MIME_HEADER_LENGTH=1')dnl
+# src - header length DOS
+APPENDDEF(`confENVDEF', `-D_FFR_MAX_HEADERS_LENGTH=1')
+# src - For Future Reference... undocumented niceties
+dnl APPENDDEF(`confENVDEF', `-include ../../debian/el33t.h')dnl
+APPENDDEF(`confENVDEF', `-D_FFR_DSN_RRT_OPTION=1')dnl
+APPENDDEF(`confENVDEF', `-D_FFR_PIDFILE_OPTION=1')dnl
+APPENDDEF(`confENVDEF', `-D_FFR_DEADLETTERDROP_OPTION=1')dnl
+#
+# smrsh
+APPENDDEF(`confENVDEF', `-DCMDDIR=\"/usr/lib/sm.bin\"')dnl
+APPENDDEF(`confENVDEF', `-DPATH=\"/usr/bin:/bin\"')dnl
+#
+# rmail
+APPENDDEF(`confENVDEF', `-D_PATH_SENDMAIL=\"/usr/sbin/sendmail\"')dnl
+#
+# compilation
+define(`confCC', `gcc')dnl
+define(`confOPTIMIZE', `-O2 -g -Wall')dnl
+#
+# Database maps, based upon presence of NISPLUS from autoconf
+define(`ac_cv_header_rpcsvc_nis_h', `@ac_cv_header_rpcsvc_nis_h@')dnl
+ifelse(ac_cv_header_rpcsvc_nis_h, `yes',
+ `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS -DNISPLUS')',
+ `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS')'
+ )dnl
+#
+# paths, owners, and modes
+define(`confEBINDIR', `/usr/lib/sm.bin')dnl #mail.local,smrsh,etc.
+define(`confHDIR', `/usr/lib')dnl
+define(`confHFDIR', `/usr/share/sendmail')dnl
+define(`confMANROOT', `/usr/share/man/man')dnl
+define(`confMANOWN', `root')dnl
+define(`confMANGRP', `root')dnl
+define(`confMANMODE', `0744')dnl
+define(`confMBINDIR', `/usr/sbin')dnl #MTA dir
+define(`confSBINDIR', `/usr/sbin')dnl #root dir
+define(`confSBINOWN', `root')dnl
+define(`confSBINGRP', `mail')dnl
+define(`confSBINMODE', `07555')dnl
+define(`confSTDIR', `/var/lib/sendmail')dnl
+define(`confUBINDIR', `/usr/bin')dnl #usr dir
+define(`confUBINOWN', `root')dnl
+define(`confUBINGRP', `mail')dnl
+define(`confUBINMODE', `0755')dnl
+#
+# don't install man pages
+define(`confNO_MAN_INSTALL', `true')dnl
+#
+# flags
diff --git a/debian/local/updatedb b/debian/local/updatedb
new file mode 100644
index 0000000..389af5a
--- /dev/null
+++ b/debian/local/updatedb
@@ -0,0 +1,481 @@
+#!/bin/sh -e
+#
+# Update Sendmail databases for Debian
+#
+# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>.
+# Time-stamp: <1999/05/19 10:00:00 cowboy>
+#
+# Notes (to all):
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+#
+# Notes (to self):
+# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4
+# * multiple db options not supported
+# * userdb can also have multiple databases and then a forward!
+# * need sendmail stop/start
+#
+set -e
+
+# List of db features
+db_features="access_db bitdomain domaintable genericstable \
+ mailertable uucpdomain virtusertable use_ct_file use_cw_file";
+export db_features;
+# kluge for userdb, cr,ct,and cw files support
+db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE";
+db_files="sendmail.mc $db_features $db_files";
+export db_files;
+
+# control amount of output
+verbosity=0;
+
+# flag used to ensure only one newaliases command is run
+newaliases_run=0;
+
+# flag used to indicate a dataset has been moved, may need another update
+changed=0;
+
+# max return code
+max_rc=0;
+missing_rqd=0;
+missing_opt=0;
+m4_errors=0;
+
+#-------------------------------------------------------------
+# Initial update of sendmail.mc/databases
+#-------------------------------------------------------------
+initial () {
+ if [ $verbosity -gt 1 ]; then
+ echo "initial()";
+ fi;
+
+ # Make sure not using text mailertable (it doesn't work)
+ if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then
+ sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \
+ /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
+ chown root.mail /etc/mail/sendmail.mc.new
+ chmod 0664 /etc/mail/sendmail.mc.new
+ mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
+ fi;
+
+ # Make sure the data file is current using the version of
+ # parsemc that corresponds to this version of updatedb
+ $(dirname $0)/parsemc || true
+ }
+
+#-------------------------------------------------------------
+# Handle found databases
+#-------------------------------------------------------------
+is_found () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_found()";
+ fi;
+ process=1;
+
+ case "$dbfeat" in
+ ALIAS_FILE)
+ if [ ! -f /etc/aliases -a -f /etc/mail/aliases ]; then
+ echo "Linking /etc/aliases to /etc/mail/aliases"
+ ln -sf mail/aliases /etc/aliases
+ fi
+ ;;
+ esac
+ }
+
+#-------------------------------------------------------------
+# Handle missing databases:
+# moving /etc/xxx to /etc/mail/xxx
+# rename /etc/mail/xxx to /etc/mail/yyy
+#-------------------------------------------------------------
+is_not_found () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_not_found()";
+ fi;
+ process=0;
+
+ case "$dbfeat" in
+ use_cw_file)
+ if [ -f /etc/local-host-names ]; then
+ if [ ! -L /etc/local-host-names ]; then
+ echo "Moving /etc/local-host-names to /etc/mail/."
+ mv /etc/local-host-names /etc/mail/
+ process=1;
+ else
+ echo "/etc/local-host-names is a link," \
+ "move it to /etc/mail/local-host-names"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ elif [ -f /etc/mail/sendmail.cw ]; then
+ echo "Renaming sendmail.cw to local-host-names."
+ mv /etc/mail/sendmail.cw /etc/mail/local-host-names
+ process=1;
+ elif [ -f /etc/sendmail.cw ]; then
+ if [ ! -L /etc/sendmail.cw ]; then
+ echo "Moving /etc/sendmail.cw to /etc/mail/"
+ mv /etc/sendmail.cw /etc/mail/local-host-names
+ process=1;
+ else
+ echo "/etc/sendmail.cw is a link," \
+ "move it to /etc/mail/local-host-names"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname"
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ echo "Error: $dbfeat source file not found: $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi
+ ;;
+ use_ct_file)
+ if [ -f /etc/trusted-users ]; then
+ if [ ! -L /etc/trusted-users ]; then
+ echo "Moving /etc/trusted-users to /etc/mail/."
+ mv /etc/trusted-users /etc/mail/
+ process=1;
+ else
+ echo "/etc/trusted-users is a link," \
+ "move it to /etc/mail/trusted-users"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ elif [ -f /etc/mail/sendmail.ct ]; then
+ echo "Renaming sendmail.ct to trusted-users."
+ mv /etc/mail/sendmail.ct /etc/mail/trusted-users
+ process=1;
+ elif [ -f /etc/sendmail.ct ]; then
+ if [ ! -L /etc/sendmail.ct ]; then
+ echo "Moving /etc/sendmail.ct to /etc/mail/"
+ mv /etc/sendmail.ct /etc/mail/trusted-users
+ process=1;
+ else
+ echo "/etc/sendmail.ct is a link," \
+ "move it to /etc/mail/trusted-users"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname"
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ echo "Error: $dbfeat source file not found: $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi
+ ;;
+ ALIAS_FILE)
+ if [ -f /etc/$dbsname ]; then
+ if [ ! -L /etc/$dbsname ]; then
+ echo "Moving /etc/aliases to /etc/mail/aliases "
+ echo "and linking /etc/aliases to /etc/mail/aliases"
+ echo "This preserves current function/abilities"
+ mv -f /etc/$dbsname /etc/mail/
+ ln -sf mail/aliases /etc/aliases
+ #ln -sf /etc/mail/aliases /etc/aliases
+ if [ -f /etc/$dbsname.db ]; then
+ mv -f /etc/$dbsname.db /etc/mail/
+ fi
+ if [ -f /etc/$dbsname.pag ]; then
+ mv -f /etc/$dbsname.pag /etc/mail/
+ fi
+ if [ -f /etc/$dbsname.dir ]; then
+ mv -f /etc/$dbsname.dir /etc/mail/
+ fi
+ process=1;
+ changed=1;
+ else
+ echo "/etc/$dbsname is a link, move it to $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname"
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ echo "Error: $dbfeat source file not found: $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ ;;
+ m4)
+ if [ -f /etc/$dbsname ]; then
+ if [ ! -L /etc/$dbsname ]; then
+ echo "Moving /etc/sendmail.{mc,cf} to /etc/mail/";
+ mv -f /etc/sendmail.mc /etc/mail/
+ if [ -f /etc/sendmail.cf ]; then
+ mv -f /etc/sendmail.cf /etc/mail/
+ fi
+ process=1;
+ else
+ echo "/etc/$dbsname is a link, move it to $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname"
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ echo "Error: $dbfeat source file not found: $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ ;;
+ *)
+ if [ -f /etc/$dbsname ]; then
+ if [ ! -L /etc/$dbsname ]; then
+ echo "Moving /etc/$dbsname{,.*} to $dbname";
+ mv -f /etc/$dbsname /etc/mail/
+ if [ -f /etc/$dbsname.db ]; then
+ mv -f /etc/$dbsname.db /etc/mail/
+ fi
+ if [ -f /etc/$dbsname.pag ]; then
+ mv -f /etc/$dbsname.pag /etc/mail/
+ fi
+ if [ -f /etc/$dbsname.dir ]; then
+ mv -f /etc/$dbsname.dir /etc/mail/
+ fi
+ process=1;
+ else
+ echo "/etc/$dbsname is a link, move it to $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname"
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ echo "Error: $dbfeat source file not found: $dbname"
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ ;;
+ esac
+ }
+
+#-------------------------------------------------------------
+# Handle empty databases
+#-------------------------------------------------------------
+is_empty () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_empty()";
+ fi;
+ if [ $process -eq 1 ]; then
+ if [ "$dbtype" != "-" ]; then
+ rm -f $dbname.db
+ rm -f $dbname.pag
+ rm -f $dbname.dir
+ fi
+ case "$dbfeat" in
+ *)
+ echo "Informational: $dbfeat file empty: $dbname"
+ if [ "$dbopts" = "-o" ]; then
+ process=0;
+ fi;
+ ;;
+ esac
+ fi
+ }
+
+#-------------------------------------------------------------
+# Handle no data (exists, but is only comments) databases
+#-------------------------------------------------------------
+is_comments () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_comments()";
+ fi;
+ if [ $process -eq 1 ]; then
+ if [ "$dbtype" != "-" ]; then
+ rm -f $dbname.db
+ rm -f $dbname.pag
+ rm -f $dbname.dir
+ fi
+ case "$dbfeat" in
+ *)
+ echo "Informational: $dbfeat no data: $dbname"
+ if [ "$dbopts" = "-o" ]; then
+ process=0;
+ fi;
+ ;;
+ esac
+ fi
+ }
+
+#-------------------------------------------------------------
+# Handle normal databases (exists, has data)
+#-------------------------------------------------------------
+is_normal () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_normal()";
+ fi;
+ if [ $process -eq 1 -a $max_rc -eq 0 ]; then
+ if [ "$dbtype" != "-" ]; then
+ case "$dbtype" in
+ btree)
+ makemap -d $dbtype $dbname.db < $dbname
+ chown root.mail $dbname.db
+ chmod 0664 $dbname.db
+ ;;
+ dbm | btree | hash)
+ makemap $dbtype $dbname.db < $dbname
+ chown root.mail $dbname.db
+ chmod 0664 $dbname.db
+ ;;
+ text)
+ true;
+ ;;
+ newaliases)
+ if [ $newaliases_run -eq 0 -o \
+ $changed -eq 1 ]; then
+ newaliases_run=1
+ newaliases
+ fi
+ chown root.mail $dbname.db
+ chmod 0664 $dbname.db
+ ;;
+ m4)
+ echo "Generating /etc/mail/sendmail.cf ..."
+ m4 \
+ /usr/share/sendmail/sendmail.cf/m4/cf.m4 \
+ /etc/mail/sendmail.mc \
+ > /etc/mail/sendmail.cf.new \
+ 2> /etc/mail/sendmail.cf.errors
+ chown root.mail /etc/mail/sendmail.cf.new
+ chmod 0644 /etc/mail/sendmail.cf.new
+ if [ ! -s /etc/mail/sendmail.cf.errors ]; then
+ rm /etc/mail/sendmail.cf.errors;
+ else
+ cat /etc/mail/sendmail.cf.errors;
+ echo " ";
+ m4_errors=1;
+ fi;
+ # Can't tell if the errors are fatal or not ;-{
+ mv -f /etc/mail/sendmail.cf.new \
+ /etc/mail/sendmail.cf
+ ;;
+ *)
+ echo "$dbtype map not done herein"
+ ;;
+ esac
+ fi;
+ fi;
+ }
+
+#-------------------------------------------------------------
+# Handle completion
+#-------------------------------------------------------------
+final () {
+ if [ $verbosity -gt 1 ]; then
+ echo "final()";
+ fi;
+ }
+
+
+# status report if not for single database
+if [ -z "$1" ]; then
+ echo "Checking sendmail.cf and databases."
+ fi;
+
+initial
+
+for file in $db_files; do \
+ line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases || true);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1)
+ line=$(echo "$line" | cut -d "
+" -f 2)
+
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1)
+ dbtype=$(echo "$str" | cut -d ":" -f 2)
+ dbopts=$(echo "$str" | cut -d ":" -f 3)
+ dbname=$(echo "$str" | cut -d ":" -f 4)
+ dbregx=$(echo "$str" | cut -d ":" -f 5)
+ if [ $(dirname "$dbname") = "/etc/mail" ]; then
+ dbsname=$(basename "$dbname")
+ elif [ $(dirname "$dbname") = "/etc/" ]; then
+ dbsname=$(basename "$dbname")
+ else
+ dbsname="$dbname"
+ fi;
+ if [ "$dbopts" = "-" ]; then
+ dbopts="";
+ fi;
+ if [ "$dbregx" = "-" ]; then
+ dbregx="";
+ fi;
+
+ # Check to see if we're doing one, or all
+ if [ ! -z "$1" ]; then
+ if [ "$1" = "$dbfeat" -o \
+ "$1" = "$dbname" -o \
+ "$1" = "$dbsname" ]; then
+ true;
+ else
+ continue;
+ fi;
+ fi;
+
+ changed=0;
+ if [ $verbosity -gt 0 ]; then
+ echo "Processing $dbname...";
+ fi;
+
+
+ # Check for database existance
+ if [ -f "$dbname" ]; then
+ is_found
+ else
+ is_not_found
+ fi;
+
+ # Check for something in database
+ if [ ! -s "$dbname" ]; then
+ is_empty
+ fi;
+
+ # Check for real data (not just comments)
+ if [ $process -eq 1 ]; then
+ if ! egrep -q -e "^[[:space:]]*[^$\#]" $dbname; then
+ is_comments
+ fi;
+ fi;
+
+ # Finally, assume a normal file...
+ is_normal
+
+ done;
+ done;
+
+final
+
+# Final notices...
+if [ $missing_opt -ne 0 ]; then
+ echo " "
+ echo "Informational: $missing_opt optional database(s) sources"
+ echo " were not found, please investigate."
+ fi;
+if [ $missing_rqd -ne 0 ]; then
+ echo " "
+ echo "Error: $missing_rqd required database(s) sources"
+ echo " were not found, correct this before starting sendmail!"
+ if [ $max_rc -lt 2 ]; then
+ max_rc=2;
+ fi;
+ fi;
+if [ $missing_opt -ne 0 -o $missing_rqd -ne 0 ]; then
+ echo " "
+ echo "$0 assumes that databases, and their source datasets"
+ echo "have the same base name (not counting the .db). If this is not"
+ echo "true, $0 can not rebuild your databases to make sure"
+ echo "they will work with the newer sendmail. You will have to do this"
+ echo "yourself - before starting sendmail."
+ echo " "
+ fi;
+if [ $m4_errors -ne 0 ]; then
+ echo " "
+ echo "Warning: These messages were issued while creating sendmail.cf"
+ echo " make sure they are benign before starting sendmail!"
+ echo " "
+ cat /etc/mail/sendmail.cf.errors;
+ echo " "
+ if [ $max_rc -lt 2 ]; then
+ max_rc=2;
+ fi;
+ fi;
+exit $max_rc