我正在设置一个后缀邮件服务器,主机名“信函”,以处理域'example.net‘的邮件。我尝试使用nis将字母‘域名’设置为example.net,但是我得到了来自主机名-f ('letters.stuff.comcast.net')和域名称('example.net')的不一致输出,如何将域名所以主机名-f命令设置为reports 'example.net'?这对正确的后缀功能有多重要?
主机字母运行Ubuntu并通过电缆调制解调器通过openwrt路由器连接到Comcast。域example.net的名称服务器位于远程Debian计算机上,该计算机尚未配置为创建主机或字母别名。
我假设主机名输出中的域名反映了box的dhcp客户端从comcast服务器获得的域名,并反映了该框是该网络上的客户端的想法。是在名称服务器上为example.net创建“字母”主机的解决方案吗?这是否还需要将名称服务器添加到字母的resolv.conf文件中?
发布于 2009-07-16 18:18:12
确保您的/etc/hosts (或NIS)条目是正确的。
我本来想解释一下的,但这篇文章讲得更好了:
THE FQDN
You can't change the FQDN (as returned by hostname --fqdn) or the DNS
domain name (as returned by dnsdomainname) with this command. The FQDN
of the system is the name that the resolver(3) returns for the host
name.
[..]
Therefore it depends on the configuration (usually in /etc/host.conf)
how you can change it. Usually (if the hosts file is parsed before DNS
or NIS) you can change it in /etc/hosts.发布于 2009-07-16 18:18:54
昨天我在处理服务器刷新时遇到了这个问题,而这是别人启动的.主机名-f输出没有正确的结束域(缺少.org)。
# hostname foobar.example.org
# hostname -f
foobar.example
#
# cat /etc/hosts
10.20.11.244 foobar.example foobar解决办法:
主机名-f的域部分似乎来自该主机的/etc/ host条目。在/etc/host中固定主机名之后,主机名-f返回正确的域:
# hostname foobar
# hostname
foobar
# hostname -f
foobar.example.orgYMMV
发布于 2009-07-16 18:44:11
如果您的IP不是静态的,那么/etc/hosts将不会为您工作(或者只暂时工作直到您得到一个新的IP)。我不确定这是否可行,但这里有一些值得尝试的地方:
/etc/resolv.confletters.example.net,我猜您将需要使用某种动态的dns服务,因为这个解决方案是针对非静态IP的。这可能意味着我对你的问题的回答很简单,“是的”。
https://serverfault.com/questions/41729
复制相似问题