[comp.mail.sendmail] Dealing with Subdomains

woods@ncar.ucar.edu (Greg Woods) (12/06/89)

We are about to split our domain up into subdomains, and I am trying to make
the necessary changes in the sendmail configuration to account for this. In
particular, I want to make it unnecessary for users in one subdomain to
fully qualify every name when sending mail to a host in a different subdomain.
I'd like it to work the way all the other applications (e.g. telnet, ftp,
rlogin) do. I can say

telnet host.sub

(i.e. as opposed to telnet host.sub.ucar.edu) and the resolver happily finds
the right host. So I would like to also be able to send mail to user@host.sub
and have it work. By adding this rule in ruleset 3

R$+<@$+>$*	$1<@$[$2$]>$3

the mail will get there. The problem is that the To: line still reads like
To: user@host.sub (i.e., it doesn't get properly canonicalized). This is all
well and good unless a message is sent with this kind of address and is also
sent to someone outside our domain. If that outside person tries to reply
to all recipients, the original user@host.sub cannot be resolved and the 
message bounces. What I *really* don't understand about this is that if
I run sendmail in address test mode, and pass it through rulesets 2,R,4
(which are supposed to process the To: line), it DOES get properly changed
into user@host.sub.ucar.edu since ruleset 3 is always called first.

Summary: with a name server lookup in ruleset 3, the envelope sender is 
properly resolved. In address test mode, using the rulesets which supposedly
process the To: line, it is properly resolved. However in practice when I
actually send mail, the To: line is left unresolved.

Anybody have any idea what I am missing or overlooking? I've been working on
this for several days and have not been able to solve this problem.

--Greg

ehrlich@cs.psu.edu (Daniel Ehrlich) (12/06/89)

In article <5565@ncar.ucar.edu> woods@ncar.ucar.edu (Greg Woods) writes:

Greg> We are about to split our domain up into subdomains, and I am trying to make
Greg> the necessary changes in the sendmail configuration to account for this. In
Greg> particular, I want to make it unnecessary for users in one subdomain to
Greg> fully qualify every name when sending mail to a host in a different subdomain.
Greg> I'd like it to work the way all the other applications (e.g. telnet, ftp,
Greg> rlogin) do. I can say

Greg> telnet host.sub

Greg> (i.e. as opposed to telnet host.sub.ucar.edu) and the resolver happily finds
Greg> the right host. So I would like to also be able to send mail to user@host.sub
Greg> and have it work. By adding this rule in ruleset 3

Greg> R$+<@$+>$*	$1<@$[$2$]>$3

The easiest way I know of to do this is have CNAME records in the outer
domain UCAR.EDU that point into the subdomain.  Something along the lines
of:

	$ORIGIN	ucar.edu.
	host	IN	CNAME	host.sub

in the name server files for ucar.edu would do.  This means that even though
you have sub-domains the host names must still be unique across all of
ucar.edu.

--
Dan Ehrlich <ehrlich@cs.psu.edu>
Quote of the month:
"And I have quite a bit of experience on mainframes.  I learned C, Pascal,
and Assembler on various mainframes, including PDPs, VAXen, an IBM AS/9000."
	-- Charles M Hannum II <cmh117@psuvm.psu.edu>

ecf_hap@jhunix.HCF.JHU.EDU (Andrew Poling) (12/07/89)

In article <5565@ncar.ucar.edu> woods@ncar.UCAR.EDU (Greg Woods) writes:
[...]
>By adding this rule in ruleset 3
>
>R$+<@$+>$*	$1<@$[$2$]>$3
>
>the mail will get there. The problem is that the To: line still reads like
>To: user@host.sub (i.e., it doesn't get properly canonicalized). This is all
>well and good unless a message is sent with this kind of address and is also
>sent to someone outside our domain. If that outside person tries to reply
>to all recipients, the original user@host.sub cannot be resolved and the 
>message bounces. What I *really* don't understand about this is that if
>I run sendmail in address test mode, and pass it through rulesets 2,R,4
>(which are supposed to process the To: line), it DOES get properly changed
>into user@host.sub.ucar.edu since ruleset 3 is always called first.
[...]
>Anybody have any idea what I am missing or overlooking? I've been working on
>this for several days and have not been able to solve this problem.

Why not put this rule in ruleset 4 too.  That way, every To: and From:
address should be properly canonicalized.  That's what ruleset 4 is for - to
put addresses in external form (i.e. canonicalized).

Hope this helps,

-Andy

--
Andy Poling                              Internet: andy@gollum.hcf.jhu.edu
Network Services Group                   Bitnet: ANDY@JHUVMS
Homewood Academic Computing              Voice: (301)338-8096    
Johns Hopkins University                 UUCP: mimsy!aplcen!jhunix!gollum!andy