[comp.mail.misc] YASQ

evan@ndcheg.UUCP (Evan Bauman) (03/24/88)

Notre Dame will soon be joining the NSFnet, so we're attempting
to teach sendmail how to deliver mail via SMTP to remote sites.

Our routing strategy is this:

1) handle all local mail

2) if the site is in /etc/hosts, deliver via SMTP

3) all the rest of the addresses are fed into smail/pathalias
for routing.

We have steps 1 and 3 working.  Our last problem lies in determining
if the address is in /etc/hosts (or its yellow pages equivalent).  BTW,
we don't have a name-server hosts here yet, but I don't think it would
matter.

From what I can tell, sendmail parses everything on the right side
of the '@' into individual components; i.e.

user @  "site" "." "site" "." "site" "." "domain"

If any of the individual "site"s are in /etc/hosts, then the mail is properly
routed via SMTP.  But there's going to be a multitude of entries with the
format

200.200.200.200		a.b.c.edu

and not

200.200.200.200		sitename

so sendmail doesn't see that the RHS of the '@' is equivalent to anything
in /etc/hosts.  This results in the address being sent on to smail/pathalias
which is OK, but not the best use of our resources.  It's also a waste
of resources at places such as rutgers.  (incentive for rutgers people
to lend a hand!)

If anyone's figured out a solution for this, we'd be glad to know.  Thanks
in advance.

	Evan Bauman
	Univ. of Notre Dame
	..!iuvax!ndcheg!evan
	(219)-239-5699

-- 

---------------------------------------------------------------------------
This message has been sponsored by Powdermilk Biscuits in the big blue box.
---------------------------------------------------------------------------

cfe+@andrew.cmu.edu (Craig F. Everhart) (04/04/88)

I long ago gave up on Sendmail's breaking up domain names into components
(``a.b.c'' into ``a'' ``.'' ``b'' ``.'' ``c'').  That way leads to madness
(``local domain'', ``default domain'', ``really-local domain'').  I doubt that
even a UUCP-only site can justify it these days.  I'll still do pattern matches
(e.g., ``*.cmu.edu'' might get special treatment), but there's no reason to
strip out domains before doing a host table search.

Thus, in answer to your questions, keep full domain-name entries in /etc/hosts
(with short nicknames that you can use until you switch to a resolver-based
system, if you like).  (E.g.,
200.200.200.200 cheg.nd.edu ndcheg
)  Let sendmail do the lookup on the full domain name, and don't forget to turn
any nickname references into full domain names in headers before the mail
leaves your system.

                Craig Everhart
                Andrew message system