1 |
On Wed, 13 Jan 2010 02:22:47 +0000, Stroller |
2 |
<stroller@××××××××××××××××××.uk> wrote: |
3 |
> Ok, this question comes about because I noticed that I manually have |
4 |
> to set $mydomain in Postfix. I'm about to set up Samba, too, and |
5 |
> thinking that I might have to manually set the domain name in that, |
6 |
> too, I thought to investigate this. Surely Postfix should get its |
7 |
> hostname & domainname from the system itself, right? |
8 |
> |
9 |
> $ hostname |
10 |
> hex |
11 |
> $ dnsdomainname |
12 |
> stroller.uk.eu.org |
13 |
> $ domainname |
14 |
> (none) |
15 |
> $ domainname -v |
16 |
> getdomainname()=`(none)' |
17 |
> (none) |
18 |
> $ |
19 |
> |
20 |
> This mention of getdomainname agrees with the comments in Postfix's |
21 |
> main.cf: |
22 |
> |
23 |
> # The myhostname parameter specifies the internet hostname of this |
24 |
> # mail system. The default is to use the fully-qualified domain name |
25 |
> # from gethostname(). $myhostname is used as a default value for many |
26 |
> # other configuration parameters. |
27 |
> |
28 |
> `man domainname` tells me that `domainname` should in particular "show |
29 |
> or set the system's NIS/YP domain name". |
30 |
> |
31 |
> Can anyone explain the significance of this, please? |
32 |
> |
33 |
> /etc/conf.d/net.example suggests that "it's rare that you would need |
34 |
> to" set a NIS domainname, "but you can anyway", and the Gentoo Linux |
35 |
> x86 Handbook [1] says "if you don't know what [a NIS domain] is, then |
36 |
> you don't have one". |
37 |
> |
38 |
> I guess that a typical desktop system might use ssmtp and not need |
39 |
> either postfix or a NIS domainname, however I'm still confused. I |
40 |
> guess the best question I can ask is why Postfix might choose to use |
41 |
> this apparently-less-common config to set its hostname? I really feel |
42 |
> like I must be missing out. It's not a massive hardship to set |
43 |
> $mydomain manually in Postfix on several boxes, it just seems like I |
44 |
> ideally shouldn't have to. Is there anyone who can help clarify for me? |
45 |
|
46 |
Hi |
47 |
|
48 |
The only way found for me was echo the domainname on startup onto proc |
49 |
|
50 |
echo domainname.ch > /proc/sys/kernel/domainname |
51 |
|
52 |
Does that work for you too ? |
53 |
|
54 |
Oliver |