Re: email lacks sender address (SOLVED)
On Sun, 8 May 2022 19:42:57 -0500
David Wright <deblis@lionunicorn.co.uk> wrote:
> I'm really not sure who, and under what circumstances,
> hostnamectl is for.
Nor am I, especially after this. According to apt-file, it is in the
package systemd.
> I ran:
>
> # hostnamectl set-hostname acerx
>
> and /etc/hostname was changed, but not /etc/hosts, which still had:
>
> 127.0.1.1 acer.corp acer
I confirm this. I guess I missed it due to rarely referring to a
computer by its hostname, but instead by localhost. Sigh. Thanks for
the catch. It looks like I shall have to adjust my installation scripts.
>
> and also not /etc/mailname. I'm not saying it should have affected
> those occurrences, but that it's better to check you have the
> correct, consistent name throughout the system.
Odd. On the two boxes I used hostnamectl on, mailname is set correctly.
However, I ran it on installation, and may have fixed that manually
(but there's no backup file), or by installing postfix subsequently.
>
> It's also not clear to me either, where one might insert this command
> so that it takes effect early enough to avoid polluting the system
> with wrong names. (The logs, for one example.)
I run it in a script that I run manually immediately after installation.
>
> > > Whats I didn't check was what my router took to be my host name.
> > > It did not reponse to my changed host name and I had to do it
> > > manually in the router. Doing do seems to have solved my problem.
> > >
>
> It would seem then that you were letting DHCP in the router set your
> hostname as well as the usual IP address, nameservers etc, which
> could be unfortunate if it doesn't agree. How you avoid that depends
> ….
Yup. However I make sure they agree by assigning most hosts a "host"
statement in dhcpd.conf, and assigning a fixed IP address to a given MAC
address, and then having dhcpd feed that to bind9.
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
Reply to: