On Wed, Sep 30, 2026 at 10:18:26 -0500, David Wright wrote: > I don't understand not having any domain name. Surely the hostname > is a domain name in itself. I ran my network for years like that, > and exim (as set up by Debian) would moan about the lack of a dot > in /etc/mailname. > > I only added .corp when I found that there was semi-official > documentation for using that. I chose it in preference to .home > and .mail merely because grepping -r '\<corp\>' /etc produced > fewest false positives. Current false positives here are: > > home: 173 mail: 162 corp: 0 > > I haven't yet bothered to move to .home.arpa. Maybe sometime.
So, your *system* doesn't have or need a domain name -- only your MTA needs one. There are two common reasons why people want (or think they want) to set up a "default domain name": 1) To reach other hosts on the network using short names. 2) To set up email. For case 1, the proper place to set this is in the /etc/resolv.conf file, which unfortunately in modern ages has been taken over by software that thinks it knows better than you do, and will overwrite your /etc/resolv.conf file any time it feels like doing so. Steps to work around that are found at <https://wiki.debian.org/resolv.conf>. For case 2, an MTA only wants a domain name for two reasons: a) So it knows how to introduce itself when it issues a HELO or EHLO command in SMTP (this is basically saying, "Hello, I am scooby.davidsdomain.com."). b) When you want to send mail to another user within your organization (e.g. you run something like "echo meeting is at 10:00 | mail stu" and you expect your MUA/MTA to expand "stu" to "[email protected]"). The proper places to set the HELO domain and the default recipient domain are within the MTA's configuration. Some MTAs cheat a little bit, by trying to derive one or both of these domain names by looking at your non-mail-specific files, such as /etc/hosts or /etc/resolv.conf. I wouldn't depend on this.

