From ArchWiki
Revision as of 10:49, 19 December 2008 by Chochem (talk | contribs) (+ attachments)
Jump to: navigation, search


If you don't need a full blown mail server, and use Gmail for almost everything, this guide is for you. With SSMTP you can have a quick and easy way to get automated mail off your machine and to a mail hub.

Installation and Setup

To install SSMTP, you can just use Pacman:

pacman -S ssmtp

To configure SSMTP, you will have to edit the following files.

In /etc/ssmtp/ssmtp.conf enter:

Replacing youraccount with your Google username.

Make sure to change the file permissions so that users on your system cannot see your gmail password

 chmod 600 /etc/ssmtp/ssmtp.conf

In /etc/ssmtp/revaliases enter:

And this is it. If you want to test it, you can simply issue at the terminal prompt:

echo test | mail -s "testing ssmtp setup" USERNAME@SOMEDOMAIN.COM

Where USERNAME@SOMEDOMAIN is an address that you can check, or somebody is willing to check for you.

As an alternate method for sending emails, even using a Gmail alias, you can use a text file, using the following syntax:

Subject: Test

This is a test mail.

Save it as, for example, test and then run:

ssmtp < test

Notice that you can use any alias email address you have on Gmail (although it doesn't seem to work with the Hotmail one I have).


This method does not work with attachments. If you need to be able to add attachments, install and configure Mutt and Msmtp and then go see the tip at nixcraft.


SSMTP and Gmail on the Arch forums

Sending Email From Your System with sSMTP