Tuesday 8 July 2014

howto: send emails from ubuntu server, via gmail, with 2-step verification

I've done this about 10 times over the last few years, and every single time, no matter how hard I try, I always forget something...

Fortunately, there's some nice simple instructions here: http://www.havetheknowhow.com/Configure-the-server/Install-ssmtp.html

While this guide is great, there's two little extra things you will want to check:

  • Are the messages actually being sent? Take a look at /var/log/syslog -- any problems will show up there
  • If you are getting authorization errors, and you know it's the right password -- perhaps you have 2-step verification turned on. In which case, you'll need to create a new application-specific password, and use this in the ssmtp.conf file instead.
Maybe I'll remember next time...
(unlikely)

No comments: