LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2003, 07:58 PM   #1
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Rep: Reputation: 30
Sendmail problem w/ MX records, I think!! VERY important, please help!


Hi all,

I actually think this problem may end up being similar to the thread started by debaire, so I apologize now if this becomes a double post about the same issue. I have been working on sendmail problems for several days now, and have mainly been working with David_Ross in THIS THREAD . If you will go there, you will notice that as much help as David is, unfortunately, he admits to not knowing DNS very well. Neither do I, so I will certainly not hold it against him! In fact, David has helped me immensly in the past, and I thank him. Anyway, if you read that other thread, you will notice that he believes my problem has to do with MX records. You can read the other thread if you like, but here's the problem:

I have a network where a RH 8 box is my sendmail, samba, DNS (I thought), DHCP, etc server. All the other machines are Wonblows 2000 or XP Pro. All the Windows machines run Outlook or Outlook Express as mail clients. As you could see from the other thread, I can send e-mail now, but CANNOT recieve it. Basically, the company I registered my domain with (Network Solutions) is pointing to me for name resolution. That's fine, that's how I want it. Here's what happened. They have always pointed to me, but 2 weeks ago, I formatted and reinstalled my server (we won't get into why). Before I did that, I saved my /etc/named.conf file to floppy. After I reinstalled, I copied that file back over to the /etc directory. Be advised that the named.conf file was the ONLY file regarding DNS that I copied over. I have been reading DNS books, and it seems that there are many more files of equal importance, and I think my problem lies somewhere in all that!! Named ran fine, and I thought all was well (like I said, I know very little about DNS)! Anyway, it would seem that before I wiped and reinstalled this machine, I had MX records of some sort because I had working e-mail. Now, I don't! Do you think this is, indeed the problem? How do I fix this. I will provide any information I can, but it is EXTREMELY important to me to get my e-mail working fully again, as I start online classes on May 19th. Without e-mail, I am dead. Please feel free to treat me like a complete Lamen, using small words and making thumb-sucking noises, lol. I'd appreciate it greatly, thank you!!!!!

Chris
 
Old 05-15-2003, 09:57 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you must recreate the files refered to in named.conf in your /var/named folder

like this


Code:
zone "mydomain.com" IN {
        type master;
        file "named.forward";
        allow-update { none; };
};
file "named.forward" refers to /var/named/named.forward

# cat /var/named/named.forward

Code:
$TTL 3600
@       IN         SOA     ns0.mydomain.com. hostmaster.mydomain.com. (
                           2003032113      ; serial
                           1H              ; refresh
                           2H              ; retry
                           4W              ; expire
                           1D )            ; minimum
;
                   NS      ns0.mydomain.com.
                   MX      10  mail.mydomain.com.
;
localhost          A       127.0.0.1
ns0                A       68.111.111.111
mail               A       68.111.111.111
@                  A       68.111.111.111
www                CNAME   ns0.mydomain.com.
ftp                CNAME   ns0.mydomain.com.
upload             CNAME   ns0.mydomain.com.
fax                CNAME   ns0.mydomain.com.

firedragon         A       192.168.0.2
firedragon         A       192.168.1.2
firedragon         A       192.168.0.7
firedragon         A       192.168.1.7
slacker            A       192.168.0.3
slacker            A       192.168.1.3
winxp              A       192.168.0.4
winxp              A       192.168.1.4
zeus               A       192.168.0.5
zeus               A       192.168.1.5
that's not all

you need this

/etc/named.conf
Code:
zone "111.111.68.in-addr.arpa" IN {
        type master;
        file "named.comcast";
        allow-update { none; };
};

