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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 linux servers for 1 domain ?

Status
Not open for further replies.

cisco99999

IS-IT--Management
Nov 5, 2007
71
US
Hi everyone,


I current have 2 linux servers, and they are located in difference place. I'd like to set up a simple rsync between servers. Server 192.168.1.10 and server 192.168.1.11

I set round robin for DNS and email. The DNS is running fine ,but only email has problem. If someone send email to my server myaccount@mydomain.com then only one server receive it (either 192.168.1.10 or 192.168.1.11 but not both).

here is my algorithm for my mydomain.com.db in /var/named:
==========================
$TTL 3600
@ IN SOA ns1.mydomain.com. root.mydomain.com. (
2007121402
3600
3600
1209600
86400 )

mydomain.com. 3600 IN NS ns1.mydomain.com.
mydomain.com. 3600 IN NS ns2.mydomain.com.
mydomain.com. 3600 IN NS ns3.mydomain.com.
mydomain.com. 3600 IN NS ns4.mydomain.com.

ftp 3600 IN A 192.168.1.10
ftp 3600 IN A 192.168.1.11

localhost 3600 IN A 127.0.0.1
mail 3600 IN A 192.168.1.10
mail 3600 IN A 192.168.1.11

pop 3600 IN A 192.168.1.11
pop 3600 IN A 192.168.1.10
mydomain.com. 3600 IN A 192.168.1.10
mydomain.com. 3600 IN A 192.168.1.11
www 3600 IN A 192.168.1.10
www 3600 IN A 192.168.1.11

mydomain.com. 3600 IN MX 10 mail



mydomain.com. 3600 IN TXT "v=spf1 a mx ip4:192.168.1.10 ?all"
mydomain.com. 3600 IN TXT "v=spf1 a mx ip4:192.168.1.11 ?all"
=====================

I turned off server .10 then email will come to server .11 and vice versa. But when both servers on then only one of them (either server .11 or server .10 but not both) receives email.

For this problem, i'm thinking setup rsync for both servers and cron job run every minute. Have anyone setup this before ? I'm really need your advises . Thanks
 
Why don't you assign one to be your primary MTA and the other as failover. The way it's configured now you have dns round robin for mail which is utterly borked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top