Simple rss to email service for your feeds on Linux with your/ISP server.

I like couple of blogs and feeds but the problem is that I keep forgetting to run the rss reader and would rather like to have the rss article\’s emailed to me at regular intervals so that I can read them when I want to without having to make sure that I am at my desktop at home computer or remembering to start the rss client. That sounds simple and do-able so lets try to do that.

First off, there is a rss2email application that you would need to install. If you are on fedora, just do

sudo yum install rss2email

Once that is done, just edit the ~/.rss2email/ to specify if you would like to use the sendmail of your system or to use the SMTP server to send the mail.  Here is the config file, how it looks on my system



Now we will configure the feeds that we need to receive the email for. So first add the default email address for the program:

r2e email emailaddress

Now is the turn to add the feeds. You can add the feed using the command:

r2e add <URL>

Once that is done, you are ready to go. Just put \”r2e run\” in cron and you start getting the mail without ever forgetting to read the feed or starting the feed client.

But if you have say like 50 odd feeds, then adding then one by one is 🙁

AWK to our rescue here. Take the opml file from your feedreader or bloglines or any other client, doesn\’t matter.

For simplicity sake, assume the file is named export.opml. Then run the following command on a terminal:

awk -F\’=\’ \'{
if ($3 ~ /xmlUrl/)
if ($4 ~ /xmlUrl/)
if ($5 ~ /xmlUrl/)
}\’ export.opml >ak

This will create a file called ak with the URL\’s in the file but contains the \” and some trailing characters, time to remove them and get a shell script that can add the URL\’s for us. AWK to rescue again:

awk -F\”\”\” \'{print \”r2e add \”$2}\’ ak >ak2

This will generate file called ak2, which you can chmod and run to add all the URL\’s to the rss2email program. You can check the handiwork with

r2e list

And if something goes wrong then you can just delete all the feeds, \”r2e list\” note the last number and do the following:

for i in `seq <number> -1 1`; do r2e delete $i; done

About Amit Agarwal