LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-06-2005, 01:12 PM   #1
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Rep: Reputation: 15
2 MX records, mail diverted


Hello.

I've got two MX records for my domain, one with priority 20, the other with 30, like so if we dig:

mydomain.com. 84828 IN MX 20 s1.mydomain.com.
mydomain.com. 84828 IN MX 30 s2.mydomain.com.

now, what happens is that eventhough s1.mydomain.com hasn't gone down since we started testing, some few emails are going through to s2.mydomain.com.

Admittedly, only a fraction of emails are doing this, but some important emails are going through to s2.mydomain.com. It has a only catchall account since we plan to use it for emergencies only - people don't check mail on s2. Any ideas as to why this is happening - any suggestions? Do we have to check both mailservers for mail then?

thanks,
branden_burger
 
Old 12-07-2005, 01:41 PM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

when you set 2 MX records on your DNS config, both will be used.
The weightig is only here so that mailservers do some loadsharing between them.
If you want only backup, then the only real way to do it is to configure both mailservers as part of a cluster.
There are certainly some workaround, like using a script on the backup to monitor the main mailserver and take its place if its down, but i really think the cluster solution is the only long-term.
 
Old 12-07-2005, 01:50 PM   #3
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Quote:
Originally Posted by branden_burger
Hello.

I've got two MX records for my domain, one with priority 20, the other with 30, like so if we dig:

mydomain.com. 84828 IN MX 20 s1.mydomain.com.
mydomain.com. 84828 IN MX 30 s2.mydomain.com.

now, what happens is that eventhough s1.mydomain.com hasn't gone down since we started testing, some few emails are going through to s2.mydomain.com.

Admittedly, only a fraction of emails are doing this, but some important emails are going through to s2.mydomain.com. It has a only catchall account since we plan to use it for emergencies only - people don't check mail on s2. Any ideas as to why this is happening - any suggestions? Do we have to check both mailservers for mail then?
You have 2 machines trying to be the mail server. I only have experience with QMail (not sure what you're running), but you'd set up s2.mydomain.com to be a caching-only mail server. It would accept emails for mydomain.com, but would hold them until s1.mydomain.com is ready to accept them (in the event it's busy or offline). If you're looking for redundancy, you may look at a program called heartbeat (Sourceforge or Freshmeat, don't remember which) that would have s2 as a backup of s1 (replicating the files via rsync constantly), until s1 goes down. Then heartbeat would make s2 look like it's s1, assuming it's IP address and all. Get's a little more complicated if you're using MySQL for any storing of email or addresses.
 
Old 12-08-2005, 05:07 AM   #4
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
i see

hmm, i thought as much. clustering/load balancing is a solution...could experiment with rsync and heartbeat though.

Thanks!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Concept behind MX records wwnexc Linux - Networking 7 10-27-2005 09:28 PM
Old DNS records Matir Linux - Networking 2 02-11-2005 12:44 PM
nat records alaios Linux - Networking 2 06-09-2004 02:20 AM
mx records, postfix JM_Fraser Linux - Networking 19 12-06-2003 11:02 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 03:49 PM.

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