Ssmtp

From gr0x0rd
Revision as of 14:00, 28 November 2016 by Gr0x0rd (talk | contribs) (Created page with "It is likely that you have already configured an application or some type of notifications that send email. However, chances are if those notifications are going to an externa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

It is likely that you have already configured an application or some type of notifications that send email. However, chances are if those notifications are going to an external address, those settings won't work. Likely, Gentoo has pulled in nullmailer for you, which is fine and good- but it doesn't come with a mail transport protocol. For this, we need something like ssmtp.

$ sudo emerge -av ssmtp

After installing, you can configure ssmtp via

$ sudo nano /etc/ssmtp/ssmtp.conf

Of importance here is the mailhub setting. This is the upstream server or smart host your machine will hand mail off to in order to reach external servers. Usually, this is provided by your ISP.

mailhub=<your.isps.smart.host> 

Save the file. Time for a test message!

$ ssmtp <user@domain.com>
Subject: Test Message
This is a test message, you handsome devil.

Press ctrl-d to send the message. Check your inbox externally- likely the message will be in your junk folder, but hopefully you received the message, which should be sufficient for notifications.