Networking Forums

Networking Forums > Computer Networking > Linux Networking > Juggling with MX records

Reply
Thread Tools Display Modes

Juggling with MX records

 
 
Dave
Guest
Posts: n/a

 
      02-22-2005, 02:35 PM
Hello guys and gals,

I wonder if anyone can help me figure this out. I'm trying to plan email
routes for a domain which is registered with Network Solutions.

DNS is managed at NetSol, website is hosted at a VPS, with Linux and qmail
for mail, with another hosting company. We will have a Unix server in-house
with two static IPs through two ISPs, which the Unix box will use to connect
to WAN. At NetSol, I want to set up MX records pointing to three IPs:
mail1.domain.com (10) first IP of Unix box
mail2.domain.com (20) second IP of Unix Box
mail3.domain.com (30) IP of Linux VPS

When the mail arrives I want for it to try the mail1 and mail2 servers
first. If they are down, I want the mail to go to mail3 server.
What I want to achieve is, at the Linux VPS, I want to set up local DNS, or
set-up qmail so that when the mail3 server accepts mail, it will keep trying
mail1 and mail2 servers. I spoke to the hosting company and they told me
that since the DNS is managed by NetSol, this can not be done, but I'm not
fully convinced since we have full contol with root access to the VPS.

Any suggestions as to how this can be done?

Many thanks,

Dave


 
Reply With Quote
 
 
 
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      02-22-2005, 04:24 PM
Dave <(E-Mail Removed)> wrote:
> DNS is managed at NetSol, website is hosted at a VPS, with Linux and qmail
> for mail, with another hosting company. We will have a Unix server in-house
> with two static IPs through two ISPs, which the Unix box will use to connect
> to WAN. At NetSol, I want to set up MX records pointing to three IPs:
> mail1.domain.com (10) first IP of Unix box
> mail2.domain.com (20) second IP of Unix Box
> mail3.domain.com (30) IP of Linux VPS


Seems plausible so far.


> When the mail arrives I want for it to try the mail1 and mail2 servers
> first. If they are down, I want the mail to go to mail3 server.


Decreasing MX values, like you've shown above, will do this.


> What I want to achieve is, at the Linux VPS, I want to set up local DNS, or
> set-up qmail so that when the mail3 server accepts mail, it will keep trying
> mail1 and mail2 servers.


You shouldn't need to worry about that within DNS - it's a mailer
configuration issue. For example, in sendmail, you can tell it to retry
lower valued MX records automatically. I would hope there are similar
things in other MTAs.

However, since you're talking about using qmail, take a look at
http://www-dt.e-technik.uni-dortmund...mail-bugs.html, with
particular reference to section 3.2. I have no idea whether qmail-1.03
is the most uptodate as I prefer exim and sendmail.

If you really need to resolve this via DNS, take a look at the "views"
keyword in the bind documentation. It allows you to provide different
zone files for different sets of IP addresses. (In your case you could
provide a subset of your primary DNS for your mail host, which omits
the MX details for mail3. Ugly but fairly effective.)

Chris
 
Reply With Quote
 
Davide Bianchi
Guest
Posts: n/a

 
      02-22-2005, 05:57 PM
On 2005-02-22, Dave <(E-Mail Removed)> wrote:
> mail1 and mail2 servers. I spoke to the hosting company and they told me
> that since the DNS is managed by NetSol, this can not be done


You have to do that in the DNS configuration at NetSol.
Davide

--
the best answer when anybody asks you if you're any good with explosives is
to hold up two open hands and simply say "Ten". --Anthony DeBoer
 
Reply With Quote
 
Dave
Guest
Posts: n/a

 
      02-23-2005, 03:26 PM
Chris,

Thank you for a valuable feedback. Can you elaborate a little more on DNS
solution?:

> (In your case you could provide a subset of your primary DNS for your mail
> host, which omits
> the MX details for mail3.)

