sSMTP, a light alternative to postfix or other SMTP server

Ok, so setting up a full sSMTP service on your server is usually overkill, and completely pointless. Especially if your server is simply sending out notification emails of services etc etc.

An alternative to a full SMTP server like postfix is sSMTP

Super simple to setup on a debian based server, first install it (warning, this will override any existing postfix installations you might have, but if you have not got your server sending out emails yet don’t worry about that).

Now configure sSMTP to use an existing mailbox you already have, in this example we will use gmail:

Replace the contents of the conf file with (NB if you keep getting auth issues from google when testing you might need to increase the strength of your password, as issue i had the other day):

That is it, now for a test, first

Then press enter, on the new line enter your email

Now to send the email, ctrl + d

Simple! Your server can now send emails and should automatically work with php’s mail function and basically most other email sending services on your server. Eg Nagios

 

Leave a Reply

Your email address will not be published. Required fields are marked *