LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 09-11-2008, 07:14 AM   #1
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Rep: Reputation: 38
Forcing to use a particular MX


Suppose example.com has 2 MX records of identical priority:

MX 10 mx0.example.com.
MX 10 mx1.example.com.

I want to make sure my email server always connects to mx0.example.com to send emails to example.com. What are the ways I could accomplish this using sendmail?

Thanks.
 
Old 09-11-2008, 09:25 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
I don't understand what you're trying to do here.

If you always want it to use one mail server simply delete the other one from DNS.

You could make the other mail server relay all its traffic through the first one but if you're sure the first one is always going to be up it seems a little silly to do this. The only benefit I could see is the second mail server would queue up mail while the first one is down.

However, for that scenario you shouldn't give both mail servers the same priority in the first place. Set the first one to "10" and the second one to a higher number like "20". That means all traffic would go the first mail server so long as it was reachable and would only go to the second one when the first one wasn't. That is the whole point in giving them priorities in the first place.
 
Old 09-14-2008, 07:44 AM   #3
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Original Poster
Rep: Reputation: 38
@jlightner

For this fictitious scenario, example.com is another domain. My domain is mydomain.com. I am trying to send emails from my domain to example.com, making sure emails are always delivered to mx0.example.com
 
Old 09-14-2008, 09:00 AM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Quote:
Originally Posted by the_gripmaster View Post
For this fictitious scenario, example.com is another domain. My domain is mydomain.com. I am trying to send emails from my domain to example.com, making sure emails are always delivered to mx0.example.com
You can have separate MX record setup in the two different DNS zone files - one for example.com and one for mydomain.com.

That is to say you can create example.com zone file that has ONLY the MX record for mx0.example.com.
If you then want to allow either mail server to be able to receive for mydomain.com just add both MX record to the mydomain.com zone file.
Both zone files can (and usually would) exist on the same DNS server(s). I
 
Old 09-14-2008, 04:35 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
I recall you asking this question previously. And a search reveals this is your third thread asking essentially the same question. The other two are:

http://www.linuxquestions.org/questi...ity-mx-668284/
http://www.linuxquestions.org/questi...lar-mx-665679/

Are you not happy with the answers in those threads, so decide to open a new one? I responded to one, where you claimed your Sendmail would always use the lower priority MX, but we discovered your DNS was not working correctly, and you gave up.

Many mail admins configure a fake secondary MX to catch spammers. When their primary is down, you're mail server will keep retrying until the primary comes back up, or your the retry expiration time occurs.

What REAL problem are you trying to solve?

Last edited by Mr. C.; 09-14-2008 at 04:36 PM.
 
Old 09-15-2008, 02:17 AM   #6
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Original Poster
Rep: Reputation: 38
@Mr. C.

I decided to open this thread because I thought my previous threads did not present the issue clearly. BTW, the DNS for the domain telnet-bd.com is working okay from my server, I do not know why your dig failed.
 
Old 09-15-2008, 11:57 AM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
DNS servers can sometimes be offline, and this is normal. Also, DNS typically uses UDP queries, which can be dropped/lost for various reasons. What is important is not why DNS failed in the issues we discussed in the other post, but that the failure explains why your sendmail was using a secondardy MX (which you were trying to defeat, by forcing it to use the problematic primary MX).

In Postfix, one can use transport maps that can be specified to bypass the MX lookup for a given remote site; while this is not good practice as a general rule for sites that you do not own, it can be accomplished. I don't recall the mechanism in Sendmail to accomplish this.
 
  


Reply

Tags
mx, priority, sendmail


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
Sendmail forcing to use a particular MX the_gripmaster Linux - Server 8 08-28-2008 04:59 AM
forcing traffic through certain route(forcing source ip) taltman Linux - Networking 1 12-26-2007 02:07 PM
Forcing a resolution... Unr3a164 Linux - Newbie 3 07-06-2007 05:33 AM
Forcing Vesa Magician Linux - Hardware 1 11-23-2003 10:18 PM
forcing boot from cd nocturnal Slackware 1 11-19-2003 05:08 PM


All times are GMT -5. The time now is 05:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration