🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #2690

Why somewhere?

#2690
From: Max Cray
Date: Sat, 23 Jan 1993 08:58
376 lines
9279 bytes
Help. I need some help configuring sendmail. I only have a couple of
uucp nieghbors and want to send all out going mail to a smart host.
I also want a minimum of header changes by sendmail. I got it working
pretty good, but am having trouble with incoming pass-through mail.
My mailer is altering the top from line to say:

From uucp@uu2.psi.com   Fri Jan 22 05:38:28 1993 remote from somewhere
                                                             ^^^^^^^^^

Why 'somewhere'? Where does this come from? Why not a specific
machine name? This somewhere name also appears in the outgoing execute
file:

--

U daemon medianet
# return status on failure
Z
# return address for status or input return
R somewhere!uucp@uu2.psi.com
F D.media1f5660f
I D.media1f5660f
C rmail zackh

--

As you can see the return address is wrong and it has that strange
'somewhere' added in. I am not sure where this is coming from. Any
clues would be much appreciated.
    Here is the sendmail.cf in question. Also, if you see any pending
disasters in it I would appreciate any advice. Thanks!

--

#
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley.  The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#	@(#)uucpproto.mc	1.2 (Berkeley) 1/24/89
#	@(#)proto.mc	1.21 (Berkeley) 2/15/89
#
#
############################################################
############################################################
#####
#####		SENDMAIL CONFIGURATION FILE
#####
############################################################
############################################################


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

# file containing our internet aliases
# Fw/usr/lib/sendmail.cw

# uucp hostnames
DUmedianet
CUMedianet medianet sq1

# local UUCP connections
CV	underg
CV	uupsi2
CV	mnet-sv


######################
#   General Macros   #
######################

# local domain name
DDmedianet.com


# UUCP relay host
DRuupsi2


# my official hostname
Dj$D


###############
#   Classes   #
###############

# Internal ("fake") domains that we use in rewriting
CIUUCP BITNET CSNET



######################
#   Version Number   #
######################

DZ1.35


######################
#   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/$Z ready at $b

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

# location of alias file
OA/usr/lib/aliases
# wait up to ten minutes for alias file rebuild
Oa10
# substitution for space (blank) characters
OB.
# (don't) connect to "expensive" mailers
#Oc
# default delivery mode (deliver in background)
Odbackground
# temporary file mode
OF0600
# default GID
Og1
# location of help file
OH/usr/lib/sendmail.hf
# log level
OL9
# default network name
ONARPA
# default messages to old style
Oo
# queue directory
OQ/usr/spool/mqueue
# read timeout -- violates protocols
Or2h
# status file
OS/usr/lib/sendmail.st
# queue up everything before starting transmission
Os
# default timeout interval
OT3d
# time zone names (V6 only)
OtCST,CDT
# default UID
Ou1
# wizard's password
OW*
# load average at which we just queue messages
Ox8
# load average at which we refuse connections
OX12

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

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

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

Troot
Tdaemon
Tuucp

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

H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.by $j ($v/$Z)
	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   ###
###########################


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

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


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

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

# basic textual canonicalization -- note RFC733 heuristic here
R$*<$*<$*<$+>$*>$*>$*	$4				3-level <> nesting
R$*<$*<$+>$*>$*		$3				2-level <> nesting
R$*<$+>$*		$2				basic RFC821/822 parsing

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

# localize and dispose of route-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;			list syntax
R$+@$+			$:$1<@$2>			focus on domain
R$+<$+@$+>		$1$2<@$3>			move gaze right
R$+<@$+>		$@$>6$1<@$2>			already canonical


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

R@			$@				handle <> error addr

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


#################################
#   special local conversions   #
#################################

S6
R$*<@$=w>$*		$:$1<@$D>$3			get into u@$w form
R$*<@$=w.$D>$*		$:$1<@$D>$3
R$*<@$=U.UUCP>$*	$:$1<@$D>$3


#
#  Local Conversions by Chris
#

S8

# Return if correct Internet mail address format
R$+@$+.$+		$@$1@$2.$3
# Convert Internet addresses missing domain names to bang path format
R$+@$+			$@$2!$1


###################
###   Mailers   ###
###################


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

Mlocal,	P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u
Mprog,	P=/bin/sh,   F=lsDFMe,   S=10, R=20, A=sh -c $u

S10
R@			$n			errors to mailer-daemon


############################################################
############################################################
#####
#####		UUCP Mailer specification
#####
############################################################
############################################################

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

S13
R$+<@$+>		$@$1@$2
R$+!$+			$@$U!$1!$2
R$+			$@$1@$j

S23
R$+			$@$1


############################################################
############################################################
#####
#####		RULESET ZERO PREAMBLE
#####
#####	The beginning of ruleset zero is constant through all
#####	configurations.
#####
############################################################
############################################################

S0

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

# handle special cases
R@			$#local$:$n			handle <> form

# now delete the local info and retry
R$*<@$j>		$@$>0$1				...@here -> ...
R$j!$+			$@$>0$1
R$=U!$+			$@$>0$2

###############################################
###   Machine dependent part of Rule Zero   ###
###############################################


# resolve local UUCP connections
R$+<@$=V.$+>		$#uucp$@$2$:$1			user@host.UUCP
R$=V!$+			$#uucp$@$1$:$2

# Forward all non-local net mail to server (by Chris)
R$+<@$+>		$#uucp$@$R$:$1@$2
R$+!$+			$#uucp$@$R$:$1!$2

# remaining names must be local
R$+			$#local$:$1			everything else

                                          -= Max =-

---------------------------------------------------------------------
               The ideal home computer is a network.
Technical Details
Message-ID: <y5NTXB10w165w@underg.ucf.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!underg!max

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!underg!max
From: max@underg.ucf.org (Max Cray)
Newsgroups: comp.mail.sendmail
Subject: Why somewhere?
Message-ID: <y5NTXB10w165w@underg.ucf.org>
Date: Sat, 23 Jan 93 02:58:57 CST
Organization: Underground Computing Foundation
Lines: 376