Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RH LAN Mail server dns problem?? 1

Status
Not open for further replies.

b4mule

Technical User
Aug 27, 2002
28
AU
hi,
I have been struggling with this for a while, I have a LAN (M$ win 2000 server based) with an internal win 2000 DNS server with domain name mycompany.loc (loc for local). This LAN is not connected to the internet an requires minimal connection if any.

The idea is to have e-mail only at the desktops connected to the LAN. This is ok we have a small separate network that is connected though a router to an internet cable.

So I wanted to use a RH box with sendmail and fetchmail to get the mail from our ISP and hold for users to grab via pop3 (most use outlook express on M$).

I started up with 2 network cards and configured the first to see the internal domain, (mx record on the 2000 machine points to the linux box) and setup sendmail and fetchmail and all the accounts to e-mail internally, this all works fine.

As soon as i tried to connect to the internet, i have to set up the dns config of the linux box to point to the router to resolve external names, which also works but this kills my ability to connect to the linux box from the M$ internal network.

Is this possible to do, or do I have to do something like setup a DNS serevr on the linux box?

Thanks for any help.
 
This is a resolver problem.

In /etc/resolv.conf(or the RH equiv),list
your nameservers in the order of resolution.
local
external
backup external

An example:
nameserver 192.168.1.25 (ms internal dns)
nameserver 212.34.5.67 (external dns)
nameserver 212.34.5.68 (secondary external dns)
 
thanks marsd,

I did what you suggested, the internal stuff worked fine still no external names resolving, is this because we have the M$ DNS setup incorrectly? if I put the external befor the internal in the list everything seems to work but very slowly on the internal side as expected (i also am having trouble sending e-mails to external addresses but i assume that it is an unrelated problem, something in sendmail?).

I will look at our M$ dns servers today but any suggestions would be a great help, as Im still stumbling about with the lights off.
 
Ok DNS problem almost gone,

I can get inside and outside DNS from the linux box now, but sendmail cannot send to any addresses outside my LAN ? Sendmail will put the message in the q, but if i use

/usr/lib/sendmail -v -q

I get

Running /var/spool/mqueue/g857Llg01831 (sequence 1 of 1)
Name server timeout
address@ transient parse error -- message queued for future delivery

is this still a DNS thing or is it just a sendmail setup thing?

Im so confused?!?!?
 
Yes, sendmail is finicky (some would say mostly broken ;)), and for good reason.

Couple of options here:

1) Find these lines in sendmail.cf
# my official domain name
# ... define this only if sendmail cannot automatically
#determine your domain
#Dj$w.Foo.COM

Replace the last portion with your domain name.
This may not work as anticipated since your
config is unknown to me.

2) Use linuxcfg(or whatever admin tool RH uses) to
reconfigure your mail settings. This will regen an new
sendmail.cf. You may still have problems.

3) Manually write the sendmail config and compile it with
the m4 macro compiler.

This is more simple than you would think.
##############sample
divert(-1)
divert(0)
#this path will vary: on suse it is here.On RH, I don't know.
include(`/usr/share/sendmail/m4/cf.m4')
OSTYPE(`linux')
FEATURE(`allmasquerade')
FEATURE(`masquerade_envelope')
FEATURE(`always_add_domain')
FEATURE(`virtusertable')
#this depends on your mail config, most use procmail.
FEATURE(`local_procmail')
FEATURE(`access_db')
FEATURE(`blacklist_recipients')

MASQUERADE_AS(`yourdomainname')

MAILER(`smtp')
MAILER(`procmail')

###end sample
Then save and compile this file with:
m4 macrofile > test.cf

Run tests against the config
sendmail -bt -c test.cf
Then save your old and copy this one in as sendmail.cf.

Breakage often occurs after this because system paths vary
from distro to distro. Sendmail won't find procmail, etc..
Keep an eye on /var/log/mail for error messages:
tail -f /var/log/mail


Good Luck
 
Well Im still having DNS probs i think.

If i give a host command 'host mail.external.net' it resolves fine, but if i ping 'ping mail.external.net' it takes ages to resolve and then drops about 95% of the packets?!?!? (I can ping the ip addr of mail.external.net and that works fine). So what is going on??? Im using a hardware DSL router but that has not hindered me in the past!

Any ideas of what would cause this sort of behaviour (i have tried and tetsed all the hardware, cables etc...)?
 
Sorry, that sounds like a routing or possibly physical
problem with some of your gear there.
You might want to take a look at your routing table
with ip route or route -n, and see if there are any
obvious problems(multiple default gw's, etc..).
Then run netstat -s and ifconfig -a looking for
errors.

Good Luck
 
Thanks, problem solved, all routing, sending and recieving fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top