Do you mean I should create something like: backupmail.domain.com zone? How?
I looked at /etc/named.conf. Should I add the following?:
zone "backupmail.domain.com" {
type slave;
file "domain.com"; // where should this file be located?
allow-transfer {
0.0.0.0; //which IPs go here?
common-allow-transfer;
};

Where do I create the subset, is the part I'm not sure about.

Thank you,

Dave




<chris-(E-Mail Removed)> wrote in message
news:5g6se2-(E-Mail Removed)...
> Dave <(E-Mail Removed)> wrote:
>> DNS is managed at NetSol, website is hosted at a VPS, with Linux and
>> qmail
>> for mail, with another hosting company. We will have a Unix server
>> in-house
>> with two static IPs through two ISPs, which the Unix box will use to
>> connect
>> to WAN. At NetSol, I want to set up MX records pointing to three IPs:
>> mail1.domain.com (10) first IP of Unix box
>> mail2.domain.com (20) second IP of Unix Box
>> mail3.domain.com (30) IP of Linux VPS

>
> Seems plausible so far.
>
>
>> When the mail arrives I want for it to try the mail1 and mail2 servers
>> first. If they are down, I want the mail to go to mail3 server.

>
> Decreasing MX values, like you've shown above, will do this.
>
>
>> What I want to achieve is, at the Linux VPS, I want to set up local DNS,
>> or
>> set-up qmail so that when the mail3 server accepts mail, it will keep
>> trying
>> mail1 and mail2 servers.

>
> You shouldn't need to worry about that within DNS - it's a mailer
> configuration issue. For example, in sendmail, you can tell it to retry
> lower valued MX records automatically. I would hope there are similar
> things in other MTAs.
>
> However, since you're talking about using qmail, take a look at
> http://www-dt.e-technik.uni-dortmund...mail-bugs.html, with
> particular reference to section 3.2. I have no idea whether qmail-1.03
> is the most uptodate as I prefer exim and sendmail.
>
> If you really need to resolve this via DNS, take a look at the "views"
> keyword in the bind documentation. It allows you to provide different
> zone files for different sets of IP addresses. (In your case you could
> provide a subset of your primary DNS for your mail host, which omits
> the MX details for mail3. Ugly but fairly effective.)
>
> Chris



 
Reply With Quote
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      02-24-2005, 11:49 AM

Dave <(E-Mail Removed)> wrote:
D> Thank you for a valuable feedback. Can you elaborate a little more on DNS
D> solution?:

c> (In your case you could provide a subset of your primary DNS for your mail
c> host, which omits
c> the MX details for mail3.)

D> Do you mean I should create something like: backupmail.domain.com zone? How?

Not quite. Your "public" domain example is domain.com, and you have three
MX records in it for mail1.domain.com, mail2, and mail3. It's this same
domain for which you will want to create alternative views.

Create a bind "view" on your DNS controller(s) that tells your mail3 host
different information to that which is given to everyone else. The view
is for the same domain (domain.com) but it contains a different zone file.

Example named.conf showing two views for the same "domain.com" domain.
If the requestor's IP address matches the MAIL3 match-clients criteria
it will use that set of zone files. Otherwise it will check the EXTERNAL
match-clients criterion and find it can use that.

view "MAIL3" {
match-clients {
127.0.0.1/8; // Only if DNS host is mail3
192.168.130.1/32; // IP address of mail3
};

zone "." { ... }; // As usual

zone "localhost" { ... } // As usual
zone "127.in-addr.arpa" { ... } // " "
// Etc.

zone "domain.com" {
type master;
file "/etc/bind/mail3/domain.com";
}
}

view "EXTERNAL" {
match-clients {
"any"; // Everyone else
};

zone "." { ... }; // As usual

zone "localhost" { ... } // As usual
zone "127.in-addr.arpa" { ... } // " "
// Etc.

zone "domain.com" {
type master;
file "/etc/bind/public/domain.com";
}
}


Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Not clearing up records -=M@rk=- Windows Networking 2 02-06-2007 10:29 PM
DNS duplicate records Cadstillo Windows Networking 2 12-10-2005 06:35 PM
SRV records Blake Windows Networking 10 07-27-2005 06:26 PM
PTR records =?Utf-8?B?UmljYXJkbw==?= Windows Networking 1 04-22-2004 08:00 PM
Cached DNS records Daniel Tan Windows Networking 0 08-08-2003 05:06 PM



1 2 3 4 5 6 7 8 9 10 11