Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 1996 21:14:42 -0700 (PDT)
From:      Gary Kline <kline@tera.com>
To:        questions@freebsd.org
Subject:   sendmail: IP and UUCP
Message-ID:  <199608240414.VAA26020@athena.tera.com>

next in thread | raw e-mail | index | archive | help

	Hi all,

	About 6 months back I requested help in setting up my
	sendmail.cf to allow mail to go over my PPP link when
	connected that way *and/or* to go out via UUCP otherwise.

	Jerry Kendal responded with his sample sendmail 
	configuration and the required /etc/uucp/* files.
	I plugged and patched in my own variables.  Tried it.
	No joy.

	Below are the mods that I dropped in where Jerry 
	marked ``Change this .....''     The mail (failure)
	yelped, in part, this:


The original message was received at Fri, 23 Aug 1996 20:38:48 -0700 (PDT)
from uucp@localhost

   ----- The following addresses have delivery notifications -----
kline@tera.com  (unrecoverable error)

   ----- Transcript of session follows -----
554 Too many hops 18 (17 max): from kline@thought.org via localhost, to kline@te
ra.com

	Any sendmail gurus out there who are savvy to what's going
	on here??  It'd be nice to have my system work more completely,
	altho not critical...

	Thanks for any floodlight here.  

	gary kline


	Encl: kendall_s.cf



##Here they are.
##########################
##
##   sendmail.cf
##
##########################

###########################
#   My local macros       #
###########################

# Name of smart host


###: Change this .............
#  was DHtao in original sendmail.cf.
DHtao


# Local domain name


###: Change this .............
DDthought.org



###########################
#   My local Classes      #
###########################

# Other domains that I am in


###: Change this .............
CDuucp thought.org



# UUCP sites that I connect with


###: Change this .............
CUtera



# The name of the machines on this network
CMlocalhost


###: Change this .............
#CMtao buddha
CMtao



######################
#   Special macros   #
######################

# SMTP initial login message
Demail.$M Sendmail $Z ready at $b

# UNIX initial From header format
DlFrom $g  $d

# my name for error messages
DnMAILER-DAEMON

# delimiter (operator) characters
Do.:%@!^/[]

# format of a total name
Dq$g@$D$?x ($x)$.

# Configuration version number


###: Change this .............
###DZ(KCIS.COM-5)
DZ



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

# strip message body to 7 bits on input?
O7False

# The alias file
OA/etc/aliases

# substitution for space (blank) characters
OB.

# default delivery mode
Odbackground

# error message header/file
#OE/etc/sendmail.oE

# error mode
#Oep

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

# temporary file mode
OF0600

# default GID
Og1

# maximum hop count
Oh17

# location of help file
#OH/etc/mail/sendmail.hf
OH/usr/share/misc/sendmail.hf

# ignore dots as terminators in incoming messages?
OiFalse

# Insist that the BIND name server be running to resolve names
OI

# deliver MIME-encapsulated error messages?
OjTrue

# open connection cache size
Ok2

# open connection cache timeout
OK5m

# use Errors-To: header?
OlFalse

# log level
OL9

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

# default messages to old style headers if no special punctuation?
OoTrue

# SMTP daemon options
#OOPort=esmtp

# privacy flags
Opauthwarnings

# who (if anyone) should get extra copies of error messages
OPPostmaster

# slope of queue-only function
#Oq600000

# queue directory
OQ/var/spool/mqueue

# read timeout -- now OK per RFC 1123 section 5.3.2
#Ordatablock=10m

# queue up everything before forking?
OsTrue

# status file
OS/var/log/sendmail.st

# default message timeout interval
OT5d/4h

# 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
#Ot

# default UID
Ou1

# deliver each queued job in a separate process?
OYFalse

# work class factor
#Oz1800

# work time factor
#OZ90000

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

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

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

Troot
Tdaemon
Tuucp
Tkline

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

# Flags for local >flsSDFMmnP<
H?P?Return-Path: $g
HReceived: $?sfrom $s$. by mail.$D $?rwith $r$.
	$Z id $i; $d
H?D?Resent-Date: $a
H?D?Date: $d
H?F?Resent-From: $q
H?F?From: $q
H?F?To: $u
HSubject:
H?D?Posted-Date: $a
H?D?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i.$k@$m>
H?M?Message-Id: <$t.$i.$k@$m>

######################################################################
######################################################################
#####
#####			RULE SETS
#####
######################################################################
######################################################################

##################################################
#     Rule set 0        Where is the mail to go  #
##################################################
S0

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

# Handle messages when no user specified
R@$+		$#error $: Missing user name

#	$# = Mailer to use
#	$@ = Host to use
#	$: = User 
#

# Now handle our own stuff

R$*			$: $>9 $1		Do local translations

R$*<@$=U.UUCP>		$#uucp $@$2 $:$1	out via uucp

R$*<@$+.UUCP>		$#uucp $@$H $:$2!$1	out via uucp(through smart-host)

R$+<@$+.LOCAL>		$#ether $@$2 $:$1	Local connected hosts

R$=U!$+<@$D>		$#uucp $@$1 $:$2	site!user...@domain -> site!user...
R$*!$+<@$D>		$#uucp $@$H $:$1!$2	site!user...@domain -> site!user...

R$+<@$D>		$#local $:$1		user...@domain -> user...

# At this point, All domains are foreign
R$+<@$+>		$#uucp $@$H $: $1@$2	out via uucp(through smart-host)

R$+			$#local $:$1		Local user (we hope)

##################################################
#     Rule set 3        Change to address fromat #
#                       to domain name format    #
##################################################
S3

# handle null input and list syntax (translate to <@> special case)
R$@				$@ <@>
R$*:;$*			$@ $1 :; <@>

# Remove any trailing dot
R$*.			$1

# basic textual canonicalization -- note RFC733 heuristic here
R$*<$*>$*<$*>$*		$2$3<$4>$5				strip multiple <> <>
R$*<$*<$+>$*>$*		<$3>$5					2-level <> nesting
R$*<>$*				$@ <@>					MAIL FROM:<> case
R$*<$+>$*			$2						basic RFC821/822 parsing

R$+@$+			$: $1 < @ $2 >				focus on domain
R$+<$+@$+>		$1 $2 < @ $3 >				move gaze right
R$+<@$+>		$@ $1 < @ $2 >				already canonical
 
# convert site1!site2!... into site2!...@site1.UUCP
R$-!$+			$@ $2 < @ $1 . UUCP >
R$-.$+!$+		$@ $3 < @ $1 . $2 >			host.domain!user
R$+%$+			$@ $>3 $1 @ $2				user%host


##################################################
#     Rule set 9        Special translations     #
##################################################
S9

# convert (local machine).domain!... into ...@(local machine).domain
R$+<@$=M.$=D>		$: $1 < @ $D >

# convert ...@(UUCP machine).domain -> ...@(UUUCP machine).UUCP
R$+<@$=U.$D>		$1 < @ $2 . UUCP >

# convert ...@(NON-local machine).domain -> ...@(NON-local machine).LOCAL
R$+<@$~M.$D>		$1 < @ $2 . LOCAL >


#################################################
#    Rule set 4        Undo Rule set 3          #
#################################################
S4

# Turn ...@(site).UUCP back to SITE!...
R$*<@$+.UUCP>		$@ $2 ! $1

# Turn ...@(site).LOCAL back to ...@(site).domain
R$*<@$+.LOCAL>		$@ $1 @ $2 . $D

R$+<@$+>		$@ $1 @ $2


##################################################
#     Rule set 10       Sender for local         #
##################################################
S10

##################################################
#     Rule set 20       Recepient for local      #
##################################################
S20

R<@>			$n			errors to mailer-daemon

##################################################
#     Rule set 40       UUCP Sender              #
##################################################
S40

R$-			$1 @ $D

##################################################
#     Rule set 30       UUCP Recepient           #
##################################################
S30

R<@>		$n			errors to mailer-daemon

######################################################################
######################################################################
#####
#####			MAILER DEFINITIONS
#####
######################################################################
######################################################################

# Mail for 'ethernet' hosts
Mether, P=[IPC], F=mOPDFMuXa, A=IPC $h

# Mailer for local users
#
Mlocal,	P=/usr/libexec/mail.local, F=flsSDFMmnP, S=10, R=20, A=mail -d $u

# Mailer for programs.
Mprog, P=/bin/sh, F=lsDFMeu, S=10, R=20, A=sh -c $u

# Mailer to forward via uucp
# Note: -r queues the request
#	$u To address
#	$h Host to send to
#
Muucp, P=/usr/bin/uux, F=mOPDFMuXa, S=40, R=30, A=uux - $h!rmail ($u)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608240414.VAA26020>