Search code examples
emailurlhostnamedomain-namereverse-dns

Reverse DNS, sending emails and hostname


I don't understand this "reverse dns" thing at all.

So, I have a website - www.someurl.com, and I have an ip address - http://180.160.160.190 (fake). Now, I want to setup a "reverse dns" thing, so that emails that I send out won't be marked as spam.

Questions!

  1. why do i have to setup a "reverse dns" thing? What is it, and why do gmail, hotmail et al care about it?
  2. all the examples online say I need to setup the "hostname" as mail.someurl.com (well, they say mail.domainname.com, but I cleverly solved for x). What the heck is a "hostname" and what is a "url"? The wikipedia page for hostname left me v. confused.
  3. is a url a domain name? it sure isn't a hostname (i hope).
  4. back to the mail.someurl.com hostname - why is it "mail" in the examples? Can I fecklessly set the value to "hello" or "mooseymooseymoose" (so it would be mooseymooseymoose.someurl.com)? Does it have any relevance to anything at all?
  5. if i am sending emails out as [email protected], does that have any bearing on the first bit of the hostname? that is, should they come from "[email protected]", given a hostname of mail.someurl.com?

cheers, andrew


Solution

    1. It's an artificial requirement that was adopted under the assumption that spam servers wouldn't take the time to setup their rDNS (or wouldn't be able since they usually got setup in rogue environments like infected PC's), and legitimate servers would. There is no technical requirement to have a rDNS for the email protocol to work, and not every mail server does this check.

    2. The hostname is the name of your machine within your internal network.

    3. URL stands for uniform resource locator, it's the fancy name for stuff that looks like "http://www.google.com/page1/page2". a domain name is simply the base of the URL, for example google.com. It's always of the form domain.tld (domain name and top level domain like com, net, org)

    4. Yes you can set it to anything you want. Mail protocol doesn't require you to hardcode the name to anything in particular. Ultimately, it's your domain's MX record that decides where the mail server handling its emails is located at, and you can point it to anything.

    5. Not necessarily. Mail servers can send e-mails on behalf of several domains, a mail server isn't limited to sending emails from its hostname only. The "From" part of the e-mail header will tell the mail client where it's coming from.

    Hope that helps clear up a few details.