[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Second time on hostname



On Mon, 11 Jul 2005 06:27:36 -0400, Haines Brown wrote:
> I changed /etc/hostname simply to the local hostname because I was
> informed that it is the debian way. Doing so and rebooting seems to
> have worked.


Either way is possible, but the Debian installer and Debian
documentation are written under the assumption that the
hostname is not a FQDN.


> I found out how to tell postfix to deal with a simple local hostname
> (run the command # postconf -e myhostname=<FQDN>). It seems to be
> working.


Good!


> The only thing that still bothers me is my /etc/hosts, perhaps only
> because I sense I can clean it up a bit. I'm configured to be a host
> on a local network, although I'm not actually running a network
> now. You seem to be saying I could well remove the FQDN from the
> loopback:
> 
>   127.0.0.1 	localhost localhost.localdoman teufel.hartford-hwp.com
>   192.168.1.1	teufel teufel.localdomain


In general you should have the more qualified names to the left of
the less qualified ones.  Thus "192.168.1.1 teufel.<domain> teufel".
You do not need 'teufel.localdomain' at all.


> I was told to use instead:
> 
>   127.0.0.1 localhost.localdomain localhost
>   127.0.1.1 teufel.hartford-hwp.com teufel
> 
> but that definitely does not work (can't send mail), so using the
> first configuration, which at least works. What in it could be
> simpler or more standard?


If you have an IP address 192.168.1.1 then use that instead of
127.0.1.1.

    127.0.0.1 localhost.localdomain localhost
    192.168.1.1 teufel.hartford-hwp.com teufel

If that does not work then some _other_ program is misconfigured.

Perhaps it will help if I show you my configuration files.
These are on an Ubuntu system but that should not make any
difference. This is a laptop system that is usually configured
using DHCP.  When I move from one location to another I change
"relayhost" in /etc/postfix/main.cf to a different value.


jdthood@turmeric:~$ cat /etc/hostname
turmeric
jdthood@turmeric:~$ cat /etc/mailname
aglu.demon.nl
jdthood@turmeric:~$ cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost
127.0.1.1       turmeric

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
jdthood@turmeric:~$ cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myhostname = aglu.demon.nl
myorigin = /etc/mailname
#mydestination: List of domains delivered via $local_transport
relayhost = mailhost1.tuhugft.nl
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
defer_transports =
disable_dns_lookups = yes

-- 
Thomas Hood





Reply to: