View Full Version : Help - Setting up an Email server ?MX Records?
maddogsuk
24-06-2004, 09:48
Hi all,
I have been tinkering with the idea of setting up a home email server to collect email from my domain and for a bit of a learning curve.
This is all running on an NTL 1mb BB service.
I have access to the MX records, Nameserver details at my host (uk2.net) but havent a clue what to enter in them. I have looked around the net for details on MX records etc but am non the wiser and even more confused.
I have installed a 30 day trial pop server on my spare Windows 2000 machine and set the mailserver hostname as 'mail.maddogs.co.uk'
The domain www.maddogs.co.uk currenty points to the web server thats running on the same machine and that works fine. (At the moment!)
I just to know what else I need to do and what I need to enter in the fields. I have attached screenshots of what I can fill in both at the UK2's web site and the POP3 software on my home machine.
I have changed something on the UK2 and now if I send mail to the domain it just gets rejected as unknown user.
http://www.maddogs.demon.co.uk/forum/email/email1.jpg
http://www.maddogs.demon.co.uk/forum/email/email2.jpg
http://www.maddogs.demon.co.uk/forum/email/email3.jpg
Any pointers would be gratefull!
nmayling
24-06-2004, 11:07
Brain not 100% in Gear today but I'm sure you need to take away the CNAME record for mail
Then add the host name to the domain for the MX record.
"mail.maddogs.co.uk"
- I'll get me notes out after lunch and a pint to wake me up
maddogsuk
24-06-2004, 11:17
Cheers :thumbs: Any pointers would be great!
DeadKenny
24-06-2004, 12:03
I use zoneedit.com to manage my DNS even though I get the domain from 123reg. Mainly just because zoneedit has more controls and supports dynamic DNS.
Anyway, that's not the point ;). zoneedit have the following tips about MX records though I don't know if it will help...
The most common mistake is to set up an MX record, without setting up an IP address for the mail host. (IE: mail.example.com is an MX record for example.com, but has no IP address) Our system tries to alert you to this before it happens.
Another very frequent mistake is to point an MX record to a mail server that doesn't route mail for the domain yet, or keeps a separate user database for each destination domain.
Before reaching the conclusion that DNS is responsible for your mail routing issues, it's a good idea to test your mail server, independently of the DNS.
They also have an SMTP test utility, which is handy for testing if the MX records are working...
http://www.zoneedit.com/smtp.html
P.S. How long ago did you set up the domain, as it can take up to 72 hours for the new DNS to propagate (once it's done though you can change the records and they are almost instantly updated unless you move to a different DNS provider).
Oh, and I just found this on CNAMEs...
What is an Alias (CNAME) record?
DO NOT USE ANY CNAMES UNLESS YOU UNDERSTAND THIS PERFECTLY.
You must be very careful when using CNAMEs! Please read this description carefully, as most people do not realize what CNAMEs actually do!
A CNAME is not the simple "deliver this A record instead of that one" mechanism that they at first appear to be when most people are first introduced to the concept. In fact, CNAMEs are intended to redirect all DNS based traffic for one domain to another. For this reason, it is a violation of the DNS protocol to have a CNAME and any other DNS record for the same domain name.
Here's why. It may seem a bit odd at first that if you have a CNAME redirecting "here.com" to "there.com", then that means you can't have a Mail Server (MX) record defined for "here.com" -- since that would be another DNS record for the same domain name "here.com" which is a violation. This is, in fact, the truth, and is also easily accounted for.
When an e-mail is sent to "root@here.com", the e-mail client requests the MX record for "here.com", and gets the CNAME instead. The e-mail client follows the CNAME to "there.com", and asks the DNS server at "there.com" for the MX record for "there.com"! The e-mail for "root@here.com" is then delivered to the mail server for "there.com", and that server had better be set up to handle e-mail for "here.com" or else that e-mail is going to get returned to sender!
It gets worse. Not all email clients understand this behavior of the DNS, so even if you set it up correctly, your email may get returned anyway! For this reason, if you set up a CNAME for the root of your domain, or if you set up a wildcard CNAME, you may not have any inappropriate MX records defined, and you will not receive technical support for e-mail related problems.
In addition, if your mail server is called "mail.anywhere.com", then you MUST NOT use a CNAME to define its IP address -- you MUST use an A record. Mail clients that send e-mail to "info@anywhere.com" will look for the MX record of "anywhere.com". They will discover that the mail server is called "mail.anywhere.com", and look for an A record. If a CNAME record is returned instead, the mail client will very likely not understand it, and return the e-mail to sender!
Once again, please read and reread this description until you are very clear what it means. The fact of the matter is that most people who use CNAMEs do not need them at all, and really should have used A records instead.
For info, I don't have CNAMEs on my domains, I have A records for each subdomain (e.g. www.deadkenny.co.uk, mail.deadkenny.co.uk etc, which all point to my NTL IP address), and then an MX record for mail.deadkenny.co.uk
From your screenshots I'd say that the mail.maddogs.co.uk (and probably the www) entry should be an A record, not a CNAME. Not sure about the others as I don't really understand CNAMEs either.
youngteam
24-06-2004, 12:28
If you're using the mail server to receive mail, you'll need an SMTP server. POP servers are used for clients to retreive mail not for it's transmission across the net.
You'll need to set the mx record to mail.maddogs.co.uk and set the mail A record to the IP address of that server.
If you're using your local server for outgoing mail as well, you may find a lot (if not most) of your outgoing mail is blocked as a large number of ISP mail servers block mail from dial up/broadband IP ranges.
DeadKenny
24-06-2004, 16:28
Originally posted by youngteam
If you're using the mail server to receive mail, you'll need an SMTP server. POP servers are used for clients to retreive mail not for it's transmission across the net.
Good point, I didn't notice in his screenshot that the SMTP server isn't running :doh:
However, I think the other change he needs is to change that entry for mail.maddogs.co.uk to an A record using an IP address instead (i.e. A record 'mail = 81.104.216.80', not CNAME 'mail = maddogs.co.uk'). He's got the MX okay though.
Also, be very careful and make sure your mail server is not an open relay (i.e. where anyone in the world can use it to send mail). Not only will this be in breach of NTL's AUP, but you'll find your server suddenly becomes a spam relay and you could find hundreds of thousands of people will suddenly hate you ;) (not to mention getting the wrath of numerous ISPs).
Originally posted by youngteam
If you're using your local server for outgoing mail as well, you may find a lot (if not most) of your outgoing mail is blocked as a large number of ISP mail servers block mail from dial up/broadband IP ranges.
I've only found two so far, mail.com and aol.com. Funny enough they're two that are responsible for a large bulk of spam so it's ironic they block mail from other senders :oh-hum:
I just put in a special rule that means outbound mail to those domains are forwarded to smtp.ntlworld.com:gag:, and just have to live with the fact that it may sit in a queue for hours trying to deliver the mail or get lost entirely. So basically, if you want to communicate with me, don't use AOL :p (which is a sensible thing to do anyway :D)
You need a record such as
mail.maddogs.co.uk pointing as an A record to the IP address of your mail server.
Or pointing as a cname to the hostname you use for your dynamic doman name.
You need to have at least one mx point pointing to this hostname - mail.maddogs.co.uk.
You need to make sure people can connect to your mail server on port 25 - i.e. if you have a NATting router you need to set up the appopriate inbound tunnel.
For sending mail you need to decide if you're going to simply relay through NTL's SMTP server or use direct MX - where your mail server communicates diretly with the mail server's of the domain's you're sending mail to.
And, like someone else said, you need to be careful you aren't open for exploitation as an open relay. Years ago you were forbideen from running any kind of server on your computer - it may still be the case and they might come down hard on you if you clog their network with spam.
maddogsuk
24-06-2004, 20:01
Cheers guys :thumbs: Got it all working fine. Followed your advise switched SMTP back, changed the A record and MX records, still couldmt work out what was wrong... Then opened the POP3 and SMTP ports on the firewall that seemed to fix things.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.