file named.comcast in /var/named/
Code:
$TTL    3600
@       IN      SOA     mydomain.com. hostmaster.mydomain.com.  (
                                      2003031603 ; Serial
                                      1H         ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
                NS      ns0.mydomain.com.
111               PTR     ns0.mydomain.com.
111               PTR     www.mydomain.com.
111               PTR     mail.mydomain.com.
111               PTR     ftp.mydomain.com.
111               PTR     upload.mydomain.com.

note that the 111 represents the last octet in your ip address
this is just an example.

Each CNAME or A record for the network must be in this file for reversed lookups



any time you change the files change the serial number. They must be unique

Last edited by DavidPhillips; 05-15-2003 at 10:19 PM.
 
Old 05-15-2003, 10:01 PM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you would also add a file for your other networks like your local lan.

you should have them refered to in named.conf if you had that already working.

I use dhcp to set the matching ip addresses on the clients by mac address.
 
Old 05-15-2003, 10:10 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
here is an example of the local file

cat named.0.168.192
Code:
$TTL    3600
@       IN      SOA     ns0.mydomain.com. hostmaster.mydomain.com.  (
                                      20030321  ; Serial
                                      1H         ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
                  NS      ns0.mydomain.com.
1                 PTR     ns0.mydomain.com.
1                 PTR     www.mydomain.com.
1                 PTR     mail.mydomain.com.
1                 PTR     ftp.mydomain.com.
1                 PTR     upload.mydomain.com.
2                 PTR     firedragon.mydomain.com.
3                 PTR     slacker.mydomain.com.
4                 PTR     winxp.mydomain.com.
5                 PTR     zeus.mydomain.com.
7                 PTR     firedragon.mydomain.com.

there is also a similiar file for my 192.168.1.0 network

Last edited by DavidPhillips; 05-15-2003 at 10:14 PM.
 
Old 05-15-2003, 10:13 PM   #5
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Thank you very much, David. I willl try these things first thing tomorrow morning, but for right now, I have to go to bed. Been a long day. Please check back tomorrow. I will let you know what I find out. Thank you!!!!!

Chris
 
Old 05-16-2003, 09:22 AM   #6
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Ok, I'm awake and ready to go again. I have done some of the things you suggested, David. It is helping immensly, but there are still some things I am confused about. What I'm going to do (even though I know it's a security risk) is post my files here for you to look at. Can you tell me what's wrong? Thank you!!!

My /etc/named/conf file is as follows:

// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
// controls {
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
// };
zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "bartlett-family.net"{
type master;
file "db.bartlett-family";
allow-transfer { 24.61.241.82; 66.31.104.121; };
};

zone "home.bartlett-family.net"{
type master;
file "db.home.bartlett-family";
allow-query{
192.168.5/24;
};
};

zone "5.168.192.in-addr.arpa"{
type master;
file "db.192.168.5";
allow-query{
192.168.5/24;
};
};

include "/etc/rndc.key";


In /var/named, I have the following files:
db.bartlett-family.net
db.home.bartlett-family.net
localhost.zone
named.ca
named.local

db.bartlett-family.net looks like this:

$TTL 3600
@ IN SOA ns1.bartlett-family.net. goliath.bartlett-family.net. (
2003051601 ; serial
1H ; refresh
2H ; retry
4W ; expire
1D ) ; minimum
;
NS ns1.bartlett-family.net.
MX 50 goliath.bartlett-family.net.
;
localhost A 127.0.0.1
ns1 A 24.61.77.188
mail A 24.61.77.188
@ A 24.61.77.188
www CNAME ns1.bartlett-family.net.
ftp CNAME ns1.bartlett-family.net.


db.home.bartlett-family.net looks like this:

goliath.home.bartlett-family.net. IN MX 60 goliath.bartlett-family.net

localhost.zone looks like this:

$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

1D IN NS @
1D IN A 127.0.0.1

named.local looks like this:

$TTL 86400
@ IN SOA bartlett-family.net. goliath.bartlett-family.net (
2003051601 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns1.bartlett-family.net

1 IN PTR ns1.bartlett-family.net.
1 IN PTR www.bartlett-family.net.
1 IN PTR mail.bartlett-family.net.

And, finally, named.ca looks like this:

; This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
; (e.g. reference this file in the "cache . <file>"
; configuration file of BIND domain name servers).
;
; This file is made available by InterNIC registration services
; under anonymous FTP as
; file /domain/named.root
; on server FTP.RS.INTERNIC.NET
; -OR- under Gopher at RS.INTERNIC.NET
; under menu InterNIC Registration Services (NSI)
; submenu InterNIC Registration Archives
; file named.root
;
; last update: Aug 22, 1997
; related version of root zone: 1997082200
;
;
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
;
; formerly C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
;
; formerly TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
;
; formerly NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
;
; formerly NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
;
; formerly NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
;
; temporarily housed at NSI (InterNIC)
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 198.41.0.10
;
; housed in LINX, operated by RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
;
; temporarily housed at ISI (IANA)
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
;
; housed in Japan, operated by WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File


I think it is important for you to know that my domain is bartlett-family.net. My internal IP addressing scheme is 192.168.5.x. My external IP address from Comcast is 24.61.77.188. What is wrong here? I will keep playing with this, but I am quite confused and really need to get this running. Thank you!!!!!

Chris

PS. Why does the code I am typing look so terrible in the thread? I am copying and pasting the contents of these files into this post. Is there a better way to do it?

Last edited by WorldBuilder; 05-16-2003 at 09:24 AM.
 
Old 05-16-2003, 09:46 AM   #7
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Ok, this is weird. I just RECIEVED 2 e-mail messages!!! That's good! However, when I send test messages from my Yahoo! address, they are not getting through. This is the message I am getting from Yahoo:

Message from yahoo.com.
Unable to deliver message to the following address(es).

<chris@bartlett-family.net>:
Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)

<sokhan@bartlett-family.net>:
Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)

<john@bartlett-family.net>:
Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)

--- Original message follows.

Return-Path: <cjwsb@yahoo.com>
Message-ID: <20030516144012.67898.qmail@web11803.mail.yahoo.com>
Received: from [24.61.77.188] by web11803.mail.yahoo.com via HTTP; Fri,
16 May 2003 07:40:12 PDT
Date: Fri, 16 May 2003 07:40:12 -0700 (PDT)
From: Christopher Bartlett <cjwsb@yahoo.com>
Subject: Is this working?
To: chris@bartlett-family.net
Cc: sokhan@bartlett-family.net
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Is this working?

__________________________________


Any thoughts? Could anyone reading this thread attempt to e-mail me at chris@bartlett-family.net just for testing purposes? Thanks!

Chris

Last edited by WorldBuilder; 05-16-2003 at 10:05 AM.
 
Old 05-16-2003, 12:14 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
it seems to be working

sending mail is something you must test on your end

make sure your sending to a valid address, check the log file /var/log/maillog
 
Old 05-16-2003, 12:22 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
dig MX bartlett-family.net

; <<>> DiG 9.2.1 <<>> MX bartlett-family.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45686
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;bartlett-family.net. IN MX

;; ANSWER SECTION:
bartlett-family.net. 3600 IN MX 50 goliath.bartlett-family.net.

;; AUTHORITY SECTION:
bartlett-family.net. 3600 IN NS ns1.bartlett-family.net.

;; Query time: 1462 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri May 16 12:22:20 2003
;; MSG SIZE rcvd: 79
 
Old 05-16-2003, 12:54 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Mail sent to ns1.bartlett-family.net comes back with a 553/554 "mail loops back to me": the MTA on ns1/goliath thinks it's goliath.home.bartlett-family.net. I'm definately not one of them DNS heroes, but since goliath and ns1 are one and the same, and since goliath can't be reached as MX (unresolvable addr), couldn't you fix that with a "goliath.bartlett-family.net. IN CNAME ns1.bartlett-family.net." alias?
 
Old 05-16-2003, 01:00 PM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I sent mail to bartlett-family.net

the server responds with

220 goliath.home.bartlett-family.net ESMTP Sendmail 8.12.9/8.12.5; Fri, 16 May 2003 14:01:21 -0400



I can see that some clients will have a problem.

another way to fix it would be to use goliath.home.bartlett-family.net

or change the hostname


basically you need an A record for your mail server on bartlett-family.net

setting the MX record to mail.bartlett-family.net would also work because it already has an A record

Last edited by DavidPhillips; 05-16-2003 at 01:11 PM.
 
Old 05-16-2003, 03:12 PM   #12
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Thanks fellas. Let me look into all of this, and I will let you know. Please continue to check back! Thank you!!!!!

Chris
 
Old 05-16-2003, 05:02 PM   #13
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
OK,

In /var/named/db.bartlett-family.net, I changed:

MX 50 goliath.bartlett-family.net.

To:

MX 50 mail.bartlett-family.net.

Everything SEEMS to be working fine now. I sent out a bynch of test e-mails to friends and am waiting on replies. I finally e-mailed myself successfully from my Yahoo! address, so I think everything might be ok. Please send me some more test e-mails at chris@bartlett-family.net to see if this is working. I hope this is not a premature THANK YOU!!! You guys are Gods among men, as far as I'm concerned...

Chris
 
Old 05-16-2003, 05:08 PM   #14
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
that should do it.

I am sending a test mail
 
Old 05-16-2003, 05:26 PM   #15
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Your greeting says

220 goliath.home.bartlett-family.net ESMTP Sendmail 8.12.9/8.12.5; Fri, 16 May 2003 18:21:50 -0400


If you want to change this without too much trouble you can do it by editing /etc/mail/sendmail.cf

this should probably be done with vi or pico

you would change this

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b


to this

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=mail.bartlett-family.net Sendmail $v/$Z; $b

or if you don't want to give out a lot of info, this

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=mail.bartlett-family.net

Always make a backup of sendmail.cf before editing it this way.

If you have the file you built sendmail.cf from you could put mail.bartlett-family.net in the place of $HOSTNAME and rebuild

Last edited by DavidPhillips; 05-16-2003 at 05:28 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very important libSSL symbol problem (kerberos) nyk Linux - Software 1 10-08-2004 08:25 AM
OOo / MySQL adding records problem pete_bogg Linux - Software 1 04-13-2004 03:31 AM
Important IPTables problem/fix Robert0380 Linux - Security 0 10-08-2003 02:15 PM
problem processing sendmail.mc to sendmail.cf ...help... lucastic Linux - Networking 1 09-21-2003 10:08 AM
MX Records Terri Linux - Networking 2 01-21-2002 07:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration