By streverett
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 “sendmail@mydomain.com” 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?
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!
That looks too messy and can cause you problems as gmail has a limit of email send this way. try using mandrillapp.com is pretty easy and free for 12k mails a month.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.