Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] domainname command shows blank - NIS/YP domain name?
Date: Wed, 13 Jan 2010 02:24:02
Message-Id: 38C2C345-4657-4444-A4EC-6704766B7891@stellar.eclipse.co.uk
1 Ok, this question comes about because I noticed that I manually have
2 to set $mydomain in Postfix. I'm about to set up Samba, too, and
3 thinking that I might have to manually set the domain name in that,
4 too, I thought to investigate this. Surely Postfix should get its
5 hostname & domainname from the system itself, right?
6
7 $ hostname
8 hex
9 $ dnsdomainname
10 stroller.uk.eu.org
11 $ domainname
12 (none)
13 $ domainname -v
14 getdomainname()=`(none)'
15 (none)
16 $
17
18 This mention of getdomainname agrees with the comments in Postfix's
19 main.cf:
20
21 # The myhostname parameter specifies the internet hostname of this
22 # mail system. The default is to use the fully-qualified domain name
23 # from gethostname(). $myhostname is used as a default value for many
24 # other configuration parameters.
25
26 `man domainname` tells me that `domainname` should in particular "show
27 or set the system's NIS/YP domain name".
28
29 Can anyone explain the significance of this, please?
30
31 /etc/conf.d/net.example suggests that "it's rare that you would need
32 to" set a NIS domainname, "but you can anyway", and the Gentoo Linux
33 x86 Handbook [1] says "if you don't know what [a NIS domain] is, then
34 you don't have one".
35
36 I guess that a typical desktop system might use ssmtp and not need
37 either postfix or a NIS domainname, however I'm still confused. I
38 guess the best question I can ask is why Postfix might choose to use
39 this apparently-less-common config to set its hostname? I really feel
40 like I must be missing out. It's not a massive hardship to set
41 $mydomain manually in Postfix on several boxes, it just seems like I
42 ideally shouldn't have to. Is there anyone who can help clarify for me?
43
44 Many thanks in advance for all suggestions,
45
46 Stroller.
47
48
49
50 [1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2

Replies

Subject Author
Re: [gentoo-user] domainname command shows blank - NIS/YP domain name? Oli Schmidt <oli@×××××××××××.ch>