We highly recommend that you subscribe to the rss2email project feed so you can keep up to date with the latest version, bugfixes and features: http://feeds.feedburner.com/allthingsrss/hJBr
Instructions for Windows Users
Instructions for UNIX (Linux, Mac OS X, BSD and CentOS) Users
Customizing rss2email
Instructions for Windows Users
Requirements
Before you install rss2email, you’ll need to make sure that a few things are in place. First, is that a version of Python 2.x installed. Second, determine your outgoing email server’s address. That should be all you need.
Download
- Create a new folder
- Download the latest rss2email .ZIP file and unzip to the new folder
Configure
Copy the provided config.py.example file to config.py and fill in your outoing email server’s details. If your server requires you to login, change "AUTHREQUIRED = 0" to "AUTHREQUIRED = 1" and enter your email username and password.
Install
From the command line, change to the folder you created. Now create a new feed database to send updates to your email address:
r2e new you@yourdomain.com
Subscribe to some feeds:
r2e add http://feeds.feedburner.com/allthingsrss/hJBr
That’s the feed to be notified when there’s a new version of rss2email. Repeat this for each feed you want to subscribe to.
When you run rss2email, it emails you about every story it hasn’t seen before. But the first time you run it, that will be every story. To avoid this, you can ask rss2email not to send you any stories the first time you run it:
r2e run --no-send
Then later, you can ask it to email you new stories:
r2e run
If you get an error message “Sender domain must exist”, add a line to config.py like this:
DEFAULT_FROM = rss2email@yoursite.com
You can make the email address whatever you want, but your mail server requires that the yoursite.com part actually exists.
Automating rss2email
More than likely you will want rss2email to run automatically at a regular interval. Under Windows this is can be easily accomplished using the Windows Task Scheduler. This site has a nice tutorial on it. Just select r2e.bat as the program to run. Once you’ve created the task, double click on it in the task list and change the Run entry so that “run” comes after r2e.bat. For example, if you installed rss2email in the C:\rss2email folder, then you would change the Run entry from “C:\rss2email\r2e.bat” to “C:\rss2email\r2e.bat run”.
Your help with rss2email commands, just run r2e help or just r2e.
Now jump down to the section on customizing rss2email to your needs.
Upgrading to a new version
Simply replace all of the files from the .ZIP package to your install directory EXCEPT config.py
Instructions for UNIX/Linux Users
Requirements
Before you install rss2email, you’ll need to make sure that a few things are in place. First, is a version of Python 2.x installed. Second, is whether you have sendmail (or a compatible replacement like postfix) installed. If sendmail isn’t installed, determine your outgoing email server’s address. That should be all you need.
Download
A quick way to get rss2email going is using pre-made packages. Here are releases for Debian Linux, Ubuntu Linux and NetBSD.
If you are unable to use these packages or you want the latest and greatest version, here’s what you do:
Unarchive (probably 'tar -xzf') the rss2email .tar.gz package to [folder where you want rss2email files to live]cd [yourfolder]
chmod +x r2e
cp config.py.example config.py
Install
Create a new feed database with your target email address:
./r2e new you@yourdomain.com
Subscribe to some feeds:
./r2e add http://feeds.feedburner.com/allthingsrss/hJBr
That’s the feed to be notified when there’s a new version of rss2email. Repeat this for each feed you want to subscribe to.
When you run rss2email, it emails you about every story it hasn’t seen before. But the first time you run it, that will be every story. To avoid this, you can ask rss2email not to send you any stories the first time you run it:
./r2e run --no-send
Then later, you can ask it to email you new stories:
./r2e run
You probably want to set things up so that this command is run repeatedly. (One good way is via a cron job.)
If you get an error message “Sender domain must exist”, add a line to config.py like this:
DEFAULT_FROM = rss2email@yoursite.com
You can make the email address whatever you want, but your mail server requires that the yoursite.com part actually exists.
Your help with rss2email commands, just run r2e help or just r2e.
Upgrading to a new version
Simply replace all of the files from the .tar.gz package to your install directory EXCEPT config.py
Customize rss2email
There are a number of options, described in full in the provided config.py.example file and at the top of rss2email.py file, to customize the way rss2email behaves. If you want to change something, edit the config.py file. If you’re not using rss2email under Windows, you’ll have to create this file if it doesn’t already exist.
For example, if you want to receive HTML mail, instead of having entries converted to plain text:
HTML_MAIL = 1
To be notified every time a post changes, instead of just when it’s first posted:
TRUST_GUID = 0
And to make the emails look as if they were sent when the item was posted:
DATE_HEADER = 1

how does the config.py file get read?
I put it in ~/.rss2email/config.py but it is ignored by the script.
@foobar:
IFAIK, config.py is read from the same directory as rss2email.py. If you want to keep the file in your home directory – as I do – you may need to put a symlink to it from the /usr/share/rss2email directory.
I don’t think rss2email supports per-user configs (yet?).
Thank you for this wonderful tool. Now I can keep myself updated by simply carrying my mobile phone with a pushmail facility.
It would be helpful if there were an option to post x number of items on each run.
Sometimes the RSS feed has too many items, and I only want 1 or 2 to be emailed every couple of items.
I don’t care if I miss a few.
every couple of hours* (not items)
I’d like to receive craigslist RSS feeds, but I get a parsing error when I try to use one. For example, I want to watch Indianapolis gigs photographer and I am given this URL:
http://indianapolis.craigslist.org/search/?areaID=45&subAreaID=&query=photographer&catAbb=ggg&format=rss
I get this result from a run I know that I still have an SMTP issue):
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Rick>cd\rss2email
C:\RSS2Email>r2e run
=== rss2email encountered a problem with this feed ===
=== See the rss2email FAQ at http://www.allthingsrss.com/rss2email/ for assistan
ce ===
=== If this occurs repeatedly, send this to lindsey@allthingsrss.com ===
E: could not parse http://indianapolis.craigslist.org/search/ccc?query=photograp
her&catAbb=ggg&srchType=A&format=rss
Traceback (most recent call last):
File “rss2email.py”, line 725, in run
smtpserver = send(fromhdr, tohdr, subjecthdr, content, contenttype, extrahea
ders, smtpserver)
File “rss2email.py”, line 199, in send
smtpserver.sendmail(sender, recipient, msg_as_string)
File “C:\RSS2Email\lib\smtplib.py”, line 698, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (530, ‘authentication required – for help go to http://help.y
ahoo.com/sbc/dsl/mail/pop/pop-11.html’, u’”craigslist indianapolis | all gigs se
arch \\”photographer\\”" ‘)
rss2email 2.68
feedparser 4.2-pre–svn
html2text 2.37
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
=== END HERE ===
C:\RSS2Email>
Rick:
Delete the feed and add it again, but put the URL in quotes:
r2e add “http://indianapolis.craigslist.org/search/?areaID=45&subAreaID=&query=photographer&catAbb=ggg&format=rss”
Does the program run once then die or does it run until you kill it? If the former, is there a way to keep it running?
It runs once. People usually use a scheduler like cron to run it periodically.
Just a short question: Is there an option to add predefined text as some sort of introduction or address? I have only found the additional headers option which does not help with the task at hand. I might even be able to add some hardwired text to the main script on my own, but that would make updates a permanent predetermined breaking point. So no solution, either.
Apart from that your software seems to be the missing piece of my puzzle. Thank you very much
Just a note- this application works great under Mac OS X. You might want to change the front page to mention that UNIX rather than just linux.
Hello – just came across your script – looks really good!
I’m having an issue (Unix) when I run ./r2e new from command line – it’s spitting back a syntax error (I am including my email address at the end of the line) – it says “File rss2email.py Line 759…syntax error” – any ideas what I might be doing wrong? Thanks in advance!
@at: that’s an idea I’ll consider for a future version.
Jon: Good to know!
John,
Can you email me the full output of r2e and your OS and Python version details?
Great application, thank you!
Maybe you could write in this page that ‘r2e help’ outputs a help text
Good idea!
In order to make it easier to run r2e from the Linux CLI, I created a bash alias in my .bashrc file. Basically, it mimics the contents of “./r2e” script but adds in full paths so I can run it from any directory and without the “./” in front.
alias r2e=’/home/celsius1414/bin/rss2email/rss2email.py /home/celsius1414/bin/rss2email/feeds.dat $*’
im new to this python thingy
can someone teach me on how to do this rss2email work even change directory in python i dont know. i have lots of error saying
>>> r2e new mypersonal@gmail.com
SyntaxError: invalid syntax
>>> r2e.bat new mypersonal@gmail.com
SyntaxError: invalid syntax
and its pointing at NEW.
pls help people im to noob
You don’t run rss2email from inside the Python shell. r2e is a script that you run from the command line that calls Python for you. See the Getting Started section.
same error when i used command line also huhuhuh
Are you using Windows or UNIX?
The Python executable needs to be in your PATH and you run r2e from whatever folder you put rss2email in. r2e needs to be able to find python in the PATH.
hi Lindsey,
first off, thanks a lot for rss2email. I had a need for something like that today and it seems to be doing what it says on the box pretty nicely. I also like its overall feel!
Here are a few comments based on my 30 minutes of using it:
1. It would be nice to have the option to selectively enable or disable the X-RSS-* headers that get added for the simple reason that the URL might contain and htusername/password which you don’t particularly want stored on a dozen mail servers and hosted inboxes. I’ve solved that by commenting out the offending entries in rss2email.py. At the very least warn people in the README about this behaviour as they may not actually notice in immediately.
2. [related to 1]: It would be useful if rss2email also accepted local XML files in addition to feed URLs. This way other tools such as curl, etc. could be used to handle any authentication securely (or even pre-process the RSS articles) before having any entries emailed.
3. I realise this may seem to defeat the purpose of rss2email, but it would be nice if there was also the option to have it mail all items in a feed, always. This can now be accomplished by calling r2e reset first though that would reset everything i’d imagine. It would probably be sufficient to optionally be able to give the reset command a feed number to operate on.
I’m currently using it to supplement a password-protected, self-hosted mytinytodo list tracker which currently lacks the ability to send daily todo reminders. I would like to always see all entries in the todo list, not just new ones obviously. However, I do plan on also using rss2email the more traditional way so would rather not reset all articles in all tracked feeds.
4. Assuming any of these things bug me sufficiently to do something about them AND I find the time in which to do it, do you accept patches or code contributions of any sort?
Apologies for the rather lengthy comment, it comes with no expectations of course
thanks again!
rw
RW,
On #2, rss2email does support local files. I do exactly what you described in my own daily use.
On #4 as they relate to #1 and #3, I usually accept patches if they can safely be integrated without unintended consequences. However my time is pretty limited, so it may go kind of slowly.
Hello Lindsey,
is there an option to send all rss news items from a single r2e run (or per site, per run) in a single mail in “digest” mode? I don’t want to get my INBOX swamped with separate news messages, but a single mail per site with all messages as MIME attachments would work very nicely.
If you know of any workarounds to achieve this, that would of course be very helpful too. I’m thinking of procmail/formail, but that unpacks mime messages into separate messages, not the reverse.
Adding digest mode is definitely on the to-do list, but it would be a lot of work to complete to the level that I expect rss2email to function at. There are 3 types of emails it can compose and special cases to handle, so I just haven’t been able to implement it yet.
Is there support for HTTPS feeds currently? I tried to add one, but I’m getting a 404 error, however pasting the same URL into a browser works fine.
Nevermind, my fault, forgot to escape the ampersands in the URL when doing the add command.
I have a tiny change request about the mail format.
I use vi as a pager through mutt to view my mails and hit a hot key on the URL to open it in an external browser.
If the URL at the bottom of generated mail starts in column 1, it will be easy to reach by just hitting G in vi. Currently it is preceded by “URL: ” which requires additional keystrokes to reach the URL.
Sometimes the mail arrives full of strange symbols (smiling faces for instance), especially (but not only) if the post includes some pdf attached file. I played with the CHARSET_LIST in config.py, but with no success.
Another point: would it be possible that videos embedded in the post were embedded also in the email or at least a link to them appeared?
@carlo: can you send me the feed that sometimes includes symbols? haven’t heard of that happening before.
I want the second thing myself. Unfortunately, video embeds are probably not possible. Between the feed itself, sanitizing potentially malicious HTML and how mail clients might handle embedded video they don’t make it through.
I’m new to this, but is it possible to deliver the mail through some MDA? I want to view rss within mutt, but I don’t want the feed to be sent from my machine to my mail server and back again. I want it to be processed by something like procmail. Is that possible?
Lindsey, I received wingdings for instance in the email with your post about version 2.71 release. It happens also with other feeds. Sometimes the whole feed arrives as wingdings, and some other times only a part (especially the beginning). Any idea what the problem is?
I upgraded to the new 2.71 version, but the problem persists.
Let me express another suggestion: when a feed is added with r2e add, why doesn’t it respond with its number in the list? It could be useful to build a script that automates the run –no-send thing.
Anyway, thank you for the nice program and for you attention!
Carlo: could you forward a few of those emails to me at lindsey.smith at gmail.com
I tried to follow all of the instructions in the tutorial, but when I got to the end and typed “r2e run”, nothing happened. I put it in verbose mode, and tried again, and got no output. Any help would be appreciated.
Other information:
SMTP: ‘smtp.gmail.com’
OS: Debian Linux (Squeeze)
Python: (Whatever version is the latest one)
Nothing happened as in you didn’t get any emails but you didn’t see any errors messages either? Did you add any feeds before?
Hey,
Great script… does exactly what I need except for one thing that I’ve been trying to do. I need it to collate all the feeds collected into one email. Is there any setting for this or do I have to go from scratch? Also if someone could point me in the right direction
Thanks
David,
That’s usually referred to as “digest mode” and would send you one email per feed with new items. It’s on the roadmap and one day we’ll get it done.
Lindsey
Great job. Thanks very much for this, rss2email is awesome!
hi all,
I use the html2txt version. How to remove the txt email the attachment links and the attachment number in the e-mail?
ex:
[!1[][1]][2]
content
!1[][3]
[1]: http://1.bp.blogspot.com/-zO78YMkZPb8/TckM6LaheLI/AAAAAAAAAk0/0cj_Qpt9bY/s320/2011-05-08-164948_1280x1024_scrot.png
[2]: http://1.bp.blogspot.com/-zO78YMkZPb8/TckM6LaheLI/AAAAAAAAAk0/0cYj_Qt9bY/s1600/2011-05-08-164948_1280x1024_scrot.png
[3]: https://blogger.googleusercontent.com/tracker/449087425119662422-2165004094054538138?l=tiborq.blogspot.com
URL: http://tiborq.blogspot.com/2011/05/kommentelve-cim-keppel.html
thank you all
Hi!
I need help for configuring the config.py, my configuration is
SMTP_SEND=1
SMTP_SERVER=”smtp.gmail.com:465″
AUTHREQUIRED= 1
SMTP_USER=”USER@gmail.com”
SMTP_PASS=”pass”
SMTP_SSL=1
But not run when I execute r2e run, I have a error that sais
Fatal error: could not connect to mail server “smtp.gmail.com:465″ , check your config.py
My OS is a Windows XP sp3, and I see the configuration smtp for gmail, when it explain for gmail smtp the port ssl is 465.
Please, Help me! thanks for all.
Try removing “:465″ and just using “smtp.gmail.com” for SMTP_SERVER.
[...] it from here. You might have to install some additional software to make it run. Read complete instructions here. Once your setup is ready you, you will have to add the feed and then configure to which email id [...]
Add filters by title, please!
It is necessary to be able to filter the news by rss!
Thanks…
And make the possibility of sending messages from different e-mail!
Thanks…
Daniel: different email addresses per feed is already supported
r2e add feedurl [emailaddress]daniel: this is beyond the scope of rss2email and should be handling on the email receiving end. rss2email includes extra headers with feed url and other information making it very easy to filter and route incoming entries in a milter such as procmail or within your email client.
I installed Python 3.2.1 and rss2email 2.7.1 for Windows XP. I added the Python directory to PATH and get this error when I try to create a new database:
c:\rss2email>r2e new angel@ub.edu
File “rss2email.py”, line 191
except Exception, e:
^
SyntaxError: invalid syntax
Thanks a lot.
Works with Python 2.7. Thanks.
I’m sorry. The database was created OK and also added some RSS feeds. But I get this error when run r2e, also with –no-send parameter. Thanks.
W: feed [1] “http://www.3cat24.cat/rss/not_notportada_rss.xml” timed out
W: feed [2] “http://bloctic.ub.edu/feed” timed out
W: Se produjo un error durante el intento de conexi¾n ya que la parte conectada
no respondi¾ adecuadamente tras un periodo de tiempo, o bien se produjo un error
en la conexi¾n establecida ya que el host conectado no ha podido responder [3]
http://feeds.feedburner.com/allthingsrss/hJBr