Open daniel-nelson opened 12 years ago
One small thing: the ssmtp recipe readme lists includes
mailhub=smtp.sendgrid.com:587
It should be .net, not .com. A minor change, but one that might save someone a few minutes.
It would also be helpful to indicate on this page which error logs to check for email problems, and to make sure that /var/log/nginx/passenger.log is included. Initially, one kind of error was logged to /var/log/mail.log, but after I resolved that, I wasn't seeing any errors there or in syslog. There was an error in /data/appname/shared/log/production.log, but all it said was "500 Internal Server Error", which wasn't very helpful. It was only after opening a support ticket, wherein EY staff indicated that there were sendmail errors in /var/log/nginx/passenger.log, that I finally had the information I needed to google a solution.
From a non sys-admin perspective, it is hard to know where to look to debug problems when the data can be logged to so many places, and in so many ways. The original errors I was seeing were logged as "sSMTP" errors, so I was focusing on looking for that, but the final message was logged as "sendmail" errors.
In case anyone else reaches this via google and has the same problem: the error was "sendmail: recipients with -t option not supported", and the solution is to add "config.action_mailer.sendmail_settings = {:arguments => '-i'}" to production.rb (courtesy of https://rails.lighthouseapp.com/projects/8994/tickets/6156-rails-3-sendmail-with-ssmtp-recipients-with-t-option-not-supported).
After following the instructions at http://docs.engineyard.com/setup-ssmtp-for-mail-relay-to-authsmtp.html, I stopped and rebooted my app, only to find the ssmtp.conf file had been restored to its default settings. I was subsequently informed in a support ticket that I should be using the ssmtp chef recipe (https://github.com/engineyard/ey-cloud-recipes/tree/master/cookbooks/ssmtp).
Given this, it seems to me that the documentation at http://docs.engineyard.com/setup-ssmtp-for-mail-relay-to-authsmtp.html should be replaced with instructions to use the ssmtp chef recipe.