On 2017-08-23 23:23, James Knott wrote:
On 08/23/2017 05:08 PM, Carlos E. R. wrote:
I use NM on the laptop.
My DHCP server, when used, resides on the ISP router and it does not setup the names (it can't); thus the host.domain solving does not work and postfix crashes or complains bitterly failing to post anything.
On other cases the DHCP is not under my control, and of course, fails to set the correct name (or is disabled, depends).
The other DHCP server resides in my Android phone (tethering) and it also fails to set up the names.
Or I can be at home and then NM sets a fixed IP. But not the name.
So in all cases I need to make the FQDN work and match what postfix thinks it is.
Do you not have your own DNS server? In Canada, most people use a firewall/router to connect to their ISP. It hands out NAT addresses and many can also provide DNS. Failing that, it's easy enough to set up a DNS server on Linux.
The router only have a cache DNS that solves internet addresses. There is no connection between the router DHCP and the router DNS, so that it is impossible to ask it for the IP of a local machine. Maybe such a router that hosts a *proper* DNS and DHCP server exists, but none of mine have it. Furthermore, postfix has been told what is the name of the machine it runs in, and it has to be able to learn the IP of that name (local network) - and this doesn't happen from the router DNS server. It has to be handled, somehow, in the machine that it is running in, a laptop, on a different home network than on initial config. Think about that ;-) The only manner I know is writing the name and address line in /etc/hosts. The machine also runs dnsmasq, but the IP/names pairs are configured mainly in the /etc/hosts file as well. So that file has to be edited correctly. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)