Confused about setting up FQDN on Ubuntu 16.04 for outgoing mail server (exim)

I’m trying to follow this tutorial on setting up exim but for Ubuntu 16.04. I’m stuck on setting up the FQDN.

If I run hostname -f the result is mytime4caregivers. My DNS for this server is set up to host the site at Does that mean my FQDN should be

Here’s my setup and what I’m trying to do:

  • I’m hosting a Wordpress website
  • I’m using Mailgun for incoming messages
  • I only want to set up outgoing mail on the server so that I can receive messages from the server and so that Wordpress can do things like send out password reset emails, etc.
  • I’m using Ubuntu 16.04, nginx, and PHP7

I think I should be updating /etc/hostname and /etc/hosts with the correct information, but I’m not sure what that should be. None of the tutorials that I’ve found seem to offer clear guidance. Thanks!

P.S. Here is my zone file per the DO DNS setup:

$TTL 1800 IN SOA 1474757364 10800 3600 604800 1800 1800 IN NS 1800 IN NS 1800 IN NS 1800 IN A 1800 IN CNAME 1800 IN MX 10 1800 IN MX 10 1800 IN TXT v=spf1 ~all 1800 IN TXT "k=rsa; p=..." 1800 IN A
Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

This question was answered by @ryanpq:

If you want to send email from accounts like then your FQDN would be You may want to update the hostname on your droplet to be the FQDN instead of the name mytime4caregivers, doing this in the control panel as well as your OS will make sure that your PTR (Reverse DNS) record for is also set up for your droplet’s IP.

View the original comment