On Wed, 13 Jan 2010 02:22:47 +0000, Stroller <strol...@stellar.eclipse.co.uk> wrote: > Ok, this question comes about because I noticed that I manually have > to set $mydomain in Postfix. I'm about to set up Samba, too, and > thinking that I might have to manually set the domain name in that, > too, I thought to investigate this. Surely Postfix should get its > hostname & domainname from the system itself, right? > > $ hostname > hex > $ dnsdomainname > stroller.uk.eu.org > $ domainname > (none) > $ domainname -v > getdomainname()=`(none)' > (none) > $ > > This mention of getdomainname agrees with the comments in Postfix's > main.cf: > > # The myhostname parameter specifies the internet hostname of this > # mail system. The default is to use the fully-qualified domain name > # from gethostname(). $myhostname is used as a default value for many > # other configuration parameters. > > `man domainname` tells me that `domainname` should in particular "show > or set the system's NIS/YP domain name". > > Can anyone explain the significance of this, please? > > /etc/conf.d/net.example suggests that "it's rare that you would need > to" set a NIS domainname, "but you can anyway", and the Gentoo Linux > x86 Handbook [1] says "if you don't know what [a NIS domain] is, then > you don't have one". > > I guess that a typical desktop system might use ssmtp and not need > either postfix or a NIS domainname, however I'm still confused. I > guess the best question I can ask is why Postfix might choose to use > this apparently-less-common config to set its hostname? I really feel > like I must be missing out. It's not a massive hardship to set > $mydomain manually in Postfix on several boxes, it just seems like I > ideally shouldn't have to. Is there anyone who can help clarify for me?
Hi The only way found for me was echo the domainname on startup onto proc echo domainname.ch > /proc/sys/kernel/domainname Does that work for you too ? Oliver