Configuring RSS2Email on Centos

rss2email is a small Python utility that sends out nicely formatted emails from RSS feed postings. Why would you want such a thing? Well, many people still use email as their primary communications tool and don’t want to be bothered with RSS. Also, if you are on the go and are using a mobile device, it is often easier to be buzzed by push email than it is to configure a mobile RSS reader.

We have a help desk system (HelpSpot) that provides an RSS feed from the help desk system’s forums. We’ve configured an internal forum that IT department staff use to let other members know when they are going to be out of the office, etc. The forum system requires a log-in.

Here’s the recipe for configuring rss2email on a Centos 5.x box:

  1. Download rss2email: wget http://www.allthingsrss.com/rss2email/rss2email-2.66.tar.gz
  2. Untar the file: tar xvfz rss2email-2.66.tar.gz
  3. Create a symbolic link to the versioned directory: ln -s rss2email-2.66 r2e
  4. Change into the directory: cd r2e
  5. Once you’re in the r2e directory, you’re ready to configure the software.
  6. Make the script executable: chmod +x ./r2e
  7. Configure an email address that will receive the RSS feeds: ./r2e new EMAILADDR@YOURSERVER.COM
  8. Add a feed URL: ./r2e add http://www.law.emory.edu/index.php?id=470&type=100
    1. This would work fine if the feed is public as in the above example.
    2. If your feed requires a username and password, you need to enter the URL like this:
      1. ./r2e add http://USERNAME:PASSWORD@www.law.emory.edu/index.php?id=470&type=100
    3. Here’s an additional gotcha – if the USERNAME part is itself an email address, then you’ll need to enter the USERNAME like so: USER%40DOMAIN.COM. In other words, you will need to URL encode the @ sign, as the @ sign is being used in another sense above – it’s the separator between the username:password and the name of the site providing the RSS feed. Encode the first @ sign; do not encode the second one. The complete command will then look like: ./r2e add http://USERNAME%40DOMAIN.COM:PASSWORD@feedserverurl.com
  9. Each time you do ./r2e add RSSURL, it will add a new entry to the list of URLs that will be checked for RSS feeds. To see the list of feeds, do ./r2e list. You’ll get back a list of feeds to which the program is subscribed. Each feed will have a number beside it. To delete a feed, do ./r2e delete FEEDNUMBER. Once the feed is deleted, you’ll receive a warning that the feed numbering has changed. Do ‘./r2e list‘ again to see the current feed numbering.
  10. Once you’re satisfied that you have properly configured your feeds, you will want to automate the service. Here’s one way to do that:
    1. Edit your crontab file: crontab -e
    2. Add the following line to run r2e every five minutes: */5 * * * * (cd /DIRECTORYWITHCODE/r2e;/DIRECTORYWITHCODE/r2e/r2e -run)
Reblog this post [with Zemanta]
Advertisements

2 thoughts on “Configuring RSS2Email on Centos

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s