David Wright <[email protected]> wrote:
> On Wed 30 Sep 2026 at 14:40:55 (+0100), Chris Green wrote:
> > Marco Moock <[email protected]> wrote:
> > > Am 30.09.26 um 14:50 schrieb Chris Green:
> > > > I don't think setting /etc/hostname to the FQDN is correct as, if you do
> > > > that, then 'hostname' returns the FQDN and it should only return the
> > > > host's name without the domain.
> > >
> > > I did it that way (FQDN in /etc/hostname), as some milters required me
> > > to do so.
> > >
> > > hostname -s give you the short name without the domain, -d gives the
> > > domain name.
> > >
> > That does seem to be the 'least bad' way to do it but I'll have to check
> > that 'hostname' returning the FQDN doesn't break anything.
>
> I can't see anything in your three posts that states the effect(s)
> that's required, but does not occur, on your machine.
>
> IIRC the 127.0.1.1 entry ensures that a host can resolve its own name
> when the network is not up, but without interference from localhost.
>
I want the ypdomainname and domainname commands to return my domain's
name. I also want things like postfix to be able to find the domain. I
discovered this issue when I found that postfix was using 'localdomain':-
chris$ postmap -s /etc/aliases.db
postmap: fatal: open database /etc/aliases.db.db: No such file or directory
chris$ postmap -s /etc/aliases
@ @
YP_LAST_MODIFIED 1786971981
YP_MASTER_NAME q957.localdomain
postmaster root
root chris
chris$
--
Chris Green
ยท