I have added my first Azure server for production use on my domain. Azure assigned a domain name in their DNS, I created a CNAME entry in my domain to forward there. Works great.
When I enter the command hostname --fqdn, I get myvmname.[someuniquechars].bx.internal.cloudapp.net
Now I am using email on the Ubuntu server, and by default, emails are from myuser@[someuniquechars].bx.internal.cloudapp.net
I am using a smarthost to send all email through my corporate email system, and it doesn't forward emails from users on other domains.
I would like to do whatever is proper and acceptable such that when I type hostname --fqdn I see myvmname.mycompany.com And when I send emails, the from address is firstname.lastname@example.org
I'm a little concerned that if I set the domain to mycompany.com that emails to others @mycompany.com will attempt to get delivered here on this box, rather than sent through the corporate smarthost... Perhaps I should abandon linking my corporate email suffix to emails generated on this box, and instead create a working subdomain for this machine, complete with valid MX records etc. So emails sent from a user on this machine would be from email@example.com.
I'm moderately capable in Linux, but not a Linux/Ubuntu wiz. I've done some research but there are several responses I've seen that are either contradictory, or overly simplistic. Some utilize a tool (resolvconf) that worked in 16.04 but is not installed by default in 18.04, perhaps it conflicts with something else? It was all confusing enough to ask this question on the forum.