[comp.sys.apollo] Sendmail config which uses a forwarder node?

chris@asylum.gsfc.nasa.gov (Chris Shenton) (10/10/90)

Does anyone have a sendmail.cf which uses a forwarder node?

 I frequently send via a machine at our site which knows MX records, eg:
	To: foo@bar.stuff.bletch@dftsrv
I'd like to have the ``@dftsrv'' stuff done automagically in my sendmail.cf
file. Any suggestions? TIA!
--
____________________________________________________________________________
INET: chris@asylum.gsfc.nasa.gov (128.183.10.155)        NASA/GSFC: Code 735
UUCP: ...!uunet!asylum.gsfc.nasa.gov!chris               Greenbelt, MD 20771
SPAN: PITCH::CHRIS                    Fax: 301-286-9214  Phone: 301-286-6093

wjw@eba.eb.ele.tue.nl (Willem Jan Withagen) (10/11/90)

In article <CHRIS.90Oct10105614@asylum.gsfc.nasa.gov> chris@asylum.gsfc.nasa.gov (Chris Shenton) writes:
>Does anyone have a sendmail.cf which uses a forwarder node?
>

I've put the sendmail (which uses MX-records) we're using on anon-FTP.
With it comes the sendmail.cf I'm using. (It's by someone else at
our university, and is very easy to configure.)

Try ftp.eb.ele.tue.nl(131.155.2.25) in /pub/apollo

Succes,
	Willem Jan Withagen.

Eindhoven University of Technology   DomainName:  wjw@eb.ele.tue.nl    
Digital Systems Group, Room EH 10.10 BITNET: ELEBWJ@HEITUE5.BITNET
P.O. 513                             Tel: +31-40-473401
5600 MB Eindhoven                    The Netherlands

tim@apollo.HP.COM (Timothy R. Giebelhaus) (10/11/90)

This one does the trick for me.  Just update the definitions at the top.
I give this out as Tim Giebelhaus with no suggestion that it might work
for you.  

###############################################################################
###                                                                         ###
###           sendmail configuration for generic, Internet only host        ###
###                                                                         ###
###           Erik E. Fair <fair@ucbarpa.berkeley.edu>                      ###
###		Updated for fowarding by Tim Giebelhaus <tim@apollo.hp.com> ###
###                                                                         ###
###############################################################################

# Our local domain ($D is added to $w [hostname] for official name in base.m4)
DDstpaul.msr.hp.com

# Forwarders U for uucp, T for tcp
DUziggy.stpaul.msr.hp.com
DThpuspm0.msr.hp.com

# All the names we are known by (egrep /etc/hosts for this)
Cwstubai apcimsp
# Dwapcimsp
# The tcp and uucp mailers rewrite the return address so people can reply

###############################################################################
###   baseline definitions that sendmail needs to operate                   ###
###############################################################################

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

DV25

# my official hostname
Dj$w.$D
# my name (the name on mailer bounces)
DnMAILER-DAEMON
# UNIX header format
DlFrom $g $d
# delimiter (operator) characters
Do.:%@!^/[]
# format of a total name
Dq$?x$x <$g>$|$g$.
# SMTP login message
De$j Sendmail $v/$V ready at $b

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

# we have full sendmail support here
Oa
# location of alias file
OA/usr/lib/aliases
# default delivery mode (deliver in background)
Odbackground
# (don't) connect to "expensive" mailers
#Oc
# temporary file mode
OF0600
# default GID
Og1
# location of help file
OH/usr/lib/sendmail.hf
# log level
OL9
# Send to me too (even if I'm in an alias expansion)
Om
# default messages to old style
Oo
# queue directory
OQ/usr/spool/mqueue
# read timeout -- violates protocols (timeout an SMTP idle for 2 hours)
Or2h
# status file
OS/usr/lib/sendmail.st
# queue up everything before starting transmission
Os
# default timeout interval (returns undelivered mail after 3 days)
OT3d
# time zone names (V6 only)
OtPST,PDT
# default UID
Ou1
# encrypted wizard's password (for the undocumented "wiz" SMTP command)
OWnot-likely
# rebuild the aliasfile automagically
#OD
# maximum load average before queueing mail
Ox10
# maximum load average before rejecting connections
OX15

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

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

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

Troot
Tdaemon
Tnews
Tuucp

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

H?P?Return-Path: <$g>
HReceived: $?sfrom $s$. by $j$?r with $r$. ($v/$V-eef)
	id $i; $b
