When I set up the droplet (for lack of an imagination at the time), I set the name to “main”. I have one droplet, so that seemed fairly logical. 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 “127.0.1.1 main.mydomain.com main” and “<myip> main.mydomain.com main” to /etc/hosts. 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…
I’m guessing, but I’m not 100% sure, that’s why when I use the command “echo test message | mail -s test firstname.lastname@example.org” I’m not getting an email at email@example.com (too many emails???). If it isn’t absolutely necessary to have hostnames set up to use exim or sendmail (does anybody know if sendmail is installed by default on Ubuntu LEMP droplets), I’d like to avoid it because its caused me such a headache.
Any help will render me eternally grateful to your apparent awesomeness.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!