How SMTP and MX records related?
Posted on 2006-05-04
I have an interesting situation which i would like to share. A few days ago i had to close the port 25 on the firewall for one of the servers due to SPAM. Though i changed the configuration of the sendmail server, i wasn't sure so i closed the port. Yesterday one of our clients complained that they got a few messages stuck in their mail queue for a while which were destined to one of our servers. He told me that i need to open port 25 on our firewall since i don't have an MX record for that server. I just want to mention that this server is not our email server. We run a software on this server which needs SMTP to relay emails. We have an MX record for our mail server. So i looked at the firewall settings for our mail server and i found out that it doesn't have an SMTP port opened for it and only pop3 was open. It didn't strike me at first why should i have to open SMTP on the server for receiving emails when pop3 is already open and SMTP is meant only to send and pop3 or IMAP for receiving. I started googling and came to know that during the mainframes era SMTP was used both for sending and receiving emails and there was no pop3. Though it didn't make any sense to me, i made a small point out of it that if your server doesn't have an MX record you need to open port 25 on your firewall or if it has an MX record you don't have to open SMTP, pop3 works just fine.
So now i am not fully confused but a little confused about the relationship between SMTP and MX record.
Can anyone of you come up with a good explanation of what an MX record is? what role does it play on a server which has SMTP service running and pop3 running? Hope it makes sense