H?D?Date: $a
H?F?From: $q
H?x?Full-Name: $x
H?M?Message-Id: <$t.$i@$j>
HSubject:
H?D?Resent-Date: $a
H?F?Resent-From: $q
H?M?Resent-Message-Id: <$t.$i@$j>


###############################################################################
#		RULESET ZERO PREAMBLE                                         #
###############################################################################

S0

# first make canonical
R$*<$*>$*		$1$2$3				defocus
R$+			$:$>3$1				make canonical

# handle special cases.....
R@			$#local$:$n			handle <> form
R$*<@[$+]>$*		$#tcp$@[$2]$:$1@[$2]$3		numeric internet spec

# now delete the local info
R$*<$*$=w.UUCP>$*	$1<$2>$4			thishost
R$*<$*$=w.$D>$*		$1<$2>$4			thishost
R$*<$*$=w>$*		$1<$2>$4			thishost
R$*<$*.>$*		$1<$2>$3			drop trailing dot
R<@>:$*			$@$>0$1				retry after route strip
R$*<@>			$@$>0$1				strip null trash & retry

# return uucp mail that looks like decvax!ittvax!marsvax! since it
# will be rejected at the final site with no username on it
R$*!<@$-.UUCP>		$#error$:Destination address truncated



###############################################################################
###   Machine dependent part of ruleset zero (where we decide what to do)   ###
###############################################################################

# resolve various and sundry other unofficial networks
R$*<@$+.MAILNET>$*	$#tcp$@mit-multics.arpa$:$1@$2.MAILNET$3	MAILNET
R$*<@$+.BITNET>$*	$#tcp$@cunyvm.cuny.edu$:$1@$2.BITNET$3		BITNET
R$*<@$+.MFENET>$*	$#tcp$@nmfecc.arpa$:$1@$2.MFENET$3		MFENET
R$*<@$+.CSNET>$*	$#tcp$@relay.cs.net$:$1@$2.CSNET$3		CSNET


# Deliver local mail sent with name fully qualified
R$*<@$+.$D>$*		$#tcp$@$2$:$1$2$3			user@local-domain-host


#
# R$+@$+.UUCP			$#uucp$@$2$:$1
# R$*<@$+.UUCP>$*		$#uucp$@$2.UUCP$:$1
R$*<@$+.UUCP>$*		$#utcp$@$U$:$2!$1
#

# when all else fails, look up the whole name in the host table
# R$*<@$+>$*		$#tcp$@$2$:$1@$2$3			user@domain
R$*<@$+>$*		$#ttcp$@$T$:$1@$2$3			user@domain sent to $T

# remaining names must be local
R@			$n					fix magic token
R$+			$#local$:$1				everything else

###############################################################################
###   End of ruleset zero                                                   ###
###############################################################################

###########################
#  Name Canonicalization  #
###########################
S3

# handle "from:<>" special case
R<>			$@@				resolve into magic token

# basic textual canonicalization
R$*<$*<$*<$+>$*>$*>$*	$4				3-level <> nesting
R$*<$*<$+>$*>$*		$3				2-level <> nesting
R$*<$+>$*		$2				basic RFC821/822 parsing
R$+ at $+		$1@$2				"at" -> "@" for RFC 822
R$*<$*>$*		$1$2$3				in case recursive

# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+			@$1:$2				change all "," to ":"

# localize and dispose of domain-based addresses
R@$+:$+			$@$>6<@$1>:$2			handle <route-addr>

# more miscellaneous cleanup
R$+			$:$>8$1				host dependent cleanup
R$+:$*;@$+		$@$1:$2;@$3			list syntax
R$+@$+			$:$1<@$2>			focus on domain
R$+<$+@$+>		$1$2<@$3>			move gaze right
R$+<@$+>		$@$>6$1<@$2>			already canonical

# convert old-style addresses to a domain-based address
R$+^$+			$1!$2				convert ^ to !
R$+!$+			$@$>9$1!$2			uucp name hackery
R$+%$+			$:$>5$1%$2			user%host%host
R$+<@$+>		$@$>6$1<@$2>			canonical

# Given multiple %'s change rightmost % to @.
S5
R$*<$*>$*		$1$2$3				defocus
R$*%$*			$1@$2				First make them all @'s.
R$*@$*@$*		$1%$2@$3			Undo all but the last.
R$*@$*			$@$1<@$2>			Put back the brackets.

###############################################################################
####   Assorted name hackery to make things simple for people              ####
###############################################################################

# here we look for addresses of the form: user%host.domain@gateway
# and strip off the gateway name (for the ones that we know)

S6

# conventional percent format

