I was able to solve the overwriting. Thanks.
But I am having trouble with the mail server being recognized.
I have two servers
example.com on Digital Ocean which works
System hostname host.example.com (127.0.0.1) (on webmin dashboard)
resolv.conf
nameserver 127.0.0.1
nameserver 67.207.67.3
nameserver 67.207.67.2
domain example.com
; Created by cloud-init on instance boot automatically, do not edit
example1.com on AWS Lightsail which does not work
System hostname host.example1.com (34.228.125.xxx) (on webmin dashboard)
resolv.conf
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 34.228.125.xxx
domain ec2.internal
search ec2.internal
I suspect that the I might need “127.0.0.1” instead of “34.228.125.xxx” for the system hostname and need to add “Local hostname” to the Resolution order for example1.com
But I am stumped how to do this or make other needed changes.
Help would be appreciated.