How to Correctly Configure /etc/hosts for sendmail
I'm trying to set up a sendmail instance on my droplet that will be able to forward any emails sent from my web app/website/terminal/etc over to my Google Apps account. I've followed this tutorial (with slight modifications) so my Gmail user "firstname.lastname@example.org" will relay any emails sent from the web app to the gmail account.
Any time I try and test sendmail in this way, however, I get the error:
mail: cannot send message: Process exited with a non-zero status
I'm pretty sure this is because my /etc/hosts file is set up incorrectly; currently, it looks like this:
127.0.0.1 mydomain.com localhost.localdomain localhost 127.0.1.1 localhost.mydomain.com mydomain.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
What should be changed?