
Hi All I host a number of domains on a Centos 7 VPS. Now I am setting up a VPS with only one domain hosted. I am trying to get my head around issues with naming especially regarding RDNS and a mail server. Should I name the server host.domain.com or just domain.com? Cheers Nic

On 7/03/2018 12:45 PM, Nic Baxter wrote:
Hi All
I host a number of domains on a Centos 7 VPS. Now I am setting up a VPS with only one domain hosted. I am trying to get my head around issues with naming especially regarding RDNS and a mail server. Should I name the server host.domain.com or just domain.com?
Cheers
Nic
_______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main Each type of service (if there going to be separated) should have its own hostname. The domain should then be pointed a one particular host for the website.
Website should be domain.com resolves to host.domain.com For mail you would point the MX records at a hostname, this hostname should have a RDNS records that matches the MX record. ie mail.domain.com -> 10.10.10.10 r-> mail.domain.com. note if you do not have control of the rdns but the domain does have a record which resolves forward and reverse you can use this in the MX record. An example of this is my home static address ppp???-??.static.internode.on.net -> 203.???.???.57 r-> ppp224-57.static.internode.on.net So in this case you could use ppp???-??.static.internode.on.net for the MX record. If you more something explained in more detail just say. Cheers Mike

On 07/03/18 13:25, Mike O'Connor wrote:
On 7/03/2018 12:45 PM, Nic Baxter wrote:
Hi All
I host a number of domains on a Centos 7 VPS. Now I am setting up a VPS with only one domain hosted. I am trying to get my head around issues with naming especially regarding RDNS and a mail server. Should I name the server host.domain.com or just domain.com?
Cheers
Nic
_______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main Each type of service (if there going to be separated) should have its own hostname. The domain should then be pointed a one particular host for the website.
Website should be domain.com resolves to host.domain.com
For mail you would point the MX records at a hostname, this hostname should have a RDNS records that matches the MX record.
ie mail.domain.com -> 10.10.10.10 r-> mail.domain.com. note if you do not have control of the rdns but the domain does have a record which resolves forward and reverse you can use this in the MX record.
An example of this is my home static address ppp???-??.static.internode.on.net -> 203.???.???.57 r-> ppp224-57.static.internode.on.net
So in this case you could use ppp???-??.static.internode.on.net for the MX record.
If you more something explained in more detail just say.
Cheers Mike Thanks MIke. That is what I do with my multiple domain VPS. I just wasn't sure if that still applied with a single domain VPS. Cheers Nic

On Wed, Mar 07, 2018 at 01:15:27PM +1100, Nic Baxter wrote:
I host a number of domains on a Centos 7 VPS. Now I am setting up a VPS with only one domain hosted. I am trying to get my head around issues with naming especially regarding RDNS and a mail server. Should I name the server host.domain.com or just domain.com?
The domain itself needs, at minimum, an SOA record, two or more NS records, and an MX record. The MX record has to point to an A record, **NOT** an IP address or CNAME. If the domain isn't supposed to accept mail give it an MX record like: @ IN MX 10 does-not-accept-mail with the A record being something like this to cause an immediate bounce back to the sender does-not-accept-mail IN A 127.0.0.1 The NS records also have to point to an A record. They can be in your domain, or in your DNS hosting provider's domain. or noth. The domain may also have an A record. IMO, it should have one, and it should be the same as the primary web site, so that http://example.com/ works the same as e.g. http://www.example.com/ - your web server should be configured to accept both, and preferably redirect to the canonical name. It doesn't really matter which you prefer (with or without the www.) as long as you use the same one consistently. You probably want separate "hostnames" (A records) for mail & www even if they all point to the same IP address. This will make it easier to move either or both of those services later if it ever becomes necessary. So the minimal zone file would look something like: $ORIGIN example.com $TTL 86400 @ IN SOA example.com. hostmaster.example.com. ( 2018030701 ; Serial 10800 ; Refresh - 3 hours 1800 ; Retry - 30 minutes 604800 ; Expire - 7 Days 43200 ) ; Minimum - 12 hours IN NS ns1.yourisp.example.net. IN NS ns2.yourisp.example.net. IN MX 10 mail IN A ip.ip.ip.ip www IN A ip.ip.ip.ip mail IN A ip.ip.ip.ip Note that none of the hostnames in the domain have a trailing dot. That's so they get $ORIGIN auto-appended. BTW, having a matching reverse-DNS entry for the MX records hostname is nice, and definitely worth doing if you can, but it's not necessary. Very few mail servers reject mail because of something trivial like that - it's not common these days for people to have any control over the .in-addr.arpa zones for the tiny subnets they get allocated by their ISP. craig -- craig sanders <cas@taz.net.au>

Quoting Craig Sanders (cas@taz.net.au):
The domain itself needs, at minimum, an SOA record, two or more NS records, and an MX record.
[...] This is very good, Craig. (I would want to also include appropriate SPF TXT RRs.) I tried for a while to draft a 'how to write a zonefile' tutorial using my prototype example RFC 1035 ('BIND') zonefile and configuration at http://linuxmafia.com/pub/linux/network/bind9-examples-linuxmafia.tar.gz, but found the task surprisingly difficult, because you have to not only present an example in good form, but also explain why you did particular things and avoided particular errors (e.g., avoiding NS'ing or MX'ing to a CNAME).
$ORIGIN example.com $TTL 86400
ITYM '$ORIGIN example.com.' The '$ORIGIN' line at the top is something I, likewise, prefer to do as syntactic sugar, but it should be understood to be not functionally necessary and to create some small pitfalls if you do it. (Once, I copied an existing zonefile to populate a new zone, and forgot to edit the '$ORIGIN' line in the new zonefile, creating briefly puzzling dysfunction until I caught the error.
BTW, having a matching reverse-DNS entry for the MX records hostname is nice, and definitely worth doing if you can, but it's not necessary. Very few mail servers reject mail because of something trivial like that - it's not common these days for people to have any control over the .in-addr.arpa zones for the tiny subnets they get allocated by their ISP.
It's still been my experience, FWIW, that significant numbers of receiving SMTP domains consider sender's lack of a valid reverse to be suspiciously spammy, even though it's not RFC-required. So, personally, I would always ask my ISP to set an appropriate reverse in the applicable *.in-addr.arpa zone. (For these purposes, it's not necessary to have the .in-addr.arpa namespace delegated, just set appropriately.)
participants (4)
-
Craig Sanders
-
Mike O'Connor
-
Nic Baxter
-
Rick Moen