Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Explanation of MX Records

Posted on 2007-08-04
12
Medium Priority
?
572 Views
Last Modified: 2013-11-05
Can someone explain me how the MX Records are working?

What are the values and how Mail-Server treat this entrys?
0
Comment
Question by:woigl
  • 5
  • 4
  • 3
12 Comments
 
LVL 13

Expert Comment

by:bluetab
ID: 19633310
MX (Mail eXchange) records are part of DNS (Directory Name Services) which is how the Internet finds things by name. The Internet runs on IP addresses which are those addresses with 4 numbers (127.0.0.1) but who can remember those numbers? So DNS was created to give names to those numbers. The MX record is part of DNS and it is where you tell the world where to send your email. It tells the world, "These servers handle my email."  You can have multiple "backup" mail servers that host mail for your domain.  If you have multiple mail servers you need to setup MX records with a priority like 10, 20, 30.  Other servers will try to send mail to the highest priority mail server first (10) and if that fails it will resend it to the next mail server on the list (20).
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 19633434
Also MX record are required to be FQDN(full qualifed domain name), which basicly means no IP is allowed in MX record.
0
 

Author Comment

by:woigl
ID: 19636617
okay, but how this works with some external spam filters... then the mail goes thru more mail-servers according your mx records? can you even explain me that?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 43

Expert Comment

by:ravenpl
ID: 19636659
For ext spamfilters, You are setting MX to that spam-filter-host. The spam-filter-host sets Your real mail-eXchanger as it's smart-host for Your domain. Smart-host is host/IP where MTA(mail-transport-agent, mail server) should send all it's mail.
0
 

Author Comment

by:woigl
ID: 19638476
Okay, and how MX records could look like for a normal Domain which even includes a SpamFilter?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 19638587
They always look the same, eg:
[raven@server ~]$ host -t mx gmail.com
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 50 gsmtp163.google.com.
gmail.com mail is handled by 50 gsmtp183.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.

Or I don't understand Your question.
0
 

Author Comment

by:woigl
ID: 19644613
The question is how the MX Records look like if i run a mailserver and want to receive the mails over a Samfilter?
0
 
LVL 13

Expert Comment

by:bluetab
ID: 19647107
Your MX records just tells emails servers where to send the mail.  What your MX records look like when using a spam filter depends on the type of spamfilter service you are using.  What type of spamfiltering service are you using?
0
 

Author Comment

by:woigl
ID: 19652286
i am ot using anything right now... i just wanna understand the way it works...

like some spamfilter are doing following

10 MX mail.spamflter.xxx
20 MX mail.mydomain.xxx

i that case it sees like the mails goes first to mail.spamfilter.xxx and later from there to mail.mydomain.xxx.
0
 
LVL 13

Expert Comment

by:bluetab
ID: 19652324
The #s that you see first (10, 20) are the MX record priorities.  Email will be sent to the first mail server first (10) and if it can't be delivered there the sending server will usually try the second server.  If the mail is delivered to the first record (10) then it will not be sent to the second.  

Most spammers will only attempt to deliver mail once, so if the email can't be delivered to the first mail record then the spam doesn't get sent to the second mail server.  So if the first record is a fake then in essence you will be helping reduce your amount of spam.  

0
 

Author Comment

by:woigl
ID: 19652397
No i guess it works different.

I think the Mail will be delivered to the first one (which is the Spamfilter) after the Spamfilter did the Job it will be forwarded to the second one. If the Spamfilter is not available then it will deliver directly to the second one. Am i right?
0
 
LVL 13

Accepted Solution

by:
bluetab earned 1000 total points
ID: 19652459
Almost.  
The mail will be delivered to the first MX record (spamfilter) and then the Spamfilter will forward the email to your mail server.  But the Spamfilter does not need to reference the second MX record to forward the email (if you didn't have that record the email would still be forwarded).  The Spamfilter forwards the email to your mail server using an "A" record that's in DNS.  The A record points an IP address to mail.mydomain.com.  

If the Spamfilter is not available then the mail will be delivered to the second MX record as you mentioned above.  

"A" record explantation:  When you setup an MX record that says:
20 mail.mydomain.com  you need to setup an "A" record that points an IP address to mail.mydomain.com.  That way when the email is sent to mail.mydomain.com it knows where that server is by looking at the "A" record and seeing the IP address.
0

Featured Post

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
This applies to Dell but may also apply to other manufacturers as well. We ran across a few machines that just dropped recently it trust relationship with the server. After doing the basic removing and joining the domain again, it changed to No logo…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question