Installing and Configuring SSMTP

SSMTP – an alternative to sendmail for sending mail, allows you to configure sending via third-party mail servers.

To install in Ubuntu, use the command:

sudo apt-get install ssmtp mailutils

Next, open the /etc/ssmtp/ssmtp.conf file in any text editor (in the nano, press Ctrl+X to exit, y/n to save or discard changes):

sudo nano /etc/ssmtp/ssmtp.conf

Comment out all and set up as shown below for an example:

If you use Google mail, you will probably need to allow “Untrusted applications” in the settings at

Also open the /etc/ssmtp/revaliases file in the text editor:

sudo nano /etc/ssmtp/revaliases

And add:

Let’s try to send the letter to the specified address (after the command we will type the desired text and put a point for completion):

sendmail -v

Letters must be sent from the address specified in the file /etc/ssmtp/ssmtp.conf.

Leave a comment

Leave a Reply