JS Ext

Saturday, August 25, 2012

Gmail and a Home SMTP server

All of my computers have ssmtp installed.  This allows any program that uses the 'sendmail' command to send mail via the Gmail SMTP server to work.  I just have to put my Gmail credentials in the /etc/ssmtp/ssmtp.conf file.  Not all software uses the 'sendmail' command, however.  Some programs prefer to talk directly to an SMTP server.  This means I have to configure each program with my Gmail credentials.  I would prefer only having a single location to maintain those credentials, because I do change my Gmail password.  I decided to set up Postfix as my home SMTP server.

With Gentoo, I just run 'emerge postfix'.  Postfix gets installed and ssmtp gets uninstalled (since you can only have one sendmail command).  There is a handy Ubuntu guide on configuring Postfix to forward to Gmail.  There are a few differences in the guide between Ubuntu and Gentoo.  The sasl password file is /etc/postfix/saslpass, not /etc/postfix/sasl_passwd.  The Gentoo Postfix package does not contain a CA certs file.  In Gentoo, there is an app-misc/ca-certificates package that contains the CA certs for every application.  The certs file can be found at /etc/ssl/certs/cacert.org.pem.

From here on out, I can configure ssmtp on all my other computers to forward to my Postfix server.  I can also take my Gmail credentials out of my Jenkins server.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.