[comp.mail.sendmail] Problem with SunOS 4.0* sendmail.cf templates and YP domain

dce@Solbourne.COM (David Elliott) (08/25/89)

For years now, Solbourne (formerly SAE) has used the YP domain "SAE1".
Our mail domain, however, has been Solbourne.COM for a few months.

In our sendmail.cf, we added the line DmSolbourne.COM, as suggested
by the SunOS sendmail template:

  # local domain names
  #
  # These can now be set from the domainname system call.
  # If your YP domain is different from the domain name you would like to have
  # appear in your mail headers, edit them to be your mail domain name.
  # Note that the first component of the YP domain name is stripped off unless
  # it begins with a dot or a plus sign.
  # DmPodunk.EDU
  DmSolbourne.COM

Last night, we changed our YP domain to "Solbourne.COM".  Now, we realize
that this was wrong, since if we ever plan to change over to using our
YP domain as our mail domain, or start using named, we will need to
have the domain (as returned by the getdomainname system call) be
+Solbourne.COM or .Solbourne.COM.  We made this change, but we did so
because we had no choice if we wanted sendmail to continue working.

The problem is due to an interaction with ruleset 6:

  S6
  R$*<@$*$=m>$*		$1<@$2LOCAL>$4			convert local domain

This says "any address that ends in something in class m should be
converted to end in LOCAL".  Now, class m is set by sendmail using the
YP domain, but stripping off the characters leading up to the first
period or plus, leaving us with COM added to class m.  Since the
DmSolbourne.COM does not change class m (I don't expect it to), our
mailer rewrote all .COM addresses as .Solbourne.COM, so we couldn't
send any mail to hosts in .COM.

I believe this is a bug in the sendmail.cf sent out by Sun (and maybe
others, for that matter), and it doesn't appear to have been fixed in
4.0.1 or 4.0.3.  My question is:  What's the right fix?  I see the
following possibilities:

	1. Require that the YP domain and the mail domain be the same.

	2. Change sendmail so that it doesn't set class m.

	3. Change the template to reset class m as well as variable m.

	4. Change ruleset 6 to

		  R$*<@$*$m>$*		$1<@$2LOCAL>$3

I see 1 as a bad idea, since there are valid cases for having the YP
and mail domains be different.  I don't like 2, but only because it
makes it easier for people writing sendmail configuration files to get
the YP domain if they need it.  I don't know how to do 3 (I know how to
add to a class, but not how to clear it).  Number 4 seems to be obvious,
but is wrong if for some reason the site really does handle multiple
top-level domains.

Any ideas on this, folks?

-- 
David Elliott		dce@Solbourne.COM
			...!{uunet,boulder,nbires,sun}!stan!dce

"I had a dream that my kids had been reparented." - Tom LaStrange

dce@Solbourne.COM (David Elliott) (08/25/89)

In article <2088@marvin.Solbourne.COM> dce@Solbourne.com (David Elliott) writes:
>
>The problem is due to an interaction with ruleset 6:
>
>  S6
>  R$*<@$*$=m>$*		$1<@$2LOCAL>$4			convert local domain

Oops.  I forgot how this causes another bug.  When our YP domain was
SAE1, the above rule was completely useless, so we had to add an
explicit rule to ruleset 0 to handle our local domain.  That is,
we added the last two lines in this set, since the first was never
effective:

 # deliver local items -- handles known and unknown hosts in our domain
 R$*<@$%y.LOCAL>$*	$#ether $@$2 $:$1<@$2>$3	user@host.sun.com
 R$*<@$%y.$m>$*		$#ether $@$2 $:$1<@$2>$3	user@host.sun.com
 R$*<@$*.$m>$*		$#local $:$1			user@badhost.sun.com
 R$*<@$m>$*		$#local $:$1			user@sun.com

Also, for local subdomains, we had lines like:

 # Deliver to our subdomains
 R$*<@$*.westsci.Solbourne.COM>$*	$#$M    $@westsci $:$1<@$2.westsci.solbourne.COM>$3
 R$*<@westsci.Solbourne.COM>$*		$#$M    $@westsci $:$1<@westsci.Solbourne.COM>$2

These were broken by the change of our YP domain (to +Solbourne.COM),
since addresses ending in westsci.Solbourne.COM now get changed to
westsci.LOCAL.

-- 
David Elliott		dce@Solbourne.COM
			...!{uunet,boulder,nbires,sun}!stan!dce

"I'm livin' on dawg food" -- Iggy