When I set up a VPS, I set the name to "main" so both my /etc/hosts and /etc/hostnames files had one entry (that being "main"). So I set up root ssh access and type "hostname" and it gives me "main". Same deal when I type "hostname -f".
Well, I'm trying to set up Exim4 to send mail from my Django app (I only need to send, not receive) and I added the following to
127.0.1.1 main.mydomain.com main <myip> main.mydomain.com main
I then executed
service hostname restart and
hostname -f only returned
main. I even rebooted (something I try to avoid doing) and it still comes back
main. Not sure why this is... The actual files themselves show my new entries but I can't get the actual
hostname -f command to change for the life of me.
I'm guessing, but I'm not 100% sure, that's why when I use the command
echo test message | mail -s test email@example.com I'm not getting an email at
firstname.lastname@example.org (too many emails?). If it isn't absolutely necessary to have hostnames set up to use exim, I'd like to avoid it because its caused me such a headache.
Any help will render me eternally grateful to your awesomeness.