From: David T. Hightower (
Date: Thu May 20 1993 - 17:50:47 CDT

Well, I received a few replies, and one of them pointed me in the right direction.

It seems that for some reason, the w macro in was getting the entire
system name ( instead of just the hostname (utah). Also, as I stated
earlier, sendmail will strip off the first component of the NIS domain name unless
it begins with a plus sign or dot. So, all outbound mail would have either
hightowr@utah,,,, or as a
return address (depending upon whether you use /usr/lib/sendmail, pine, mm, or
mailtool; believe it or not, some of these "override" the return address

It was suggested that I grab a newer version of sendmail, since the one
that shipped with SunOS 4.1.3 is probably out of date. I am currently
looking into that. Thanks to

Another person ,, reminded me of the plus-or-dot rule; I don't
want to change the domain name just for's quirks.

Three replies, from,, and,
pointed me in the right direction. The trick is to "fool" sendmail with
regard to your domainname; on the very FIRST line of (don't wait until
macro j is defined) define your domainname using the Dm notation. I.e. the very
first non-comment line in my is

then, since the macro w alread contains the address <machinename>, simply
set j to that value:


And that's all I had to do. I made no other changes below this on all of our machines
except one: needs to accept mail for



        <user> <== this was our non-DNS address

So, on washington only, I defined two local macros:

and then under rule S6, I added two conversion lines:

R$*<@$X> $1<@LOCAL> convert local domain
R$*<@$Y> $1<@LOCAL> convert local domain

And now (knock on silicon) everything works great! I can use all our mailers without having
to kludge up the return addresses.

Thanks to all those who responded.

Dave Hightower | opinion? I'm allowed to have an opinion?
Systems Manager | well, if I DID have one, it'd be mine, all mine!
Air Force Wargaming Center | "sans peur et sans reproche" |

My original message:

Ok, I finally received permission to set up DNS, and now our nameservers are
up and running.

We originally were a host on the entwork (, but since we
have several suns set up on our new network I decided to create our own
subdomain ( and then have hosts underneath that.

I set up the nameservers, established the subdomain with the
administrators, and everything on the DNS side of things works well.

Now my big problem is sendmail!

First off, we need to be able to receive mail for <user>
No problem, I told myself; I'd insert a line


into /etc/, and then a rewrite rule. This seems to work.

the problem is that our domainname is, yet according to the file,

# The first component of the NIS domain name is stripped off unless # it begins
with a dot or a plus sign.

which means that all outbound messages have either <user>@<machinename>
or <user>, depending on how I define my j macro. This just won't work!

I have been working on this for over a week now, doing rewrite rules, Dm lines,
etc...and I can't seem to get it to work. I think that I get it to work, and
test it using /usr/lib/; the return address is fine. But when I
test it using pine or mm, the results are erratic at best.

The question: I know there are quite a few sites out there that use Sun's
standard mailer stuff and DNS. How in the world, short of changing my
domainname again, do I keep it from stripping off the first component of the NIS
domainname? is there some secret to this? Or should I try one of the
"alternative" mailers?

Please reply to; I have NO idea what the return address of
this message will be, and I know that return address will get to me. the address is broken (temporarily).

Thanks in advance--

Dave Hightower

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:52 CDT