<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>smtp — LowEndSpirit</title>
        <link>https://staging.lowendspirit.com/index.php?p=/</link>
        <pubDate>Sat, 11 Apr 2026 07:09:40 +0000</pubDate>
        <language>en</language>
            <description>smtp — LowEndSpirit</description>
    <atom:link href="https://staging.lowendspirit.com/index.php?p=/discussions/tagged/smtp/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Low memory usage SMTP Send-Only</title>
        <link>https://staging.lowendspirit.com/index.php?p=/discussion/3925/low-memory-usage-smtp-send-only</link>
        <pubDate>Mon, 21 Mar 2022 20:13:41 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>mikho</dc:creator>
        <guid isPermaLink="false">3925@/index.php?p=/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://staging.lowendspirit.com/index.php?p=/profile/mikho" rel="nofollow">@mikho</a>, 1 May 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/kl/ovtru2uav7gg.png" alt="image" />
</p>

<p>In the LowEndSpirit, we tend to look for resource-efficient alternatives. Here is an alternative to use instead of Postfix, Sendmail, or Exim.</p>

<p>Often when installing and running a web application or script you need an SMTP server to send an email, rarely there is the need to receive any email. It works equally well using <a rel="nofollow" href="https://linux.die.net/man/8/ssmtp">ssmtp</a>, which also is simple and fast to install. It takes two minutes to install and configure.</p>

<h3>RedHat, CentOS7, Fedora</h3>

<pre><code>yum install ssmtp
</code></pre>

<p>If you receive a <em>“Package ssmtp is not available”</em> error, you’ll need to install EPEL on your machine with the following command:</p>

<pre><code>yum --enablerepo=extras install epel-release
</code></pre>

<p>Once done, you’ll be able to install ssmtp using the above command.</p>

<h2>Ubuntu, Debian</h2>

<pre><code>apt-get install ssmtp
</code></pre>

<p>The configuration is done in the <strong><em>/etc/ssmtp/ssmtp.conf</em></strong> and there is only a couple of settings to change:</p>

<p><em><strong>Mailhub</strong></em><br />
The mail server you must send mail through (relay). In this guide we will use GMail smtp Server.<br />
<strong><em>From Line Override</em></strong><br />
Set to YES to allow the use of others choose from addresses other than the system itself.<br />
<em><strong>AuthUser</strong></em><br />
The username or email adress on the account used to login to gmail.<br />
<strong><em>AuthPass</em></strong><br />
The password for above account<br />
<strong><em>UseSTARTTLS</em></strong><br />
Set to Yes to use TLS when connecting to the SMTP server.</p>

<pre><code>## Config file for sSMTP sendmail
## The person who gets all mail for userids &lt; 1000
# Make this empty to disable rewriting.
root=postmaster
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587
AuthUser=name@gmail.com
AuthPass=YourtopSecretPassw0rd!
UseSTARTTLS=YES 
# Where will the mail seem to come from?
#rewriteDomain= 
# The full hostname
hostname=debianVPS.local 
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: 
addressFromLineOverride=YES
</code></pre>

<p>No reboots required.</p>

<p>To use ssmtp with the PHP <em>mail()</em> function, you have to edit the <em><strong>sendmail&#95;path</strong></em> parameter in <strong><em>php.ini</em></strong> to something like this:</p>

<pre><code>sendmail_path = /usr/sbin/ssmtp -t
</code></pre>

<p>You have no open ports, everything just works!</p>
]]>
        </description>
    </item>
    <item>
        <title>Email notification when someone logs in via SSH</title>
        <link>https://staging.lowendspirit.com/index.php?p=/discussion/3927/email-notification-when-someone-logs-in-via-ssh</link>
        <pubDate>Mon, 03 May 2021 12:00:00 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>mikho</dc:creator>
        <guid isPermaLink="false">3927@/index.php?p=/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://staging.lowendspirit.com/index.php?p=/profile/mikho" rel="nofollow">@mikho</a>, 3 May 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/kl/ovtru2uav7gg.png" alt="image" />
</p>

<p>Even if it is too late when someone else logs in as root on your server, it is good to know that <strong>NOW</strong> is the time to get working on your security.</p>

<p>To setup email notification, login to your server as root.<br />
Edit .bashrc</p>

<pre><code>editor .bashrc
</code></pre>

<p>add the following line at the end, changing “ServerName” to the hostname of your server and “email@thisaddress.com” to your own email address.</p>

<pre><code>echo 'ALERT - Root Shell Access (ServerName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" email@thisaddress.com 
</code></pre>

<hr />

<p><strong>!NOTE!</strong> - Take notice of the &#96; in the code block. Sometimes when copying code from a webpage, these small characters will mess up when pasted.</p>

<hr />

<p>Save and exit your .bashrc.</p>

<p>Next time someone, hopefully you, logs on as root, you will get an email about this.</p>

<p>This can be done for any user, you only have to make sure that the user can email out from your server.</p>

<p>Quick Tip: Use the guide <a rel="nofollow" href="https://lowendspirit.com/low-memory-usage-smtp-send-only/">here</a> to install and configure a Low Resource SMTP Server.</p>
]]>
        </description>
    </item>
    <item>
        <title>Recommendations for SMTP relay</title>
        <link>https://staging.lowendspirit.com/index.php?p=/discussion/664/recommendations-for-smtp-relay</link>
        <pubDate>Sat, 22 Feb 2020 13:04:23 +0000</pubDate>
        <category>General</category>
        <dc:creator>vpsgeek</dc:creator>
        <guid isPermaLink="false">664@/index.php?p=/discussions</guid>
        <description><![CDATA[<p>I am looking for an SMTP relay for a VPS with DirectAdmin in UK from an OVH reseller which hosts a total of 23 personal websites &amp; blogs of friend &amp; family. There is nothing mission critical hosted but would still want to ensure that emails land into inbox because Outlook/MS always marks them spam without any proper reason.</p>

<p>Would like it to be on pay as you go model if possible</p>

<p>Thanks</p>
]]>
        </description>
    </item>
   </channel>
</rss>
