dolly's Sendmail configuration files

Copies of these files are kept in darkwing:/ts02/src/sendmail-8.8.8/cf/cf/uo-dolly.cf or dolly:/usr/src/sendmail_config/

+++++++++++++++++++++++++++++++++++++++++++++++++

begin sendmail.mc

divert(-1)
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
#       The Regents of the University of California.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#       This product includes software developed by the University of
#       California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

VERSIONID(`UOCCTS uo-dolly.mc stevev 1998/5/7')dnl
OSTYPE(linux)dnl

EXPOSED_USER(`root')dnl
FEATURE(`local_procmail')dnl
FEATURE(`nullclient', `darkwing.uoregon.edu')dnl
End dolly.mc

+++++++++++++++++++++++++++++++++++++++++++++++++

Begin dolly.cf

#
# Copyright (c) 1983, 1995 Eric P. Allman
# Copyright (c) 1988, 1993
#       The Regents of the University of California.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#       This product includes software developed by the University of
#       California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

######################################################################
######################################################################
#####
#####           SENDMAIL CONFIGURATION FILE
#####
##### built by root@gladstone on Thu May 7 15:30:59 PDT 1998
##### in /ts02/src/sendmail-8.8.8/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
######################################################################

#####  @(#)cfhead.m4    8.9 (Berkeley) 1/18/97  #####
#####  @(#)cf.m4        8.24 (Berkeley) 8/16/95  #####

#####  @(#)linux.m4     8.2 (Berkeley) 8/21/93  #####

#####  @(#)local_procmail.m4    8.6 (Berkeley) 10/20/96  #####


#####  @(#)proto.m4     8.151 (Berkeley) 7/31/97  #####


# level 7 config file format
V7/Berkeley

##################
#   local info   #
##################

Cwlocalhost

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM

# class E: names that should be exposed as from this host, even if we masquerade
#CE root
CEroot
# who I masquerade as (null for no masquerading) (see also $=M)
DMdarkwing.uoregon.edu

# my name for error messages
DnMAILER-DAEMON


# hub host (to which all mail is sent)
DHdarkwing.uoregon.edu

# route-addr separators
C: : ,

# Configuration version number
DZ8.8.8


###############
#   Options   #
###############

# strip message body to 7 bits on input?
O SevenBitInput=False

# 8-bit data handling
O EightBitMode=pass8

# minimum number of free blocks on filesystem
O MinFreeBlocks=100

# maximum message size
#O MaxMessageSize=1000000

# substitution for space (blank) characters
O BlankSub=.

# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensive=False

# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval=10

# default delivery mode
O DeliveryMode=background

# automatically rebuild the alias database?
#O AutoRebuildAliases

# error message header/file
#O ErrorHeader=/etc/sendmail.oE

# error mode
#O ErrorMode=print

# save Unix-style "From_" lines at top of header?
#O SaveFromLine

# temporary file mode
O TempFileMode=0600

# match recipients against GECOS field?
#O MatchGECOS

# maximum hop count
#O MaxHopCount=17

# location of help file
O HelpFile=/usr/lib/sendmail.hf

# ignore dots as terminators in incoming messages?
#O IgnoreDots

# name resolver options
#O ResolverOptions=+AAONLY
# deliver MIME-encapsulated error messages?
O SendMimeErrors=True

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

# open connection cache size
O ConnectionCacheSize=2

# open connection cache timeout
O ConnectionCacheTimeout=5m

# persistent host status directory
#O HostStatusDirectory=.hoststat

# single thread deliveries (requires HostStatusDirectory)?
#O SingleThreadDelivery

# use Errors-To: header?
O UseErrorsTo=False

# log level
O LogLevel=9

# send to me too, even in an alias expansion?
#O MeToo

# verify RHS in newaliases?
O CheckAliases=False

# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True

# SMTP daemon options
#O DaemonPortOptions=Port=esmtp

# privacy flags
O PrivacyOptions=authwarnings

# who (if anyone) should get extra copies of error messages
#O PostMasterCopy=Postmaster

# slope of queue-only function
#O QueueFactor=600000

# queue directory
O QueueDirectory=/var/spool/mqueue

# timeouts (many of these)
#O Timeout.initial=5m
#O Timeout.connect=5m
#O Timeout.iconnect=5m
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
#O Timeout.ident=30s
#O Timeout.fileopen=60s
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.hoststatus=30m
# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes

# queue up everything before forking?
O SuperSafe=True

# status file
O StatusFile=/etc/sendmail.st

# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
#O TimeZoneSpec=

# default UID (can be username or userid:groupid)
O DefaultUser=1:1

# list of locations of user database file (null means no lookup)
#O UserDatabaseSpec=/etc/userdb

# fallback MX host
#O FallbackMXhost=fall.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
#O TryNullMXList

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12

# maximum number of children we allow at one time
#O MaxDaemonChildren=12

# maximum number of new connections per second
#O ConnectionRateThrottle=3

# work recipient factor
#O RecipientFactor=30000

# deliver each queued job in a separate process?
#O ForkEachJob

# work class factor
#O ClassFactor=1800

# work time factor
#O RetryFactor=90000

# shall we sort the queue by hostname first?
#O QueueSortOrder=priority

# minimum time in queue before retry
#O MinQueueAge=30m

# default character set
#O DefaultCharSet=iso-8859-1

# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/service.switch

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

# dialup line delay on connection failure
#O DialDelay=10s

# action to take if there are no recipients in the message
#O NoRecipientAction=add-to-undisclosed

# chrooted environment for writing to files
#O SafeFileEnvironment=/arch

# are colons OK in addresses?
#O ColonOkInAddr

# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000

# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g  $d

# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+

# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups

# are group-writable :include: and .forward files (un)trustworthy?
#O UnsafeGroupWrites

# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress

# what user id do we assume for the majority of the processing?
#O RunAsUser=sendmail

###########################
#   Message precedences   #
###########################

Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100

#####################
#   Trusted users   #
#####################

# this is equivalent to setting class "t"
#Ft/etc/sendmail.ct
Troot
Tdaemon
Tuucp

#########################
#   Format of headers   #
#########################

H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
        $.by $j ($v/$Z)$?r with $r$. id $i$?u
        for $u; $|;
        $.$b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: <$g>
H?F?From: <$g>
H?x?Full-Name: $x
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>


#####  @(#)nullrelay.m4 8.13 (Berkeley) 4/30/97  #####
#
#  This configuration applies only to relay-only hosts.  They send
#  all mail to a hub without consideration of the address syntax
#  or semantics, except for adding the hub qualification to the
#  addresses.
#
#       This is based on a prototype done by Bryan Costales of ICSI.
#

######################################################################
######################################################################
#####
#####                   REWRITING RULES
#####
######################################################################
######################################################################

###########################################
###  Rulset 3 -- Name Canonicalization  ###
###########################################
S3

# handle null input
R$@                     $@ <@>

# strip group: syntax (not inside angle brackets!) and trailing semicolon
R$*                     $: $1 <@>                       mark addresses
R$* < $* > $* <@>       $: $1 < $2 > $3                 unmark 
R$* :: $* <@>           $: $1 :: $2                     unmark node::addr
R:include: $* <@>       $: :include: $1                 unmark :include:...
R$* : $* <@>            $: $2                           strip colon if marked
R$* <@>                 $: $1                           unmark
R$* ;                      $1                           strip trailing semi
R$* < $* ; >               $1 < $2 >                    bogus bracketed semi

# null input now results from list:; syntax
R$@                     $@ :; <@>

# basic textual canonicalization -- note RFC733 heuristic here
R$*                     $: < $1 >               housekeeping <>
R$+ < $* >                 < $2 >               strip excess on left
R< $* > $+                 < $1 >               strip excess on right
R<>                     $@ < @ >                MAIL FROM:<> case
R< $+ >                 $: $1                   remove housekeeping <>

# eliminate local host if present
R@ $=w $=: $+           $@ @ $M $2 $3                   @thishost ...
R@ $+                   $@ @ $1                         @somewhere ...

R$=E @ $=w              $@ $1 @ $2                      leave exposed
R$+ @ $=w               $@ $1 @ $M                      ...@thishost
R$+ @ $+                $@ $1 @ $2                      ...@somewhere

R$=w ! $=E              $@ $2 @ $1                      leave exposed
R$=w ! $+               $@ $2 @ $M                      thishost!...
R$+ ! $+                $@ $1 ! $2 @ $M                 somewhere ! ...

R$=E % $=w              $@ $1 @ $2                      leave exposed
R$+ % $=w               $@ $1 @ $M                      ...%thishost
R$+ % $+                $@ $1 @ $2                      ...%somewhere

R$=E                    $@ $1 @ $j                      leave exposed
R$+                     $@ $1 @ $M                      unadorned user


######################################
###   Ruleset 0 -- Parse Address   ###
######################################

S0

R$*:;<@>                $#error $@ USAGE $: "list:; syntax illegal for recipient
 addresses"

# handle exposed users (why doesn't nullclient have a hook for this?)
R$=E                    $#local $@ $1 $: $1
R$=E @ $=w              $#local $@ $1 @ $2 $: $1

# pass everything else to a relay host
R$*                     $#nullclient $@ $H $: $1


##################################################
###  Ruleset 4 -- Final Output Post-rewriting  ###
##################################################
S4

R$* <@>                 $@                              handle <> and list:;

# strip trailing dot off before passing to nullclient relay
R$* @ $+ .              $1 @ $2

#^L
######################################################################
######################################################################
#####
#####                   MAILER DEFINITIONS
#####
######################################################################
######################################################################

############################################
###   Null Client Mailer specification   ###
############################################


Mnullclient,    P=[IPC], F=mDFMuXa,
                A=IPC $h


##################################################
###   Local and Program Mailer specification   ###
##################################################

#####  @(#)local.m4     8.23 (Berkeley) 5/31/96  #####

Mlocal,         P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/
40,
                T=DNS/RFC822/X-Unix,
                A=procmail -Y -a $h -d $u
Mprog,          P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
                T=X-Unix,
                A=sh -c $u

#
#  Envelope sender rewriting
#
S10
R<@>                    $n                      errors to mailer-daemon
R$+                     $: $>50 $1              add local domain if needed
R$*                     $: $>94 $1              do masquerading

#
#  Envelope recipient rewriting
#
S20
R$+ < @ $* >            $: $1                   strip host part

#
#  Header sender rewriting
#
S30
R<@>                    $n                      errors to mailer-daemon
R$+                     $: $>50 $1              add local domain if needed
R$*                     $: $>93 $1              do masquerading

#
#  Header recipient rewriting
#
S40
R$+                     $: $>50 $1              add local domain if needed
#R$*                    $: $>93 $1              do all-masquerading

#
#  Common code to add local domain name (only if always-add-domain)
#
S50
#R$* < @ $* > $*        $@ $1 < @ $2 > $3               already fully qualified
#R$+                    $@ $1 < @ *LOCAL* >             add local qualification

End dolly.cf

+++++++++++++++++++++++++++++++++++++++++++++++++


Hans Kuhn
Last modified: Sat Jan 17 17:22:17 GMT 1998