Gentoo Archives: gentoo-user

From: Etaoin Shrdlu <shrdlu@×××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Use of gethostname() and getdomainname()
Date: Sat, 01 Dec 2007 17:31:59
Message-Id: 200712011821.11502.shrdlu@unlimitedmail.org
In Reply to: [gentoo-user] Use of gethostname() and getdomainname() by Kevin O'Gorman
1 On Saturday 1 December 2007, Kevin O'Gorman wrote:
2
3 > I've got my own domain and domain server. I've just run into a
4 > problem about the appropriate settings for hosts and domains, and it's
5 > messing up a few things in my postfix setup.
6 >
7 > The gentoo instructions say to set /etc/conf.d/hostname to the host
8 > name only. It gets passed to sethostname(2) unchanged by
9 > /etc/init.d/hostname. I did it.
10 > The gentoo instructions say to put a domain name, if needed, into
11 > /etc/conf.d/net. It seems to get used in network setup. I did it.
12 >
13 > Nothing seems to be set into whatever it is that setdomainname(2) is
14 > used for.
15 > My mailx mailer seems to put "localdomain" on the sender address when
16 > my crontab entries call it. Maybe because it sees that
17 > getdomainname(2) comes up empty.
18 >
19 > What's the right way to set this up? Should I just cobble my proper
20 > domain into setdomainname(2)? Is there a right way? Is there a
21 > better way?
22
23 Try adding the following line to /etc/hosts:
24
25 a.b.c.d hostname.your.domain hostname
26
27 of course, replacing a.b.c.d with your correct ip address.
28
29 I don't know whether this is related to your problem, but it usually
30 solves the domainname: (none) problem.
31 --
32 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Use of gethostname() and getdomainname() Mick <michaelkintzios@×××××.com>