rss2email

From wiki

rss2email is a program that allows you to receive RSS/Atom feeds in you mailbox.

Prerequisite

You need a server that is able to send emails.

Install

# apt install rss2email

Configure

Create User

It is possible to run rss2email as any user. However I find preferable to make it run as it's own user as, if a hacker manage to break in your rss2email, he won't be able to read your personal user files.

# adduser --system --home /opt/rss2email --group rss2email
Adding system user `rss2email' (UID 112) ...
Adding new group `rss2email' (GID 117) ...
Adding new user `rss2email' (UID 112) with group `rss2email' ...
Creating home directory `/opt/rss2email' ...

Assuming that you are the only user of rss2email on the server, we will make it always run as the rss2email user. Create file /usr/local/bin/r2e

#!/bin/sh
sudo -u rss2email /usr/bin/r2e "$@"

and make it executable

# chmod +x /usr/local/bin/r2e

To make things even easier, you can run visudo and add the line (replace jdoe with your usename)

jdoe ALL=(rss2email)NOPASSWD:/usr/bin/r2e

This allows your normal user to run the r2e command without any password prompt.

Create database

$ r2e new

Configuration option

Edit file /opt/rss2email/.config/rss2email.cfg and change the following options

[DEFAULT]
from = rss2email@example.org
use-8bit = True
date-header = True
html-mail = True
use-css = True
css = body {
	font: 12pt Arial;
	background-color: #FAFAFA;
	}
	div#entry {
	padding: 1em;
	background-color: white;
	box-shadow: 0 0 3px rgba(0,0,0,0.3);
	border-radius: 5px;
	}
	div#entry h1.header {
	margin-top: 0;
	font: 18pt Georgia, "Times New Roman";
	}
	div#entry a {
	text-decoration: none;
	color: #005EB8;
	}
	div#entry a:hover {
	color: #00A9E0;
	}
	div#entry blockquote {
	font-family: monospace;
	}
	img {
	max-width: 100%;
	height: auto;
	}
	div#entry .footer {
	margin-top: 2em;
	}
	div#entry .footer,
	div#entry .footer a {
	color: #AAAAAA;
	}
	div#entry .footer a:hover {
	text-decoration: underline;
	}
	div#entry .footer p {
	margin: 0;
	}

Cron

Make rss2email run once by hour by adding the following line in /etc/crontab

55  *   *   *   *   rss2email  /usr/bin/r2e run