🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #2601

Re: creating a "dumb" sendmail.cf file

#2601
From: Joe Ilacqua
Date: Thu, 27 Jun 1991 23:21
195 lines
5534 bytes
In article <SHAWN.91Jun20173035@lit.epfl.ch> shawn@lit.epfl.ch (Shawn Koppenhoefer) writes:
<I want a very very simple, dumb (perhaps retarded) sendmail.cf file
>that will take ALL mail sent from a machine ( say machine-STUPID ) and
<give it to a machine called machine-SMART. I want the mail that leaves
>machine-SMART to actually leave machine-SMART as if it was sent by
<someone who was logged into machine-SMART.... 

	This works nicely:

###########################################################
#
#	SENDMAIL CONFIGURATION FILE FOR NFS CLIENTS.
#
#	You should install this file as /etc/sendmail.cf
#	if want mail to appear to come from one central server
#	and not to be delivered localy.  For ease of use, you
#	should then NFS mount the servers /usr/spool/mail on
#	the local /usr/spool/mail.
#
#	All this cf does is change any reference to the local
#	hostname to the name of the server, and then send the
# 	mail to the server.  All other address parsing is handed 
#	off to the server.
#
#	I believe that this configuration functions correctly, however:
#	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.
#
#	Written by Spike (spike@world.std.com).  Also check out his cool
#	Server cf.

# my official hostname
Dj$w

# major relay mailer
DMTCP

# This is the name of the major relay so we can change our name.
# For example:
#DHcs.bu.edu
DH

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

# local domain name
# For example:
#Dmstd.com
Dm

# Version number of configuration file
DVSpike-2.0


###   Standard macros

# name used for error messages
DnMailer-Daemon
# UNIX header format
DlFrom $g  $d
# delimiter (operator) characters
Do.:%@!^=/[]
# format of a total name
#Dq$g$?x ($x)$.
# This tends to get the Fullname added correctly
Dq<$g>
# SMTP login message
De$j Sendmail $v/$V ready at $b

###   Options

# location of alias file
OA/etc/aliases
# default delivery mode (deliver in background)
Odbackground
# 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
OL9
# default messages to old style
Oo
# Cc my postmaster on error replies I generate
OPPostmaster
# queue directory
OQ/tmp
# read timeout for SMTP protocols
Or15m
# status file -- none
OS/etc/sendmail.st
# queue up everything before starting transmission, for safety
Os
# return queued mail after this long
OT3d
# default UID
Ou1

###   Message precedences
Pfirst-class=0
Pspecial-delivery=100
Pjunk=-100

###   Trusted users
T root daemon uucp

###   Format of headers 
H?P?Return-Path: <$g>
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>
HErrors-To:

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


#  Sender Field Pre-rewriting
S1
# None needed.

#  Recipient Field Pre-rewriting
S2
# None needed.

# Name Canonicalization

# The magic to change the mail to make it look like it comes from the sever
# machine.  If the address contains no hostname or our hostname, we change it 
# to be the server hostname.  $H is the name of the server machine...

S3

R$*<$+>$*		$2			basic RFC822 parsing
R$-			$@$1@$H			user -> user@$H
R$+@$+			$:$1@$[$2$]		find real name (!CNAME)
R$+@$=w			$@$1@$H			user@local -> user@$H
R$+@$=w.$m		$@$1@$H			user@local.domain-> user@$H
R$=w!$+			$@$2@$H			local!user -> user@$H
R$=w.$m!$+		$@$2@$H			local.domain!user-> user@$H
R@$=w:$+		$@@$H:$2		@local:something
R@$=w.$m:$+		$@@$H:$2$3		@local.domain:something
R$+%$=w			$@$>3$1@$2		user%local
R$+%$=w.$m		$@$>3$1@$2		user%local.domain

# We never deliver mail locally, so these are unused.  How ever sendmail gets
# unhappy if we don't have them...
S4
# None needed

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

S10
# None needed.

S20
# None needed.

############################################################
#####
#####		Ethernet Mailer specification
#####
#####	Messages processed by this configuration are assumed to remain
#####	in the same domain.  This really has nothing particular to do
#####   with Ethernet - the name is historical.

MTCP,	P=[IPC], F=msDFMuCX, S=11, R=21, A=IPC $h
S11
# None needed.

S21
# None needed.

#####		RULESET ZERO PREAMBLE

S0
# On entry, the address has been canonicalized and focused by ruleset 3.

# Punt to mail server
R$+			$#$M $@$H $:$1
Technical Details
Message-ID: <SPIKE.91Jun27182110@coke.std.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!caen!spool.mu.edu!uunet!world!spike
References: <SHAWN.91Jun20173035@lit.epfl.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!caen!spool.mu.edu!uunet!world!spike
From: spike@coke.std.com (Joe Ilacqua)
Newsgroups: comp.mail.sendmail
Subject: Re: creating a "dumb" sendmail.cf file
Message-ID: <SPIKE.91Jun27182110@coke.std.com>
Date: 27 Jun 91 23:21:10 GMT
References: <SHAWN.91Jun20173035@lit.epfl.ch>
Sender: usenet@world.std.com (NNTP News Poster)
Organization: Software Tool & Die
Lines: 195
In-Reply-To: shawn@lit.epfl.ch's message of 20 Jun 91 15: 30:35 GMT
Nntp-Posting-Host: coke.std.com