[comp.mail.sendmail] SunOS sendmail.cf problem

dce@smsc.sony.com (David Elliott) (01/13/90)

My previous posting got some response, though sadly none from anyone
close to the problem.  Since people asked...

In the sendmail.cf templates (both main and sub) shipped with SunOS,
there is an attempt to be general, but the attempt isn't complete.

There is a section near the beginning that looks like the following:

 #
 # 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

In other words, you can use Dm ("define variable 'm'") to change the
value of the mail domain.

Ruleset 6 is defined as:

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

This says "any address that ends with an item in class 'm' is converted
to end with LOCAL".

One might presume that class 'm' (a vector) and variable 'm' (a scalar)
are related.  They are, but only in the sense that they are both used
to contain domains in this sendmail configuration file.  The problem is
that class 'm' is implicitly set to contain the value of the YP domain
with the first component stripped off (unless it begins with . or +).

There is nothing in the file that resets class 'm' to contain the new
value of variable 'm'.  As a result, if you have a YP domain of
'engineering' and a mail domain of 'foo.com', ruleset 6 will not work,
as it is attempting to convert 'engineering' to 'LOCAL'.  Even worse,
if you set your YP domain to 'foo.com' and explicitly set variable
'm' to 'foo.com', class 'm' contains 'com', which means all addressing
ending in 'com' is handled as local mail!

The only fix I know of is to change the last line of ruleset 6 to

 R$*<@$*$m>$*           $1<@$2LOCAL>$3                  convert local domain

This makes the sendmail configuration ignore class 'm' and use
variable 'm'.

Any better fix requires a way to explicitly reset class 'm' to be
empty, which is not possible.

Anyway, if anyone can get this to Sun, it will save a lot of grief
for people in the future.  Also, if someone at Sun does fix this,
I'd like to hear about it.
-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"Baziotes! Baziotes! Getcha red hot Baziotes here!"

kim@kannel.lut.fi (Kimmo Suominen) (01/16/90)

>>>>> On 12 Jan 90 19:39:13 GMT, dce@smsc.sony.com (David Elliott) said:

David> Any better fix requires a way to explicitly reset class 'm' to be
David> empty, which is not possible.

Why is that?  Can't you use "Cmfoo com" or if you want an empty class m, then
use "Cm".  At least in the sendmails I've configured (including Suns) this
seems to work.

Kim
--
 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
( Kimmo Suominen        ! Lappeenranta U of Technology ! kim@kannel.lut.fi )
( "That's what I think" ! Computing Centre  *  Finland ! Funet: KUULA::KIM )
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''