November 11, 2015

Local Emailer, now in v0.9.0

Part 2 of a series introducing what’s new in NodeBB v0.9.0. Other parts of the series:

A common complaint with the v0.8.x series (and prior) was the lack of proper email support for out-of-the-box builds.

Ever since mid-2013, emailers have been written for NodeBB, allowing it to use a third-party email service for topic notifications, daily digests, and password resets. We made the decision to use third-party emailers because it reduced the overall complexity of the emailer code, and reduced the number of dependencies required upon installation.

For example, an equivalent php application requires a system dependency to be installed (e.g. sendmail, postfix, exim4, etc), and although the change would only require amending the installation guide to have sendmail installed, we couldn’t guarantee its installation.

Over time, however, we received numerous complaints that no email was sent on initial installation, simply because no emailer was present upon installation. Secondly, many administrators never found the time to install and set up an emailer, and so many NodeBB installations simply have no email capability.

As of v0.9.0, we have integrated Nodemailer, a fantastic little module that allows NodeBB itself to send emails. The existing plugin structure is unchanged. If you have a third-party emailer, it will continue to work. The only difference is now that if you do not set up any emailer service, NodeBB will send emails on its own, instead of doing nothing at all.

A cause for concern…

Now, of course, the downside with this setup is that your emails may have an increased chance of being marked as spam, as NodeBB is acting as its own SMTP relay, but we personally feel this is a great intermediate solution, and has potential to be expanded upon.

Secondly, some ISPs (typically residential ISPs) block outgoing traffic on port 25, as a form of spam mitigation. This protects both the ISP and the end user if a machine on their network gets compromised and starts sending spam. For the most part, users of NodeBB wouldn’t be running through a residential ISP anyways, but if you are one of the few, consider using a third-party emailer plugin, or starting your own NodeBB on DigitalOcean. Use our referral link and get 2 months of hosting free!

Future Direction

v0.9.0 has a very preliminary implementation of the Nodemailer plugin. We’d like to expand on this implementation by taking advantage of other functionality present, including:

  • DKIM Signing and support for SPF records
    • In order to increase the deliverability of emails
  • Deprecation plaintext emails
    • Currently, all email templates are written in HTML, with a corresponding _plaintext.tpl alongside. This doubles the work and is prone to errors in translation, as the process is manual. If this could be automated in core, we’d cut the number of email templates in half

More Reading

© 2014 – 2023 NodeBB, Inc. — Made in Canada.