hostname="?"

Basically, home users have several options (beside registering a real domain, of course):
No way to have a short name.

I use something that corresponds to your third point, .local, and would use .lan

Perhaps the more people use .lan, the more is possible that it be reserved for local networks.
 
No way to have a short name.
Why do you want a short name? You don’t have to type it all the time, so the length doesn’t matter much. Apart from that, I think .example is fairly short.

I use something that corresponds to your third point, .local, and would use .lan
That’s not a very good idea.
.local is reserved for link-local addresses in the context of multicast DNS, see RFC 6762. Using it for other purposes might cause problems.
.lan currently does not exist at all, and it is not reserved or otherwise special. That means that ICANN may delegate it to a registry for official use at any time.

Perhaps the more people use .lan, the more is possible that it be reserved for local networks.
That’s not how assignment by the IANA works. :)
 
I like that short names, unfortunately many programs do need the form "host.domain".
Actually, it has to be host.domain.tld.

No way to have a short name.
Set search or domain correctly in resolv.conf. search is useful if you have multiple (sub)domains. domain can only have one and this should be the domain of the host itself.

For example:
Code:
nameserver 1.2.3.4
search example.com mydomain.home
If you use a 'short' name like myhost in client applications, the search parameter from resolv.conf will expand this automatically to search for myhost.example.com and myhost.mydomain.home.

Similarly with domain
Code:
nameserver 1.2.3.4
domain example.com
When a client calls for a 'short' name, the domain is automatically appended. So a ping myhost will be resolved as myhost.example.com.
 
Well, I think tld is a full qualified domain, I remember once read the definition, but all depends on what the
programs expect.
If I recall correctly a lot of applications that need a FQDN specifically look for two dots in the hostname. Hence the myhost.domain.tld notation.
 
If I recall correctly a lot of applications that need a FQDN specifically look for two dots in the hostname.
I have a server with name name.tld running sendmail as MTA, cyrus-imap, apache, and other
software, without problems. But it would be not a surprise if some other software at some point make troubles.

BTW. It was much more complicated to get cyrus-imap than sendmail to work. The old
uw-imap worked out of the box, it was a nice solution for small personal servers, but unfortunately
is not mantained anymore.
 
If I recall correctly a lot of applications that need a FQDN specifically look for two dots in the hostname. Hence the myhost.domain.tld notation.
But that behavior would be an RFC violation. <hostname>.<domain> with a single dot is a valid FQDN.

By the way, RFC rules are not always intuitive. For example, few people (even among people familiar with IP networking) know that 127.1 (one dot!) is syntactically a valid numeric IP address, and it is equivalent to the “dotted quad” 127.0.0.1. Try ping 127.1, for example.
 
But that behavior would be an RFC violation. <hostname>.<domain> with a single dot is a valid FQDN.
That's not my understanding. Not unless you define domain to be name.tld. So a host's FQDN always has at least two dots in it. Technically it's actually three, hostname.domain.tld. (note the ending dot) to make it absolute.
For example, few people (even among people familiar with IP networking) know that 127.1 (one dot!) is syntactically a valid numeric IP address, and it is equivalent to the “dotted quad” 127.0.0.1. Try ping 127.1, for example.
Even fewer will know ping 2130706433 works too ;)
 
I like that short names, unfortunately many programs do need the form "host.domain".
I use failure.bsd.home as my hostname. This will shut up sendmail and stop it from blocking my FreeBSD to boot.
 
  • Advantage of open source: anyone can participate.
    Some open source SW is of the finest quality & much better than the most expensive commercial counterpart.
  • Disadvantage of open source: anyone can participate...
    Many open source SW is beyond crap, and thus it's just a precautionary measure to avoid trouble by e.g. keep such "variables" like the hostname to match the most commonly used pattern & conform to a very simple syntax ;)
 
That's not my understanding. Not unless you define domain to be name.tld. So a host's FQDN always has at least two dots in it. Technically it's actually three, hostname.domain.tld. (note the ending dot) to make it absolute.

Look here, from /usr/share/sendmail/cf/README :

relay_entire_domain
This option allows any host in your domain as defined by
class {m} to use your server for relaying. Notice: make
sure that your domain is not just a top level domain,
e.g., com. This can happen if you give your host a name
like example.com instead of host.example.com.
This does imply that a tld is a domain, just a top level domain.
 
Yeah, I had a stroll (need to get outside more, been cooped up at home for a year now) and had some time to ponder on this. I believe we're both right. Yes, hostname.domain is a perfectly fine FQDN internally. On the internet however it's just not going to happen. For the simple reason you just cannot get a hostname registered on the root servers. So for internet hostnames an FQDN will most certainly have at least two dots.
 
On the internet however it's just not going to happen. For the simple reason you just cannot get a hostname registered on the root servers. So for internet hostnames an FQDN will most certainly have at least two dots.
There's no *technical* problem as you can easily add A and AAAA records to a zone for the domain itself. Just in practice, most people will use them only as aliases.
 
There's no *technical* problem as you can easily add A and AAAA records to a zone for the domain itself.
Sure, that's one way around it but that's technically not a hostname, it's an address record for the domain.
 
There's no *technical* problem as you can easily add A and AAAA records to a zone for the domain itself.
I have such a configuration, but you see above the problems you can get, and I would not wonder if some
software expect in spite of it two dots.

but that's technically not a hostname

Who says what is a hostname? One gives a name, again, from sendmail:

This can happen if you give your host a name
like example.com instead of host.example.com.
 
Whether the record is on the domain itself or below it is only of internal interest for the resolver, and it would be perfectly allowed to use the domain as FQDN. As I said, it's probably very uncommon in practice. Not only for software taking assumptions not warranted by the standards – but kind of funny it's sendmail again…
 
Not only for software taking assumptions not warranted by the standards – but kind of funny it's sendmail again…

It is allowed and hence standard, and sendmail is here conforming the standard, it is not following unwritten rules.
 
You're contradicting here what you cited *yourself* from sendmail README earlier.

It is no contradiction. It just warns to use an allowed name instead of forbidding you to use the allowed name.

It is your freedom to use that name even if it has consequences.
 
It has consequences, if you take that name and put the option relay_entire_domain.

It is also allowed to do as root user: rm -r /

If you do not like that, then you should use Windows that cares that you do not do stupid things.
 
Back
Top