Reading feeds as email

From ParabolaWiki
Jump to: navigation, search

This is a very basic guide to get local delivery of feeds to your email inbox using rss2email.


1 Needed packages

Packages you'll need:

# pacman -S rss2email procmail esmtp

Note rss2email can be fetched from fauno's repo. Add a [~fauno] section on your pacman.conf and sync the database.


2 Local delivery to user mailbox

You can configure procmail to deliver email locally on a /var/mail/$user mailbox, for later reading with mail (included on mailx-heirloom from [core]).

# $EDITOR /etc/esmtprc
mda "procmail -d %T"

This system-wide config will make your cron daemon to deliver emails to system users. You'll see a "New mail on /var/mail/$USER" message on your terminals.


3 Local delivery to maildir

Or, to receive feeds as emails on your current inbox (or another maildir), configure procmail to store all emails on it:

File: ~/.esmtprc
mda "procmail -m ~/.procmailrc"


File: ~/.procmailrc
MAILDIR=/path/to/Maildir/
:0
INBOX/ # The mail directory you want
       # trailing slash means Maildir format, otherwise Mbox


Test it by sending an email to you. If no error message or return code was given, check your email client to see if it arrived.

$ echo "This is a test email" | mail -s "Test" $USER


4 Configure rss2email

Rss2email is a python script that retrieves feed posts and sends them to a selected address using SMTP directly or through sendmail. We'll use sendmail (provided by esmtp) to deliver the feeds.

$ r2e new your@address
$ echo "SMTP_SEND = 0" > ~/.rss2email/config.py # Use sendmail
$ r2e add http://feed.url
$ r2e run

You can find an example config file under /usr/share/rss2email/

5 Import newsbeuter's urls

$ sed '/^http/!d;s/ .*//g' ~/.newsbeuter/urls | while read URL; do r2e add "$URL"; r2e run --no-send; done