[comp.mail.headers] smail, domains, sendmail, etc.

jsloan@wright.EDU (John Sloan) (01/21/87)

All the discussion (and flames) about smail and domains prompts me to
ask about the feasibility of a solution accessible to users who run
Sendmail and perhaps don't have access to sources.

First, some background...

We run sendmail on a bunch of machine using a variety of transport
mechanisms (pmdf, uucp, DECnet/Ultrix, TCP/IP) and MUST support email
gateways among all of these mechanisms. We connect to both CSNET and
USENET as well as using the above mentioned transport mechanisms for
LAN connections to a variety of machines (both System V and Berkeley)
from a variety of vendors (DEC, Sun, NCR, AT&T, Stride, and some
others). We like Sendmail because [1] we have a tremendous intellectual
investment in it, [2] its fairly easy (well... :-) to make strategic
routing decisions on our gateway machine using it, and [3] we've got
the MMDF distribution and haven't had the guts to make the conversion...
yet. Our sendmail cf also understands about mailnet, bitnet, and arpanet,
and how to route messages to these networks through CSNET.

Question: what is the feasibility of the following mostly hypothetical
mechanism to handle domains?

When sendmail sees an RFC920-compliant address (in the form
*.{EDU,COM,GOV,MIL,...}) is passes the address through the rulesets
unchanged, except S0 resolves to a special mailer. This mailer receives
the message, parses the address ON THE ENVELOPE ONLY (doesn't touch
any part of the headers), scanning the host/domain part from left to
right, trying to find it in a dbm-type database. Once found, the content
of the database which matches the domain key turns out to be a rewrite string
that tells the mailer how to rewrite the address on the envelope. Once
rewritten, the mailer resubmits it to sendmail as a new message. (Yeah,
now it goes through Sendmail twice. Ugh. But think of this as a bandaid
until everyone has switched over to RFC920 compliant domains and better
software has come along).

To make thing go a bit smoother, some common local domains are handled
expressly in ruleset zero.

The database can be built from a combination of pathalias output and
information from the CSNET information server, as well as local
additions to handle local domains. The rewrite string might not be
a simple printf string but perhaps a bit smarter, with variables that
are expanded to be the user name ($u), the domain ($d), the matching
portion of the domain ($m), a conditional bangpart ($!) that expands
to the same as !$d only if $m<>$d, and a conditional percentpart ($%)
that expands to the same as $d% only if $m<>$d.

Examples (totally fictional):

	Key			Content

	space.gov		cbosgd!cape!space!$!$u
	brains.edu		$u%$d@CSNet-Relay.CSNET
	strangelove.mil		$u%$%@strangelove

Now...

mheadroom@space.gov       -> cbosgd!cape!space!mheadroom
mheadroom@a.space.gov     -> cbosgd!cape!space!a.space.gov!mheadroom
albert@host.brains.edu    -> albert%host.brains.edu@CSNet-Relay.CSNET
coke@cola.strangelove.mil -> coke%cola.strangelove.mil@strangelove
coke@strangelove.mil      -> coke@strangelove

None of these examples are necessarily correct or smart, but you get the
idea.

This would implement domains in any transport mechanism which used
Sendmail.

What problems would you get into trying to implement such a system? At
any point would Sendmail get confused? Would other network sites get
confused? Would this violate some taboo in one or another transport
mechanism, or in the mail subculture?

Don't be afraid to flame this whole idea, but if you just want to flame
for flamings sake, please do so directly to my mailbox. My disclaimer
is that I do not claim to be an expert on Sendmail, mail, networks,
or UNIX.

-- John		<jsloan@Wright.Edu or cbosgd!wright!jsloan>
-- 
John Sloan  CSNET: jsloan@CS.Wright.Edu UUCP: ...!cbosgd!wright!jsloan
Computer Science Department, Wright State University, Dayton OH, 45435        
+1 513 873 2491   belong(opinions,jsloan). belong(opinions,_):-!,fail.
The only thing that depreciates faster than a computer is fresh fruit.