RH6.2 and sendmail wierdness.

Friend of mine is trying to get a RH6.2 up and running as a mailserver. owever, when trying to config senmail, it only shows

[ ] Accept email for (null)

Instead of showing the domain the system is in, so what might be up here?
LVL 12
Who is Participating?
jlevieConnect With a Mentor Commented:
Okay, so it's not going to be that simple, I should have known given who posed the question...

One problem that's not necessarily connected is that your nameserver isn't yet registered in the root servers. I see:

levie> nslookup -query=ns harrydaslap.se.
Server:  merlin.dynetics.com

Non-authoritative answer:
harrydaslap.se  nameserver = web1.millenicumweb.com
harrydaslap.se  nameserver = web2.millenicumweb.com

Authoritative answers can be found from:
web1.millenicumweb.com  internet address =
web2.millenicumweb.com  internet address =

The DNS seems to be working correctly if I explictly point to your server I get vaild responses for both forward & reverse lookups.

Also, sendmail has correctly figured out what the FQDN of the system is as evidenced by:

levie> telnet 25
Connected to
Escape character is '^]'.
220 gatekeeper.harrydaslap.se ESMTP Sendmail 8.9.3/8.9.3; Sat, 29 Apr 2000 20:40:48 +0200

Unfortunately I can't send an email to the system to see what would happen because of the nameserver registration issue.

What does either the Cw line in sendmail.cf or the sendmail.cw have in it?
It sound like the classic RH wierdness when the network gets configured at install time. I suspect that the hosts file might look something like:  some-node.some-dom.dom some-node localhost.localdomain localhost

when it should be:    localhost.localdomain localhost    some-name.some-dom.dom some-node

Also I'd should check to see that resolv.conf looks like:

domain some-dom.dom

RH likes to not put the "domain" keyword in and use "search" instead, which isn't exactly the same thing.
j2Author Commented:
[root@gatekeeper /root]# cat /etc/hosts       localhost.localdomain   localhost   gatekeeper.harrydaslap.se        gatekeeper   gw0.harrydaslap.se      gw0   gw1.harrydaslap.se      gw1   gw2.harrydaslap.se      gw2
[root@gatekeeper /root]#

[root@gatekeeper /root]# cat /etc/resolv.conf
search harrydaslap.se
[root@gatekeeper /root]#

[root@gatekeeper /root]# cat /var/named/harrydaslap.se
@               IN      SOA     gatekeeper.harrydaslap.se.      hostmaster.gatekeeper.harrydaslap.se. (
                        2000042801 ; serial
                        3600 ; refresh
                        900 ; retry
                        1209600 ; expire
                        43200 ; default_ttl
mail            IN      CNAME   gatekeeper.harrydaslap.se.
@               IN      MX      5       gatekeeper.harrydaslap.se.
@               IN      NS      gatekeeper.harrydaslap.se.
gatekeeper              IN      A
gw0             IN      A
gw1             IN      A
gw2             IN      A
www             IN      CNAME   gatekeeper.harrydaslap.se.
[root@gatekeeper /root]#

Anything else, feel free to ask. :)

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

j2Author Commented:
[root@gatekeeper /root]# grep Cw /etc/sendmail.*
[root@gatekeeper /root]#

But you know, something is wrong with the DNS pointers, never thought to check that. I will have to do that ASAP, i just assumed it was "set up right" and that, as we all know, is plain dumb.
j2Author Commented:
Here is something

[root@gatekeeper /root]# nslookup
Server:  gatekeeper.harrydaslap.se

*** gatekeeper.harrydaslap.se can't find Non-existent host/domain
[root@gatekeeper /root]# ls /var/named/
192.168.0  192.168.2   harrydaslap.se      named.ca     vmtrailer.se
192.168.1  212.181.63  junekarosserier.se  named.local
[root@gatekeeper /root]#

The reverse doesnt seem to work locally. Why might that be? It works on "my" system, which seems to be the same (but with other zonefiles of cource)
j2Author Commented:
GAH! because i queried the net-number and not the IP. stupid me :) Sorry
I think you want Cw to read:


so that sendmail knows that it's the MTA for the domain.
j2Author Commented:
I really hate you cannot edit a comment. But, even if the systems arent known to the root DNS correctly (yet) shoudltn still a reverse work "externally"?

warwick:/var/named> nslookup
Server:  darkface.pp.se

*** darkface.pp.se can't find Non-existent host/domain

Or does that require proper DNS registration?
j2Author Commented:
Yes, I know it should read that, But linuxconf will not regenerate the cf with the error still there. And i really would like to find the reason for the error before putting the system in production.

Ill just put this on the "backburner" until the DNS issue is resolved, "it just might be...." so to speak.

Have a nice weekend!
j2Author Commented:
Aha, the DNS mystery resolved. Here is what happened.

Customer and I agreed i should register the domains (they have 4) for them, and park them until their server was up.

The person i talked to forgot to bring that up at a IT/IS meeting.

Their admin registered the domains, since he wanted to make sure "they had them" when their 512kbit line was installed.

I was told this and checked and the domains werent "active" yet. So i sent a change request to the "parking house" :)

The domains went active on the change request before the original request was processed. The another tech and the parking house got the original request, and sicne the domains were "up" treated it as a "change request". So thats why the DNS is "misspointed" now. And monday is a holliday over here, so ill have to straighten it out tuesday.

Okay, so now we know why the DNS root is wrong. As to the reverse not working... it won't until there's a server to supply it and there isn't one at present. Well, except to the server you set up but nobody knows to use it unless specifically told to do so.

I guess I'm a bit confused about what you meant by "But linuxconf will not regenerate the cf with the error still there". Do you mean that linuxconf is only putting localhost into Cw, regardless of what you do?

On that system it should be able to figure out what the domain is from the hostname as that's an FQDN. Note that since there isn't a "domain harrydaslap.se" line in resolv.conf, the resolver must must figure it out from the hostname.
j2Author Commented:
""But linuxconf will not regenerate the cf with the error still there". " 

As long as linuxconf displays "null" in that "accept mail for" box, it will write localhost as Cw.

Ahwell, ill try it on tuesday
Okay, that sounds like linuxconf can't figure out what domain the system is in. I believe that it's trying to do a gethostbyaddr() and failing. I just tried connecting directly to your nameserver ( and I find that it can't do forward or reverse lookups of it's own data. That sounds to me like there might a problem with the DNS setup on the box. It seems to me that the system ought to know that it is authoritative for the domain (after all it is configured to be the primary) and shouldn't therefore need to contact the root servers.

Okay, I believe that I've just proved that a properly configured primary will resolve locally, even if the root servers point to a different pri/sec nameserver. I set up one of my "play" boxes with a valid domain name that's currently parked at the registrar. It had no problems recognizing that it was authoritative for the zone and tcpdump showed that it never made an attempt to contact anybody else.

Therefore, I believe that you have a local problem on that system that needs to be found and fixed, even before the registrar data is corrected.

If you don't already know about it, there's an excellent lint checker for DNS data at ftp://ftp.ee.lbl.gov/nslint.tar.Z. It's easy to install and pretty through in its examination.
j2Author Commented:
The problem WAS indeed that the DNS had got screwed up.
j2Author Commented:
Guess it goes to show the old "TRIPPLE check _everything_ , then check it again" ;)
Yep, and it sometimes helps to check things from some outside system. They can sometimes reveal a problem that can't be seen by boxes on the local network... (you can probably figure out how I know that).
j2Author Commented:
Hear hear ;)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.