Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

using ssmtp with gmail

I typically don't configure a mail setup on my workstations, but some programs, like darcs, like to be able to send email. Here's how to offload mail sending to gmail with ssmtp, which is a tiny mail MTA.
  1. apt-get install ssmtp
  2. In /etc/ssmtp/ssmtp.conf:
    mailhub=smtp.gmail.com:587
    UseTLS=Yes
    UseSTARTTLS=Yes
    AuthUser=gmail login
    AuthPass=gmail password
    hostname=your hostname
    FromLineOverride=YES
  3. In /etc/ssmtp/revaliases:
    localusername:realemailaddress:smtp.gmail.com:587

Test with "echo hello | mail my@email.address".

(The gotcha is apparently the port number: some sources give a different port and that just makes ssmtp block(?).)
Tags: google, howto
Subscribe

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • jaunty upgrade

    Upgraded to Ubuntu Jaunty. X hung with garbage on the screen after rebooting. Booted into "restore mode" (I forget the exact name), it gave me a…

  • ubuntu summit

    There's an Ubuntu summit going on in Mountain View next week. I'll be there Monday and plan to meet up with someone who's interested in packaging…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 9 comments