You are not logged in.

#1 2018-09-29 02:12:06

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

localhost is not qualified

Hi there guys!

I've got an issue with a Deb 9 installed on a Linode VPS.  I've got a LAMP stack working successfully but I'm unable to do things via localhost.  Setting up sendmail resulted in a warning that "localhost is not qualitifed".

My /etc/hosts:

127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Any idea on what I need to do to resolve this issue?


Schw.im! A social site with an identity crisis.

Offline

#2 2018-09-29 10:15:53

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,228

Re: localhost is not qualified

It most likely means that your host does not have a FQDN configured. There are two ways to go about it: You tell sendmail directly which FQDN to use for email (I don't know how, am a Postfix person myself) or configure the FQDN of the system and hope that Sendmail picks it up.

To set the host and the domain, the FQDN consisting of hostname.domain where $hostname may be something like "straylight" and $domain something like "bunsenlabs.org", that is the FQDN would be straylight.bunsenlabs.org:

hostnamectl set-hostname straylight

Then, in /etc/hosts, enter

$public-ip  straylight.bunsenlabs.org straylight
$public-ipv6  straylight.bunsenlabs.org straylight

for example

195.201.112.220 straylight.bunsenlabs.org straylight
2a01:4f8:1c0c:78ea::1 straylight.bunsenlabs.org straylight

Restart.

hostname --fqdn

should output

straylight.bunsenlabs.org

If you want to use the host as an email server, I strongly suggest that you also configure the reverse DNS names for Ipv4 and IPv6 and disable IPv6 transport in Sendmail (still not well-supported at every site, better to send email over Ipv4 for now).


Im grünen Wald, dort wo die Drossel singt…

Offline

Board footer

Powered by FluxBB