tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Usuario novato <osf () xosfulsa ! ulsa ! mx>
To: tru64-unix-managers
Subject: SUMMARY:  Mail problems
Date: Fri, 09 Aug 1996 15:36:44 +0000	[thread overview]
Message-ID: <96076337821378.tru64-unix-managers.marc@archive.invalid> (raw)


I had some problems with my mails.  Every time we sent one, it was 
returned back to my home directory, with the message "rewrite: map @ not 
found", and when trying to fix it, we had another problem about the 
domain name.  But right now it` working ok.  

   THANKS A LOT TO DAVE SINNOTT !!!  (dave@persimmon.com)

Here it is the correct version of sendmail.cf (the one that is working ok).

***************************************************************************

############################################################
############################################################
#####
#####		SENDMAIL CONFIGURATION FILE
#####
#
# *****************************************************************
# *                                                               *
# *    Copyright (c) Digital Equipment Corporation, 1991, 1995    *
# *                                                               *
# *   All Rights Reserved.  Unpublished rights  reserved  under   *
# *   the copyright laws of the United States.                    *
# *                                                               *
# *   The software contained on this media  is  proprietary  to   *
# *   and  embodies  the  confidential  technology  of  Digital   *
# *   Equipment Corporation.  Possession, use,  duplication  or   *
# *   dissemination of the software and media is authorized only  *
# *   pursuant to a valid written license from Digital Equipment  *
# *   Corporation.                                                *
# *                                                               *
# *   RESTRICTED RIGHTS LEGEND   Use, duplication, or disclosure  *
# *   by the U.S. Government is subject to restrictions  as  set  *
# *   forth in Subparagraph (c)(1)(ii)  of  DFARS  252.227-7013,  *
# *   or  in  FAR 52.227-19, as applicable.                       *
# *                                                               *
# *****************************************************************
#
#####		generic configuration
#####
#####
############################################################
############################################################
#
# NOTE:  This is a generic sendmail.cf file.  Please use mailsetup to
#        change configuration.
#
# EDIT-- IMPORTANT!! enter your unqualified host name here if your hostname
# EDIT-- for your machine is qualified.  For example, if your hostname was
# EDIT-- foo.dec.com then the enter DAfoo and comment DA$w.
DAxosfulsa
#
# EDIT--  this is added in answer to a question "What is your domain? "
# EDIT--  this is used for all hosts.
# EDIT--  **IMPORTANT** when setting this macro make sure you set the
# EDIT--  $A macro (above) is the unqualified host name!!!!
DDulsa.mx

## predefined
#	$y decnet node name (if known) (if running a recent binary)
#	$w fully-qualified hostname
#	$j same as $w (except IDA, which is all-lower-case, strip-at-first-dot)
##

############################################################ @Ltag(LocalInfo)
###	local info
############################################################
# EDIT-- Top Level or parent domain -  the reason for this is if
# EDIT-- you can directly reach hosts in this domain via IP but not
# EDIT-- outside -- through the gateways.  It is also used for
# EDIT-- address encapsulation.
DP$D

# my domain
DN$D

# name exported on external internet mail
DW$w

# my official hostname
Dj$w

# EDIT--    this is added in answer to a question basically asked
# EDIT--    to determine what to do whenyou dont know how to deliver.
# EDIT--    Who gets the mail?  Can be empty...
# EDIT--    if for Tcpip host should be fully qualified name
#DRgeneralpurposerelay

Dy$A
# $=J[.$P] is gatewayed through $J or sent via DECNET/MAIL11
# $=K[.$P] is gatewayed through $K or sent via DECNET/UMC
#	if $J ($K) is undefined; will just use MX records (i.e. $#smtp)
#	if set to $j will cause mail to be sent via mail11 from this host
# 
# Easynet/Mail11
#
# (DNET is hardcoded here because DEC's mail11d generates it; $=J should not
#  include $E or $F since these are likely to be multi-token which only IDA
#  can handle in class matches. UTK Mail11D generates .DNET or .ENET (depending
#  on your compile-time configuration).  $=J must include whatever your Mail11D
#  is generating which in the case of UTK with .ENET would make you want to
#  set your ENET to ENET.)
#
CJDNET ENET
DJ$j
DEENET
DI$j
DFD5NET

# Phase V namespace
# EDIT-- enter your Phase V namespace here.
DXNAMESPACE
#
# MessageRouter/UMC
#
CKmts mr umc
# EDIT-- enter your UMC relay here.
#DKmr_relay
DMMTS
#
# UUCP
#
# EDIT-- enter your UUCP name here.
DU$A

#
# aliases at the $P level -- we think we are authoritative for these
#
Cddnet enet uucp

#
# usernames which will be @host qualified on outbound localdom mail
#
CNdaemon mailer-daemon news nobody pop postmaster rdist root uucp

#
# trash top-level domains -- don't use $[...$] on names ending with these
#
CTUUCP USENET UMC DNET ENET

############################################################
#
#	General configuration information
#
############################################################

# Version Number
DV1.1.3.6

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

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

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

# wait 5 minutes for newaliases to complete
Oa
# location of alias file
OA/var/adm/sendmail/aliases
# default delivery mode (deliver in background)
Odbackground
# temporary file mode
OF0600
# default UID
Ou1
# default GID
Og1
# location of help file
OH/usr/share/lib/sendmail.hf
# log level
OL9
# include sender if she's on an alias to which she's sending
Om
# queue directory
OQ/var/spool/mqueue
# read timeout -- violates protocols
Or1h
# status file
OS/var/adm/sendmail/sendmail.st
# queue up everything before starting transmission
Os
# use separate envelope/header rewriting rulesets (IDA)
O/
# default timeout interval
OT3d
# load average for forcing "Odq" behaviour
Ox20
# load average for refusing connections
#OX12
OX99

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

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

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

Troot daemon uucp news

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

H?P?Return-Path: <$g>
HReceived: by $j; id $i; $b
#HReceived: $?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:
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

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

##
## S1/S2 (and S5/S6 in IDA) are called before the per-mailer S= and R= rwsets.
## for any address types which we export in native format (e.g., uucp !-form)
## rather than pseudodomain format (e.g., mail11 @node.decnet form), we need
## to undo the effects of S3/S7 here, so that the per-mailer rwsets will see
## them as "unqualified" and add the appropriate qualification to them.  note
## that this is a deeply divisive issue; these so-called "mixed-mode" addresses
## (e.g., vixie!paul@decwrl.dec.com) have different interpretations depending
## on who you ask.  since you're running our config file, you're getting our
## particular leanings.  if you want it done some other way, do it yourself.
## (vix)

################################
#  Sender Field Pre-rewriting  #
################################
S1
R$+<@$-.UUCP>		$2!$1				decapsulate UUCP
R$-@$+			$@$1@$N
R$-             		$@$1@$N

###################################
#  Recipient Field Pre-rewriting  #
###################################
S2
R$+<@$-.UUCP>		$2!$1				decapsulate UUCP

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

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

# route-addr's look canonical but aren't
R<@$+:$+>$*		@$1:$2				unfocus <route-addr>

# already canonical?
R$*<@$+>$*		$@$>7$1<@$2>$3			idempotency is good

# basic textual canonicalization -- note lack of RFC733 heuristic here
R$*<$+>$*		$2				basic RFC822 parsing

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

# more miscellaneous cleanup
R$+:$*;$*		$@$1:$2;$3			list syntax
R$+@$+			$:$1<@$2>			focus on domain
R$+<$+@$+>		$1$2<@$3>			move gaze right
R$+@$+<@$+>		$1%$2<@$3>			a@b@c@d ->a%b%c@d

#
# DECNet.  First turn all these addresses into :: form then back to @-form
# with a .pseudodomain approporiate to the protocol (phaseIV/phaseV/MR)
#

# (phase IV)
R$+<@$+.$E>		$@$>7$1<@$2.$E>			already encapsulated IV
R$+<@$-.$-.$=J>		$:$2.$3::$1			u@aa.nnn.DNET
R$+<@$-.$=J>		$:$2::$1			u@node.DNET

R$+<@$+.$=J>		$1<@$2>				not IV; try as a V

# (phase V)
R$+<@.$-.$+>		$:.$2.$3::$1			u@.root.path
R$+<@$-:.$-.$+>		$:$2:.$3.$4::$1			u@ns:.root.path
R$+<@%$->		$:%$2::$1			u@%nsap
# (all decnet addresses
#  are now in ::-format,
#  including the ones
#  that came in that way;
#  and the .DNET is gone.)

# things that are still in @-form are ready to eat
R$+<@$+>		$@$>7$1<@$2>			now canonical

# (phase IV conversions)
R$-.$-::$+		$@$>7$3<@$1.$2.$E>		numeric decnet addr
R$-::$+			$@$>7$2<@$1.$E>			h::u -> u@h.pseudodom

# (phase V conversions)
R%$-::$+		$@$>7$2<@$1.$F>			%nsap::user
R.$-.$+::$+		$:$X:.$1.$2::$3		add default namespace
# (anything with a :: at
#  this point is a NS-
#  qualified phase V addr;
#  there are NO @-signs)
R$-:.$-.$+::$+		$:$4@$3<@$2.$1>			ns:.root.path
R$+@$-.$+<@$*>		$1@$3<@$2.$4>			shuffle tokens to end
R$+@$-<@$+>		$@$>7$1<@$2.$3.$F>		last token; remove dot

# UUCP conversions
R$-.$+!$+		$@$>7$3<@$1.$2>			host.domain!user
R$-!$+			$@$>7$2<@$1.UUCP>		resolve uucp names

# convert rightmost % to @ (ruleset 7 has the rest of the magic for this)
R$+%$+			$@$>7$1<@$2>			user%host

# (ruleset 3 ends here.  we don't exit through
#  $>7 here as with the other exits from ruleset 3
#  since we only exit through S7 when we make a
#  change.)

##### special local conversions (exit path from S3)
S7
R$*<@$+%$+>$*		$1%$2<@$3>$4			move @ right after %
R$*<@$+.$E>$*		$@$1<@$2.$E.$P>$3		hide .$E under $P
R$*<@$+.$F>$*		$@$1<@$2.$F.$P>$3		hide .$F under $P
R$*<@$+.$=K>$*		$@$1<@$2.$M.$P>$4		.$=K -> $M.$P
R$+<@POP>$*		$@$1<@POP>$2			POP already OK
R$*<@$->$*		$@$1<@$2.$N>$3			qualify hostnames

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

R@			$@				handle <> error addr
R$*<$+>$*		$1$2$3				defocus
R@$+:$+:$+		@$1,$2:$3			<route-addr> canonical
R@$+:$+			$@<@$1:$2>			route-addr needs <>

#################################
#  (IDA) header senders         #
#################################
S5
R$+			$@$>1$1				same as envelope

#################################
#  (IDA) header recipients      #
#################################
S6
R$+			$@$>2$1				same as envelope

#################################
#  Utility: strip local domain  #
#################################

# this is neccessarily tricky.  S0 needs to strip off the local host(s) and
# it may take several passes to do that (consider $-%$j%$j%$j or $U!$-@$j).
# this requires iterate-until-no-change, which is a semantic not directly
# provided by sendmail.  sendmail does permit recursion, though, which we
# use.  S0 calls S8, which calls itself whenever it makes a change, else falls
# out the bottom when it has nothing left to strip.
#


# S8 starts by calling S3 since on the subsequent recursive calls, a change
# will have been made and the canonicalizion will have been lost.  we would
# like to use $>8$>3 but that doesn't work the way you'd expect.  the cost
# here is that S3 gets called once at the top even though S3 was called before
# S0 so there's nothing for it to do.  this is why S3 must be idempotent and
# also why S3's "no change needed" condition is so close to its top.

S8

R$+			$:$>3$1				needed for recursions

R$*<@$j>$*		$:$1<@>$2			@myfqdm
R$*<@$=w>$*		$:$1<@>$3			@my alias
R$*<@$=w.$N>$*		$:$1<@>$3			@my alias


R$*<@$y.$E.$P>$*	$:$1<@>$2			myname:: (IV)
R$*<@$y.$F.$P>$*	$:$1<@>$2			myname:: (V)

R$*<@$U.UUCP>$*		$:$1<@>$2			myuucpname!

# here's where we recurse if a change was made
R<@>:$*			$@$>8$1				localhost/route-addr
R$*<@>$*		$@$>8$1$2			localhost

########################################
#  Utility: canonicalize local domain  #
########################################

S9

# (next four lines are only generated if $N isn't LOCAL)
R$*<@$->$*		$:$1<@$2.$N>$3			qualify
R$*<@$+.$=T>$*		$@$1<@$2.$3>$4			trash pseudodom, lv aln
R$*<@$+.$=T.$P>$*	$@$1<@$2.$3.$P>$4			qualified trash, lv aln
R$*<@$+>$*		$:$1<@$[$2$]>$3			canon'ize complex names

############################################################
############################################################
#####
#####		RULESET 0
#####
############################################################
############################################################

S0

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

# localize if possible (rip off @DOMAINs for which we are authoritative)
#
R$*<@$+>$*		$:$>8$1<@$2>$3

# DECNet/Mail11
#
# (phase IV)
R$+<@$+.$E.$P>		$:$2@@$1<@$2.$E.$P>		dup nodename; add @@
R$+@@$+<@$+>	$:$?J$1@@$2??$3<@$J>$|$1@@$2<@$3>$.	mk @relay or lv alone
R$+@@$+??$+<@$j>		$#mail11 $@$1 $:$2	them is us; use mail11
R$+@@$+??$+<@$J>		$#smtp $@$J $:$2<@$3>	undo damage; send now
R$+@@$+??$+<@$+>		$:$2<@$3>			undo $?J damage
R$+@@$+<@$+>		$:$2<@$3>			undo !$?J damage
# (phase V)
R$+<@$+.$F.$P>		$:@@$2@@$1<@$2.$F.$P>		dup nodename; add @@ @@
R$*@@$-.$+@@$+		$2.$1@@$3@@$4			slide tokens to left@@
R$+.@@$-@@$+		$2:.$1@@$3			rm 1@@; final reformat
R@@$-@@$+		%$1@@$2			rm 1@@; final reformat
R$+@@$+<@$+>	$:$?I$1@@$2??$3<@$I>$|$1@@$2<@$3>$.	mk @relay or lv alone
R$+@@$+??$+<@$j>		$#mail11 $@$1 $:$2		them is us; use mail11
R$+@@$+??$+<@$I>		$#smtp $@$I $:$2<@$3>	undo damage; send now
R$+@@$+??$+<@$+>		$:$2<@$3>			undo $?I damage
R$+@@$+<@$+>		$:$2<@$3>			undo !$?I damage
# (MessageRouter)
R$+<@$+.$=K.$P>		$:$?K$1??$2.$M.$P<@$K>$|$1<@$2.$M.$P>$.
R$+??$+.$M.$P<@$j>	$#umc $@$2 $:$1<@$2>		them is us; use mail11
R$+??$+.$M.$P<@$K>	$#smtp $@$K $:$1<@$2.$M.$P>	undo damage; send now

# UUCP
#
R$*<@$-.UUCP>		$#uucp $@$2 $:$2!$1		use our own uucp

# Fake hosts in my domain
#
R$+<@POP>		$#pop $@$j $:$1			username@POP

# Real hosts in my domain
#
R$*<@$*$N>$*	$#smtpl $@$2$N $:$1<@$2$N>$3	our domain; no gw

# Parent domain
#
R$*<@$*$P>$*	$#smtp $@$2$P $:$1<@$2$P>$3	our domain; no gw

# Nonlocal mail
#
R$*<@$+>$*		$#smtp $@$?R$R$|$2$. $:$1<@$2>$3	

# Local mail
#

R$+			$#local $:$1			must be local

############################################################
############################################################
#####
#####		Local, POP and Program mailers
#####
############################################################
############################################################

Mlocal,	P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -r $f -d $u
Mprog,	P=/bin/sh,   F=lsDFM,   S=10, R=20, A=sh -c $u
Mpop,	P=/usr/lib/mh/spop, F=nsmFDM, S=10, R=20, A=pop $u

S10
R@			$n				errors to mailer-daemon

S20

############################################################
############################################################
#####
#####		SMTP to hosts inside the local domain
#####
############################################################
############################################################

Msmtpl,	P=[IPC], F=mDFMuX, S=11, R=21, A=IPC $h, E=\r\n

# (we pull off the local hostname in all cases, and then selectively add it
#  back on.  we would add it back if the aliases aren't shared across all
#  hosts in this domain, or if the user is root or one of the others that
#  we want to know the hostname for.)
#
S11
R$*<@$j>$*		$>3$1$2				strip local host name
R$*<@$+>$*		$:$>9$1<@$2>$3			canonicalize domain
# (next two lines are only present if aliases aren't shared across localdom)
R$*<@$+>$*		$@$1<@$2>$3			already has an @domain
R$+			$@$1				add our hostname

# (by running S11 on recipients, we get the above behaviour on To: and Cc:
#  headers, as well as for the envelope recipient.  this is good since we
#  always call $#smtpl with hostname attached, which means that we won't be
#  down here at all if $j is in the address (that would have been stripped
#  in S0), and we will therefore qualify any domain-less addresses with our
#  own hostname before sending them to other hosts in our domain.  this is
#  all ugly but it's what you have to do if your aliases aren't shared. --vix)
#
S21
R$+			$@$>11$1			nothing special here

############################################################
############################################################
#####
#####		SMTP to hosts outside the local domain
#####
############################################################
############################################################

Msmtp,	P=[IPC], F=mDFMuXL, S=12, R=22, A=IPC $h, E=\r\n

S12
R<@$+>$*		$@<@$1>$2			<route-addr> syntax
R$*<@[$+]>$*		$@$1<@[$2]>$3			numeric, lv alone
R$*<@$+>$*		$@$>9$1<@$2>$3			canonicalize domain
R$=N			$@$1				Add $j to local
R$-			$:$1??$(@ $1 $: $)		Look up aliases
R$-??$+		$@$1				Found it - reformat
R$-??			$:$1				undo dammage
R$+			$@$1				fix up return addr

S22
R$+			$@$>12$1			nothing special here

############################################################
############################################################
#####
#####		SMTP to relay host
#####
############################################################
############################################################

Msmtpr,	P=[IPC], F=mDFMuX, S=13, R=23, A=IPC $h, E=\r\n

# (we pull off the local hostname in all cases, and then selectively add it
#  back on.  we would add it back if the user is root or one of the others
#  for which we want to know the hostname.  Otherwise we want to look like we
#  are a local user on the relay machine.  This is to allow for "cleaner"
#  addresses when crossing mail domains. --FMA)
#
S13
R$*<@$j>$*		$>3$1$2				strip local host name
R$*<@$+>$*		$:$>9$1<@$2>$3			canonicalize domain
R$=N			$@$1<@$j>			qualify nonhidden users
R$-			$:$1??$(@ $1 $: $)		Look up aliases
R$-??$+			$@$1<@$j>			Found it - reformat
R$-??			$:$1				undo dammage

S23
R$+			$@$>13$1			nothing special here

############################################################
############################################################
#####
#####           DECNET/MAIL11
#####
############################################################
############################################################

# (note that you will need an ultrix or osf1 sendmail binary to use this)
Mmail11, P=/usr/sbin/mail11v3, F=mnSXxH, S=14, R=24/29,
	A=mail11 $f $x $h

# (mail11 senders)
S14
R$+			$:$>3$1			Make canonical to convert last % to @
# (phase IV)
R$+<@$+.$E.$P>		$@$2::$1			phaseIV back to :: form
# (phase V)
R$+<@$-.$F.$P>		$@$1@%$2			% form
R$+<@$+.$F.$P>		$:@@$2@@$1			dup nodename; add @@ @@
R$*@@$-.$+@@$+		$2.$1@@$3@@$4			slide tokens to left@@
R$+.@@$-@@$+		$@$3@$2:.$1			rm 1@@; final reformat

# (mail11 recip env)
S24
R$+			$@$>14$1			nothing special here

# (mail11 recip hdr)
S29
# next line is for CC: headers which most mail11 receivers won't qualify
R$-			$@$1@$y				tack on our nodename
R$+			$@$>14$1			nothing special here

############################################################
############################################################
#####
#####           UMC mailer
#####
############################################################
############################################################

Mumc,	P=/usr/lib/umc/mr_mailer, F=mnDFMS, R=0, S=0,
	A=mr_mailer -send -hop $c -from $f -to $u


############################################################
############################################################
#####
#####           UUCP mailers
#####
############################################################
############################################################
#
Muucp,	P=/usr/bin/uux, F=sDFhuU, S=15, R=25, M=100000,
	A=uux -  $h!rmail ($u)

##
## a more robust implementation of uucp would provide for route-addrs and
## MX neighbors; as well as pathalias; pulling $P off of pseudodomains;
## and RFC822-vs-not neighbors.
##
## UUCP is an odd case since the overwhelming majority of UUCP nodes can
## handle u@dom form addresses now.  We want to pass those through without
## change.  If something comes here in !-form; we likewise leave it alone
## if the first uucpnode in the path is a single token; if it contains
## multiple dot-separated tokens we assume that it's a domain and we change
## it into @-notation.
##
## note that we do not remove $U from the recipients.  the envelope recipient
## has this done to it at S0 time; and the header recipients should be left
## alone.
##

S15
R$*<@$+>$*		$@$1<@$2>$3		domain form is ok
R$+			$:$>25$1		do unto sender as to recipient
R$U!$+			$@$U!$1			already has our node name
R$+			$@$U!$1			tack on our hostname.

S25
R$*<@$+>$*		$@$1<@$2>$3		domain form is ok
R$-!$+			$@$1!$2			!-form is ok; done
R$+!$+			$@$>3$2<@$1>		looks like domain; chg to u@dom

**************************************************************************


                                                   osf

                 reply	other threads:[~1996-08-09 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox