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

SMTP/POP3 MX Records question 2

Status
Not open for further replies.

comaboy

Programmer
Nov 6, 2001
261
GB
Hi all,

I'm very new to DNS Adminstration and SMTP, so bear with if I'm being stupid...

OK, I've pointed an MX Record at my (closed relay) mailserver, and placed a couple of A Records for a mail sub-host. Configured Outlook and my SMTP server and it all works fine. Now in all honesty I'm confused about the MX Records.

This is what I think happens: Outlook first uses the DNS to map mail.domain.com into an IP Address. Outlook logs onto 194.111.111.111, sends the outgoing mail to server and checks the mailbox for incoming. Now I don't really know much about SMTP, so this is the question:

What the heckityheck is the SMTP server doing? I don't remember configuring any relay server, so once the Server has the mail, what does it do with it? How does it know where to send it?

Also, for POP/SMTP mail in general, are the MX Records even used at all, or a throwback to the early internet?

I'd be really gratefull if someone would enlight me / kick me for being an idiot...

Thanks In Advance!

PS Names and (IP)Addresses have been changed to protect the innocent! ;-)
 
The SMTP server takes the outgoing message, reads the To header, and figures out what domain you are sending to. It then queries its DNS server for the MX record of that domain to determine which SMTP server to send to. Then, connects to that SMTP server and sends the message.

As for POP/SMTP, mail is sent between SMTP servers, and MX records are used to determine what SMTP server to send to for a particular domain. POP is used by clients for retrieving mail from an SMTP server, and has nothing to do with MX records.
 
Serb, Glen,

Thanks for blowing away some misconceptions I've carried for about 8 years! Since nearly every ISP we've dealt with had different POP/SMTP servernames, I've always assumed that SMTP and POP where roles[i/]. ie, SMTP Sends wheras POP3 receives... "SMTP server" sends mail to a "POP3 server" (which only receives and holds mailboxes) WRONG![purpleface] I always got confused reading RFC's that refer to getting mail from an SMTP server... Now it's all beginning to make (some) sense!

I assume now that these are the protocols for talking to the same email server (by which I mean a single physical machine)*, which in turn is addressed my the MX Records for the domain.

(*Unless multiple servers are in place for redundancy)

...Now for a REALLY dumb question...
Our domain was set up by our hosting company, so the MX Records are something like*...

[dns]
MX 10 webmail.isp.com
MX 5 mail.isp.com
[/dns]

Now I know you can seriously screw things by mixing CNAMEs with CNAMEs and IPs. Can I (is it permissible/bad practice/just damn wrong!) change the names to our public IPs, ie

[dns]
MX 10 195.111.111.111
MX 5 194.555.555.555
[/dns]

..or should I MS to an A record like...

[dns]
MX 10 webmail.isp.com
MX 5 mail.isp.com

A 195.111.111.111 webmail.isp.com
A 194.555.555.555 mail.isp.com
[/dns]

Thanks again and have some stars!

* I know that's wrong, but I use an online Contol Panel to administrate the domain.
 
I assume now that these are the protocols for talking to the same email server (by which I mean a single physical machine)*, which in turn is addressed my the MX Records for the domain.

This is not always so. Most ISP's use a different server for POP3 and SMTP. So, the MX record directs mail for the domains to the inbound SMTP server and then often, once that mail has been accepted it will pass it to a differnet server used for POP3 access. In our case the SMTP server passes emails to a NAS platform which is then accessed by the POP3 server (a different box altogether). But, the SMTP server and POP3 server *can* be the same box but they don't have to be.

Can I (is it permissible/bad practice/just damn wrong!) change the names to our public IPs, ie

MX 10 195.111.111.111
MX 5 194.555.555.555

No. MX records MUST be hostnames.

domain.com IN MX mail.domain.com
mail.domain.com IN A 123.123.123.123

How about a real life example?

; QUESTION SECTION:
;tek-tips.com. IN MX

;; ANSWER SECTION:
tek-tips.com. 3600 IN MX 400 smtp-in4.nuvox.net.
tek-tips.com. 3600 IN MX 500 smtp-in5.nuvox.net.
tek-tips.com. 3600 IN MX 600 smtp-in6.nuvox.net.
tek-tips.com. 3600 IN MX 0 mail.tecumsehgroup.com.
tek-tips.com. 3600 IN MX 100 smtp-in1.nuvox.net.
tek-tips.com. 3600 IN MX 200 smtp-in2.nuvox.net.
tek-tips.com. 3600 IN MX 300 smtp-in3.nuvox.net.

mail.tecumsehgroup.com. 3600 IN A 216.45.19.20
Chris


**********************
Chris A.C, CCNA, CCSA
**********************
 
Thanks Chris,

This is not always so.

Yes, I did realise that, but I constructed the sentence badly!

MX records MUST be hostnames.
Thanks a lot for clearing that up. Now I can move forward with more confidence. ;-)

I see I've also got to do a lot more research into the actual routing of email as well...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top