🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.mail.sendmail
3 messages
3 total messages Started by Rich Salz Wed, 04 Jan 1989 13:45
A minimal cf?
#3057
Author: Rich Salz
Date: Wed, 04 Jan 1989 13:45
22 lines
1017 bytes
Has anyone tried running with a a sendmail.cf that does NO rewriting at
all?  I'm thinking of a config that does this for destination addresses:

	site!stuff		Give to UUCP relay
	dom.ain!stuff		Rewrite as stuff@dom.ain and continue
	simple@dom.ain		If dom.ain is in class L, do local
				delivery, otherwise, send it to
				dom.ain for delivery
	stuff@dom.ain		Give to to dom.ain for delivery

Recipient addresses:
	site!stuff		Don't touch
	dom.ain!stuff		Don't touch
	simple			Add "@myhost.domain"

Basically get rid of ALL the crap in Rules 0 and 3, at the cost
of giving up route-addresses.

Comments?
	/rich $alz
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Re: A minimal cf?
#3058
Author: peter honeyman
Date: Wed, 04 Jan 1989 15:00
5 lines
642 bytes
when i first got on the internet, i ran a sendmail.cf that did nothing
but resolve to the local mailer.  then geoff and ian sent me an smtp
listener -- zap!  no more sendmail.

	peter
Re: A minimal cf?
#3065
Author: Ruediger Helsch
Date: Thu, 05 Jan 1989 17:48
114 lines
3668 bytes
In article <1324@fig.bbn.com> rsalz@bbn.com (Rich Salz) writes:
>Has anyone tried running with a a sendmail.cf that does NO rewriting at
>all?

We use a minimal "leaf node" sendmail.cf at our site. The only header
munging is adding our domain if a domain is missing. The drawback:
We can't use rmail. Our (Ultrix 1.2) rmail insists on doing its own
header pre-munging. But luckily we don't need rmail if we don't use
bang paths. Indeed rmails only purpose is to patch bang paths in the 
header. We can do without and call sendmail directly (through a shell 
script preventing our uucp peers to call sendmail with switches).

Here comes our sendmail.cf. To save space, i deleted the options list.
I did include the complete rulesets and mailer definitions.

---------------------------------------------------------------------

#
#     Local names
#
# our full domain name
Djramz.uucp
# gateway
DGinfbs



#
#       Ruleset 0  --  Select mailer to be used 
#
S0
# add subdomain routing here. for example
# R$*@subdomain.$j      $#mailtosubdomain

# local mail
R~$-@$j     $#binmail$:$1       local mail - no aliasing
R$-@$j      $#local$:$1         local mail

# reject everything else with our domain-extension
R$*@$*$j    $#error$:Subdomain Unknown <$1@$2$j>

# everything else goes to external mail connection
R$+         $#smuucp$@$G$:$1    external domains to smart uucp gateway



S1
S2
# are empty



#
#       Ruleset 3  --  Name Canonicalisation
#
S3
R$*<$*>$*   $:$2                basic RFC 822 parsing ( '... <adr>' )
#                               Our Ultrix 'Mail' generates 'user@host', not
#                               'user@host.domain' :
R$+@$w      $1@$j               Expand our host address to our domain address
R$+@$+      $@$1@$2             Return if domain address
R$+!$+      $@$1!$2             Return if bang path
R$+         $@$1@$j             Else add our domain



S4
# is empty



#
#      The Mailers
#
#      Local and Program Mailer specification
#
Mlocal,   P=/bin/mail, F=rlsmnFDuh, S=11, R=11, A=mail -d $u
Mbinmail, P=/bin/mail, F=rlsmnFDuh, S=11, R=11, A=mail -d $u
Mprog,    P=/bin/sh,   F=nlsFDMR,   S=11, R=11, A=sh -c $u
#
#  The important thing here is to keep a valid reply path!
S11
R@                      $n                      errors to mailer-daemon
R~$+                    $1                      remove '~' in To: line
#
#       SMARTUUCP Mailer specification
#       For Hosts understanding domains
#
Msmuucp, P=/usr/bin/uux, F=FDMhnus, M=100000,
	A=uux - -n -gA $h!rsendmail (\'$g\') (\'$u\')

---------------------------------------------------------------------------

And here's the rsendmail shell script for the smartuucp mailer:

---------------------------------------------------------------------------
#!/bin/sh
IFS=' \t          # That's a space and a tab and a newline
'
export IFS
set -u
PATH=
export PATH

sendmail=/usr/lib/sendmail

case $# in
    0)  exec $sendmail -t -oee;;        # both addresses from header
    1)  exec $sendmail -t -oee "-f$1";; # from-address from 1. arg
    2)  case "$2" in
	    -*) exec $sendmail -t -oee "-f$1";;   # don't pass switches
	     *) exec $sendmail -oee "-f$1" "$2";; # both addresses from args
	esac;;
esac
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads