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 sendmail.cf was getting the entire
system name (utah.afwc.af.mil) 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, firstname.lastname@example.org, email@example.com,
firstname.lastname@example.org, or email@example.com 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 firstname.lastname@example.org.
Another person ,email@example.com, reminded me of the plus-or-dot rule; I don't
want to change the domain name just for sendmail.cf's quirks.
Three replies, from firstname.lastname@example.org, email@example.com, and firstname.lastname@example.org,
pointed me in the right direction. The trick is to "fool" sendmail with
regard to your domainname; on the very FIRST line of sendmail.cf (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 sendmail.cf is
then, since the macro w alread contains the address <machinename>@afwc.af.mil, 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: washington.afwc.af.mil needs to accept mail for
<user>@cadre.af.mil <== 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 af.mil entwork (cadre.af.mil), but since we
have several suns set up on our new network I decided to create our own
subdomain (afwc.af.mil) and then have hosts underneath that.
I set up the nameservers, established the subdomain with the af.mil
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>@cadre.af.mil.
No problem, I told myself; I'd insert a line
Cm cadre.af.mil afwc.af.mil
into /etc/sendmail.cf, and then a rewrite rule. This seems to work.
the problem is that our domainname is afwc.af.mil, yet according to the
# 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>@af.mil
or <user>@af.mil, 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/sendmail.mx; 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
Please reply to email@example.com; I have NO idea what the return address of
this message will be, and I know that return address will get to me. the
cadre.af.mil address is broken (temporarily).
Thanks in advance--
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:52 CDT