• How to enable your server to send emails via sSMTP

    by  • March 29, 2016 • MTA • 0 Comments

    If you have your own web server, it may very well become necessary to be able to send emails from that server to notify you.  This can be tricky, however this is made very simple using sSMTP.  This is targeted more towards Linux-based servers and as far as I know, sSMTP isn’t available for Windows based servers.

    sSMTP is a simple MTA (message transfer agent) that allows you to send emails via an external SMTP server.  This does NOT create an email server on your server and you will need an external email service with SMTP capabilities.  You can either get a paid email account through a hosting company or use a free service, such as Gmail.

    There’s a great setup guide at sSMTP for how to setup sSMTP for Debian.

    Installing sSMTP on Debian-based servers

    If you’re working on a Debian-based server, such as Raspberry Pi’s Raspbian, you can use the following command to install sSMTP:

    Then simply follow the guide at https://wiki.debian.org/sSMTP.

     

    Stopping CRON jobs from sending emails

    After I setup sSMTP on my server and then installed Webmin, I began receiving numerous emails with the subject line Cron <root@osmc> /etc/webmin/bandwidth/rotate.pl.

    I found this post, How to stop email report from Cron <root@machine> (hourly), which might be helpful to your situation, but it didn’t address my issue.

    When I typed in:

    the /etc/webmin/bandwidth/rotate.pl was there, but I couldn’t find it in any of the crontab files, including the /etc/crontab file.
    I then found this post, Where is crontab stored?, which mentions using crontab -e. THIS is where the CRON job was located at. So I appended the following to that cron job line and it fixed it:

     

    About

    I'm a freelance PHP developer spending much of my time deep in WordPress theme and plugin development. My personal info can be found at http://amereservant.com .

    http://myownhomeserver.com

    Leave a Reply