LinuxQuestions.org
Review your favorite Linux distribution.
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 03-20-2005, 01:24 PM   #1
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Rep: Reputation: 15
DNS & sending mail


Hello people.

I'm on the verge of shifting hosts for my domain. I'm going to be maintaining my own DNS and mailserver.

Anyway, I haven't made any changes at my domain registrar yet. Before I do, I need to make sure that the new MX record on the DNS I'm going to maintain works right. So this is what I did:

From a linux box running sendmail, made the only nameserver available in resolv.conf as the one I'm going to use for my domain. Then I used the command

mail -s testing postmaster@mydomain.com <test.file

well, the mail still goes to the old mailserver - any idea why? The nameserver I'm using in resolv.conf reports itself as the SOA for my domain, with the MX record pointing to the new mailserver I intend to use. Any ideas??

Thanks

Last edited by branden_burger; 03-20-2005 at 01:25 PM.
 
Old 03-20-2005, 01:30 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you run:
dig mydomain.com mx

Does it return the correct A record?

If you run a dig on that A record (as shown from the mx dig) - ie:
dig mail.mydomain.com A

Does it resolve to the correct IP?

Depending on the distro you are using nscd may also be in use - try stopping it and try again:
service nscd stop
 
Old 03-20-2005, 02:13 PM   #3
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
the ms dig returns the correct A and mx records for the Mail eXchanger.

and nscd isn't running on either the linux box at my lab or the DNS on trhe internet..

so why are the root servers being queried?? That's the only way that sendmail on my local box would be able to send mail to the old hosting provider..

if I goto dnsreport.com, it and test the domain to be shifted - well, I get the same things as my own digs there - the mx section for my domain turns out to be just fine!!

I can't understand it.
 
Old 03-20-2005, 02:16 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Do you have the A address listed in your hosts file?
 
Old 03-20-2005, 02:48 PM   #5
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
no it's not in /etc/hosts - but how does that matter??
 
Old 03-20-2005, 02:52 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Well, if you had a previous entry in /ec/hosts pointing to the real server it would use that before doing a dns lookup.

Do you have sendmail configured to use a relay for all mail?
 
Old 03-20-2005, 03:07 PM   #7
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
nope - no mail relaying - sendmail connects directly to the mail exchanger of the domain in question.... :X
 
Old 03-20-2005, 03:10 PM   #8
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Rep: Reputation: 30
is it possible that bind is running on your test host and the cache needs to be flushed?

tom
 
Old 03-20-2005, 03:10 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you look at the message headers of the message that ended up on the production box does it show the message being received by the new box? Maybe the new box just received it and relayed it to the production box.
 
Old 03-20-2005, 03:28 PM   #10
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
well, when I asked sendmail to do relaying through the mail exchanger I WANT mail to go to - mail went fine to the domain I want to test for!! But when I stop the relaying and say send mail directly in sendmail.mc, the trouble starts again..

And yes - I think that maybe the DNS cache on the nameservers I'm using need to be flushed - yes, I am using bind 9.

????
 
Old 03-22-2005, 12:07 PM   #11
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Well yeah, I don't know what happened - but the SAME setup which wasn't working is working now - I guess it was a matter of the BIND cache being updated after a while on the test host.

thanks people!!

Now mail is being delivered to the right mailserver using the DNS which is SOA for that domain.
 
  


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
Postfix mail transfer agent not sending mail locally or to other servers sketelsen Linux - Software 3 02-09-2006 11:16 AM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
DNS & mail server dawn_angel Linux - Networking 3 02-03-2005 08:31 PM
Sending an automatic mail using bash + mail Minuteman Linux - Software 4 08-21-2003 12:49 PM
dns&mail server kjsubbu Linux - Networking 4 05-26-2003 08:38 AM

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

All times are GMT -5. The time now is 07:36 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