Here is the working sendmail.cf for A/UX

Alexis Rosen alexis at panix.uucp
Mon Nov 5 19:26:41 AEST 1990


Since I've been deluged with requests for this thing, I'm posting it here
(apparently there are more lurkers in this group than I thought...).

Remember, I make no guarantees. If you can't get it to work, don't send me
a note, becaue my sendmail expertise is minimal.

That said, I've had success with every kind of address I've used, including
Bitnet, domain, and mixed addresses.

The only thing you should need to change is the macro that contains your
forwarding host's name. Just search for 'cmcl2' and replace it. Also, don't
forget to run /usr/lib/sendmail -bz afterwards to refreeze the sendmail.cf.

Enjoy,
---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis

---------------------------->% cut here %<-------------------------------
###############################################################
#			PANIX SENDMAIL.CF
#
#		    Original Source Unknown
#
#			  Hacked On By:
#			  Amanda Walker
#			  David Spector
#			  Alexis Rosen
###############################################################

# local definitions

# define the simple local name.  If your domain server, etc.
#	are set up so that gethostname returns a simple name
#	don't define anything



# define the local domain.  L_DOMAIN_M is the main domain
#	name.  L_DOMAIN_C is a space separated list of
#	all the domains to be considered local.  If you aren't
#	using the name server this should only be defined if
#	gethostbyname(fully_qualified_name) will work.  Ie.
#	yp or /etc/hosts must have fully qualified names in
#	it.



# define the local universe.  As above UNIVERSE_M is the
#	main universe.  UNIVERSE_C is all universes to
#	be considered local.  Use undefine if site names
#	are only two deep.  (site.domain)



# define L_USERELAY to true to forward mail to unknown sites to
#	another site.  If no forwarding host exists or if your
#	name server contains MX records define it to be false.


# define how to relay mailer.  If no relay site, change
#	define to undefine


# define who relays mail.  If no relay site, change
#	define to undefine


# define how to hide this site.  Mail from this site will
#	appear to be from L_HIDEHOST.  If site hiding is
#	not defined change define to undefine


############################################################
############################################################
#####
#####	SENDMAIL CONFIGURATION FILE FOR SUBSIDIARY MACHINES
#####
#####	You should install this file as /usr/lib/sendmail.cf
#####	if your machine is a subsidiary machine (that is, some
#####	other machine on your Ethernet is the main mail-relaying
#####	machine).  Then edit the file to customize it for your
#####	network configuration.
#####
############################################################
############################################################

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

# local UUCP connections -- not forwarded to mailhost.  This shouldn't
#	need changing, but just in case...
FV/usr/lib/uucp/L.sys %s

# my official hostname

Dj$w$?D.$D$?U.$U$.$.

# major relay mailer, define if there's someplace to forward mail to
#	for further address parsing.  If there isn't, define it to
#	be "error"
#DMtcp
DMuucp

# major relay host, define as the name of the host to forward mail
#	to for further address parsing.  If there isn't such a host
#	define it to be some message descriptive of the site being
#	unknown
DRcmcl2

# how to hide site names, define to make mail from this site appear
#	to be from another.  If you aren't using site hiding leave it
#	undefined.  In any case, see the notes about the received
#	header also.
#DH<@ginsu.apple.com>

# define the local domain name
#DDuucp
Cuucp

# define the universe name if one is used


#	Fake Clases we use in rewriting...
CI UUCP BITNET CSNET COM MIL ARPA

############################################################
#
#	General configuration information
#
#	This information is basically just "boiler-plate"; it must be
#	there, but seldom needs tweaking.
#
#	@(#)base.m4 1.1 86/07/08 SMI; from UCB	3.54	6/11/83
#
############################################################

#	@(#)version.m4 1.1 86/07/08 SMI; from UCB	3.34		7/1/83

DVSMI-3.2


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

# my name
DnMAILER-DAEMON
# UNIX header format
DlFrom $g  $d
# delimiter (operator) characters
Do.:%@!^=/[]
# format of a total name
Dq$g$?x ($x)$.
# SMTP login message
De$j Sendmail $v/$V ready at $b

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

# location of alias file
OA/usr/lib/aliases
# default delivery mode (deliver in background)
Odbackground
# (don't) connect to "expensive" mailers
#Oc
# rebuild the alias file automagically
OD
# temporary file mode -- 0600 for secure mail, 0644 for permissive
OF0600
# default GID
Og1
# location of help file
OH/usr/lib/sendmail.hf
# log level
OL2
# default messages to old style
Oo
# Cc my postmaster on error replies I generate
#OPPostmaster
# queue directory
OQ/usr/spool/mqueue
# read timeout -- violates protocols
Or30m
# status file -- none
OS
# queue up everything before starting transmission, for safety
Os
# default timeout interval
OT3d
# default UID
Ou1

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

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

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

Troot
Tdaemon
Tuucp

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

H?P?Return-Path: <$g>
H?H?Received: $?sfrom $s $.by $j ($v/$V)
	id $i; $b

H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $q
H?F?From: $q
H?x?Full-Name: $x
HSubject:
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

###########################
###   Rewriting rules   ###
###########################


################################
#  Sender Field Pre-rewriting  #
################################
S1
# None needed.

###################################
#  Recipient Field Pre-rewriting  #
###################################
S2
# None needed.

#################################
#  Final Output Post-rewriting  #
#################################

S4
R$+<@$+.forward>	$1<@$2>				get rid of internals
R$+<%$+.forward>	$1<@$2>				get rid of internals
R$+<@$+.local>		$1<@$2>				get rid of internals
R$+<@$+.uucp>		$2!$1				u at h.uucp => h!u
R$+			$: $>9 $1			Clean up addr
R$*<$+>$*		$1$2$3				defocus


################################################
#  Clean up an address for passing to a mailer #
#  (but leave it focused)		       #
################################################

S9
# externalize internal forms which don't meet external specs
R@			$@$n				handle <> error addr
R$*<$*LOCAL>$*		$1<$2$?D$D$?U.$U$.$.>$3		change local info
R<@$+>$*:$+:$+		<@$1>$2,$3:$4			<route-addr> canonical


###########################
#  Name Canonicalization  #
###########################

# Internal format of addresses within the rewriting rules is:
# 	anything<@host.domain.domain...>anything
# We try to get every kind of address into this format, except for local
# addresses, which have no host part.  The reason for the "<>" stuff is
# that the relevant host name could be on the front of the address (for
# source routing), or on the back (normal form).  We enclose the one that
# we want to route on in the <>'s to make it easy to find.
# 

S3

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

# basic textual canonicalization
R$*<$+>$*		$2				basic RFC821/822 parsing

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

# 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 domain-based addresses
# All old-style addresses parse from left to right, without precedence.
# Note that the left side of '%' is a username; it is matched with $+ so
# that complex names like "john.gilmore%l5" will be caught and translated.
# The rest can only have an atom as the host name (left of the symbol).
R$-:$+			$@$>3$2@$1			host:user
R$-^$+			$1!$2				convert ^ to !
R$-!$+			$@$>6$2<@$1.uucp>		uucphost!user
R$-=$+			$@$>6$2<@$1.bitnet>		bitnethost=user
R$-.$+!$+		$@$>6$3<@$1.$2>			host.domain!user
R$+%$+			$@$>3$1@$2			user%host


#######################
#   Rewriting rules   #
#######################

# classify the address by how we think best to get there.  The priorities
# are:
#	1.  Explicitly specified uucp routes will be used.
#	2.  Delivered by tcp/ip if possible
#	3.  UUCP routes used.
S6
# split out explicit uucp sites
R$*<@$*.UUCP>$*		$@$1<@$2.UUCP>$3		break out uucp now

#	What happens below depends on getcanonname to remove a
# trailing dot from something it recognizes and leave the dot
# on something it doesn't.

#	Attempt to verify names using the domain server, et. al.  First
# we try with multi-token names.  If they don't get resolved we explictly
# mark them to be forward to the forwarder.  Otherwise we assume they'll
# be resolved by MX record or direct delivery.
R$*<@$*>$*		$:$1<@$[$2.$]>$3		canonicalize name
R$*<@$*.>$*		$:$1<@$[$2.$]>$3		try twice for luck
R$*<@$-.$=D.>$*		$:$1<@$[$2.$]>$4		try simple name in case
							no name server
R$*<@$-.$=D.$=U.>$*	$:$1<@$[$2.$]>$5		try simple name in case
							no name server

# try to find unresolved single names in the local domain, we tack the
# domain and universe names on because the name server may not respond
# properly otherwise
R$*<@$-.>$*		$:$1<@@$[$2$?D.$D$?U.$U$.$..$]>$3
R$*<@@$*.>$*		$:$1<@@$[$2.$]>$3		try twice
R$*<@@$=V$*.>$*		$:$1<@$2.UUCP>$4		only via uucp
R$*<@@$-$*.>$*		$:$1<@$2.>$4			strip out added garbage

# anything left unresolved gets shipped out yonder
R$*<@$*.>$*		$:$1<@$2.FORWARD>$3

############################################################
############################################################
#####
#####		Local and Program Mailer specification
#####
#####		@(#)localm.m4 1.1 86/07/08 SMI; from UCB	3.7	5/3/83
#####
############################################################
############################################################

Mlocal,	P=/bin/mail, F=lsDFMmnH, S=10, R=20, A=/bin/mail -d -r $f $u
Mprog,	P=/bin/sh,   F=lsDFMeH,  S=10, R=20, A=sh -c $u
Mtty,	P=/usr/local/bin/send, F=rlsSH, S=10, R=20, A=send $u, M=2048

S10
# None needed.

S20
# None needed.

############################################################
############################################################
#####
#####		Ethernet Mailer specification
#####
#####	Messages processed by this configuration are assumed to remain
#####	in the same domain.  Hence, they may not necessarily correspond
#####	to RFC822 in all details.
#####
#####		@(#)etherm.m4 1.1 86/07/08 SMI; from UCB	4.3	11/13/84
#####
############################################################
############################################################

Mtcp,	P=[IPC], F=msDFMueXLR, S=11, R=21, A=IPC $h, E=\r\n
S11
R$-			$:$1$H				hide local users
R$*<@$+>$*		$@$1<@$2>$3			already ok
R$+			$@$1<@$w>			tack on our hostname

S21
# None needed.



############################################################
############################################################
#####
#####		UUCP Mailer specification
#####
#####		@(#)uucpm.m4 1.1 86/07/08 SMI; from UCB	3.6	3/26/83
#####
############################################################
############################################################

############################################################
############################################################
#####
#####		Provide Backward Compatibility
#####
#####		@(#)compat.m4 1.1 86/07/08 SMI; from UCB	3.3	2/24/83
#####
############################################################
############################################################



##########################################################
#  General code to convert back to old style UUCP names  #
##########################################################

S5
R$+<@LOCAL>		$@ $D!$1			name at LOCAL => domain!name
R$+<@$-.LOCAL>		$@ $2!$1			u at h.LOCAL => h!u
R$+<@$+.uucp>		$@ $2!$1			u at h.uucp => h!u
#R$+<@$%y>		$@ $2!$1			u at etherh => etherh!u
R$+<@$+>		$@ $1%$2			u at any => u%any
# Route-addrs do not work here.  Punt til uucp-mail comes up with something.
R<@$+>$*		$@ @$1$2			just defocus and punt
R$*<$*>$*		$@ $1$2$3			Defocus strange stuff



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

# Convert uucp sender (From) field
S13
R$+			$:$>5$1				convert to old style
R$=w!$+			$2				strip local name
R$+			$:$w!$1				stick on real host name

# Convert uucp recipient (To, Cc) fields
S23
R$*<@$*.FORWARD>	$1@$2				band-aid for now
#R$+			$:$>5$1				convert to old style


############################################################
############################################################
#####
#####		RULESET ZERO PREAMBLE
#####
#####	The beginning of ruleset zero is constant for many
#####	configurations.
#####
#####	@(#)zerobase.m4 1.1 86/07/08 SMI; from UCB	4.2	11/13/84
#####
############################################################
############################################################

# Ruleset 29 just calls rulesets 3 then 0.
S29
R$*			$: $>3 $1			First canonicalize
R$*			$: $>0 $1			Then rerun ruleset 0

S0
# On entry, the address has been canonicalized and focused by ruleset 3.
# Handle special cases.....
R@			$#local $:$n			handle <> form
# For numeric spec, you can't pass spec on to receiver, since rcvr's
# are not smart enough to know that [x.y.z.a] is their own name.
R<@[$+]>:$*		$:$>9 <@[$1]>:$2		Clean it up, then...
R<@[$+]>:$*		$#tcp   $@[$1] $:$2		numeric internet spec
R<@[$+]>,$*		$#tcp   $@[$1] $:$2		numeric internet spec
R$*<@[$+]>		$#tcp   $@[$2] $:$1		numeric internet spec

# now delete redundant local info
R$*<$*$=w>$*		$1<$2>$4			thishost.LOCAL
R$*<$*$=w.$=D>$*	$1<$2>$5			thishost.LOCAL
R$*<$*$=w.$=D.$=U>$*	$1<$2>$6			thishost.LOCAL
R$*<$*$=w.uucp>$*	$1<$2>$4			thishost.uucp
R$*<$*$=w>$*		$1<$2>$4			thishost
R$*<$*$w>$*		$1<$2>$3			thishost
R$*<$*$w.$=D>$*		$1<$2>$4			thishost
R$*<$*$w.$=D.$=U>$*	$1<$2>$5			thishost
R$*<$*.>$*		$1<$2>$3			drop trailing dot
R<@>:$*			$@$>29$1			retry after route strip
R$*<@>			$@$>29$1			strip null trash & retry


################################################
###  Machine dependent part of ruleset zero  ###
################################################

# resolve names we can handle locally
R<@$=V.uucp>:$+		$:$>9 $1			First clean up, then...
R<@$=V.uucp>:$+		$#uucp  $@$1 $:$2		@host.uucp:...
R$+<@$=V.uucp>		$#uucp  $@$2 $:$1		user at host.uucp

# forward those needing it to the relay
R$*<@$+.FORWARD>$*	$#$M    $@$R $:$1@$2$3		user at some.where
R$*<@$+.UUCP>$*		$#$M    $@$R $:$1@$2.UUCP$3	user at some.uucp

# ship out tcp/ip mail
R$*<@$*>		$#tcp   $@$2 $:$1@$2		strangeness with @
R$*@$*			$#tcp   $@$2 $:$1@$2		strangeness with @

# Local names with % are really not local!
R$+%$+			$@$>29$1@$2			turn % => @, retry

# retry remaining complex names
R$+			$:$>9 $1			Clean up name, keep <>

# everything else is a local name
R$+			$#local $:$1			local names

######################### End of Sendmail.cf #############################



More information about the Comp.unix.aux mailing list