R$+%$+.MAILNET<@mit-multics.arpa>	$>5$1<%$2.MAILNET>	strip
R$+%$+.MFENET<@nmfecc.arpa>		$>5$1<%$2.MFENET>	strip
R$+%$+.BITNET<@cunyvm.cuny.edu>		$>5$1<%$2.BITNET>	strip
R$+%$+.CSNET<@relay.cs.net>		$>5$1<%$2.CSNET>	strip

# regulation route-addr format

R<@mit-multics.arpa>:$+@$+.MAILNET	$1<@$2.MAILNET>		strip
R<@nmfecc.arpa>:$+@$+.MFENET		$1<@$2.MFENET>		strip
R<@cunyvm.cuny.edu>:$+@$+.BITNET	$1<@$2.BITNET>		strip
R<@relay.cs.net>:$+@$+.CSNET		$1<@$2.CSNET>		strip

# mung up names for the outside world - called from tcp mailer

S7
R$+@$+.MAILNET		$1%$2.MAILNET@mit-multics.arpa	user@host.MAILNET
R$+@$+.MFENET		$1%$2.MFENET@nmfecc.arpa	user@host.MFENET
R$+@$+.BITNET		$1%$2.BITNET@cunyvm.cuny.edu	user@host.BITNET
R$+@$+.CSNET		$1%$2.CSNET@relay.cs.net	user@host.CSNET

###############################################################################
####   UUCP address hackery                                                ####
###############################################################################

S9
R$+!$=w!$+		$3				collapse loops
R$-.$+!$+		$@$>6$3<@$1.$2>			do.main!user
R$-!$+			$@$>6$2<@$1.UUCP>		host!user

################################
#  Sender Field Pre-rewriting  #
################################
S1
R$*<$*>$*		$1$2$3				defocus

###################################
#  Recipient Field Pre-rewriting  #
###################################
S2
R$*<$*>$*		$1$2$3				defocus

###################################
#  Final Output Post-rewriting    #
#  Standard Domain-based version  #
###################################
S4
R@			$n				handle <> error addr

# externalize local domain info
R@$+:$+:$+		$@@$1,$2:$3			<route-addr> canonical

# UUCP must always be presented in old form
R$+@$-.UUCP		$2!$1				u@h.UUCP => h!u

###############################################################################
###   Local, and Program Mailer specifications                              ###
###############################################################################

# Nota Bene: what mailer flags you use depends upon what version of /bin/mail
# you have:
#
# 4th Berkeley Software Distribution (4.1 BSD or later)
Mlocal, P=/bin/mail, F=SlsDFMPpmnxr, S=10, R=20, A=mail -d $u
#
# USG UNIX (System III, System V, Xenix 3.0 or later)
# Mlocal, P=/bin/mail, F=SlsDFMPpmnx, S=10, R=20, A=mail $u
#
# Also, if you are using System V, you should get the Berkeley version of
# /bin/mail as soon as you can and junk the one you've got: it doesn't
# believe in sendmail, so the wrong thing will happen when someone types
# mail user@host (i.e. it will attempt local delivery, rather than call
# sendmail)

Mprog, P=/bin/sh, F=lsDFMpxehu, S=10, R=20, A=sh -c $u

S10

S20


###############################################################################
####    IP/TCP/SMTP mailer (going out to internet land)                    ####
###############################################################################

Mtcp,	P=[IPC], F=AmnDFMpueXLC, S=14, R=14, A=IPC $h, E=\r\n

Mutcp,	P=[IPC], F=AmnDFMpueXLC, S=15, R=15, A=IPC $h, E=\r\n

Mttcp,	P=[IPC], F=AmnDFMpueXLC, S=15, R=15, A=IPC $h, E=\r\n

Muucp,  P=/usr/bin/uux, F=sDFMhuU, S=13, R=23, M=100000,
	A=uux - -r $h!rmail ($u)

S13
R$*			$@$w!$1			stick on our host name


S14
R$*@[$+]$*		$@$1@[$2]$3		already ok (inet addr spec)
R@$+@$+			$@@$1@$2		already ok (route-addr)
R$+@$=X.UUCP		$2!$1@$X		fix remote UUCP
R$+@$=Y.UUCP		$2!$1@$Y		fix remote UUCP
R$+@$=Z.UUCP		$2!$1@$Z		fix remote UUCP
R$+@$-.UUCP		$2!$1@$j		undo local UUCP hack
R$+@$+			$@$>7$1@$2		fix up names for the internet
R$+			$@$1@$j			add our official host name

S15

S23
UUCP: uunet!hi-csc!apcimsp!tim
ARPA: tim@apollo.com
Contents of this message has nothing to do with work.