Forward RSS feeds to your email address, community maintained

Overview
Downloads Latest Version License

Getting Started With rss2email

We highly recommend that you watch the rss2email project on GitHub so you can keep up to date with the latest version, bugfixes and features:

https://github.com/rss2email/rss2email

Installing rss2email

Packages

A quick way to get rss2email going is using pre-made packages. There are releases for Debian, Fedora, Gentoo, NetBSD, NixOS, OpenBSD, openSUSE, and Ubuntu.

Installing by hand

Requirements

Before you install rss2email, you'll need to make sure that a few things are in place.

  1. Ensure that a version of Python ≥3.6 is installed.
  2. Install the required Python packages.
  3. Figure out how you are going to send outgoing email. You have two options here: either use an SMTP server or a local sendmail program. So,
    • determine your outgoing email server's SMTP address, or
    • install sendmail (or a compatible replacement like postfix).
Download

Download the latest rss2email source and unpack it. You can choose from several equivalent formats.

  1. A .zip file (suggested for Microsoft Windows users) or .tar.gz file (suggested for everyone else):

    * Navigate to https://github.com/rss2email/rss2email/releases
    * Click either the ``zip`` or ``tar.gz`` icon for the latest release
    * Download and extract the archive
    
  1. A Git checkout (suggested for developers):

    $ git clone git://github.com/rss2email/rss2email.git
    
Install

From the unpacked directory, run:

$ python setup.py install

You can pass all the usual options to the install command, including --user. If you don't want to install rss2email, you can also run r2e directly from the source directory.

Upgrading to a new version

Just repeat the installation procedure for the new source package. If your config file and data file were in the old source directory, move them over to the new source directory. If the config and data files were in another directory (e.g. ~/.config and ~/.local/share), there is no need to move them.

Using rss2email

Create a new feed database to send updates to your email address:

$ r2e new [email protected]

This command will create a configuration file ($XDG_CONFIG_HOME/rss2email.cfg by default) and a feed database ($XDG_DATA_HOME/rss2email.json by default). If you'd rather those files were stored in other locations, use the --config and --data options. XDG_CONFIG_HOME defaults to $HOME/.config and XDG_DATA_HOME defaults to $HOME/.local/share.

You should edit the default configuration file now to adjust rss2email for your local system. Unless you've installed a local sendmail-equivalent, you'll need to edit the SMTP options.

Subscribe to some feeds:

$ r2e add eff https://www.eff.org/rss/updates.xml

That will cause rss2email to notify you when there is a new announcement from the Electronic Frontier Foundation. 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

When a run is made, rss2email stores the list of already seen items for each feed in $HOME/.local/share/rss2email.json.

Customizing rss2email

There are a number of options, described in full in rss2email/config.py, to customize the way rss2email behaves. If you want to change something, edit the configuration file that was created by r2e new.

For example, if you want to receive HTML mail, instead of having entries converted to plain text:

html-mail = True

To be notified every time a post changes, instead of just when it's first posted (see also trust-link and reply-changes, described in rss2email/config.py):

trust-guid = True

And to make the emails look as if they were sent when the item was posted:

date-header = True

If you get an error message Sender domain must exist, add the following to your configuration file:

from = [email protected]
force-from = True

You can make the email address whatever you want, but your mail server requires that the yoursite.com part actually exists.

SMTP

By default, rss2email uses sendmail (or an equivalent) to send outgoing email. If you don't have such a program installed, or simply prefer to use SMTP directly, edit the configuration file and fill in your outgoing email server's details:

[DEFAULT]
...
email-protocol = smtp
smtp-server = smtp.example.net:587
smtp-auth = False
...

If your server requires you to login, change smtp-auth = False to smtp-auth = True and enter your email username and password:

smtp-auth = True
smtp-username = username
smtp-password = password

If your server requires an TLS/SSL connection (SMTPS), change smtp-ssl = False to smtp-ssl = True. If your server does not require a SMTPS connection but you request authentication, rss2email will use STARTTLS to encrypt the connection before sending your login credentials to the server.

Post-processing

rss2email has a mechanism to post-process entries. A post-processor can be used to change the content of each entry before rss2email sends the email out. A hook is added by defining the variable post-process in the config file. It takes two arguments, the module and the function to call. For example:

post-process = rss2email.post_process.prettify process

Examples of built-in post-processors:

  • prettify.py prettifies the HTML content with BeautifulSoup.
  • redirect.py remove redirects on the post URL for privacy or durability.

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 directory, then you would change the Run entry from C:\rss2email\r2e.bat to C:\rss2email\r2e.bat run.

On Unix/Linux systems, you should add a cron job that runs r2e. For example, run r2e every night (at 1:23 am) with:

23 1 * * * r2e run

Development

Community

User discussion and development take place on GitHub. Please feel free to post bug reports, feature requests, comments, and patches. If you do not have a GitHub account and do not wish to acquire one, please come chat in the IRC channel.

There is a developer chat on the Libera IRC server, in the rss2email channel. Feel free to idle.

Tips and tricks

When adding a new test case, it is possible to just add the new input files, and then run the test suite with FORCE_TESTDATA_CREATION=1, and the test suite will automatically generate the output file. Just make sure to check that the output file does match what is wanted before checking it in.

Comments
  • Should rss2email.json be stored in XDG_DATA_HOME?

    Should rss2email.json be stored in XDG_DATA_HOME?

    Hi!

    The current location ~/.local/share/ is a weird place to keep state with regard to to the file hierarchy standard. It's the .local equivalent of /usr/share which is intend for "Architecture-independent" (see /usr/share) "read-only" (see /usr) data. Maybe ~/.local/var/lib/ — "State information. Persistent data modified by programs as they run" (see /var/lib)— is a better place for the current use semantic?

    Best, Sebastian

    opened by hartwork 23
  • option for change User-Agent in http headers

    option for change User-Agent in http headers

    Some sites refuses fetching rss, when user-agent is not known to them. I prepared simple change which allow define "http-user-agent-option" and pass it to parser (diff is against debian version but I think this is no issue)

    needs:code 
    opened by kjonca 20
  • New release with Python 3.9 support?

    New release with Python 3.9 support?

    Hi!

    I learned today that rss2email==3.12.2 with feedparser<6 (with is 5.2.1) does not work with Python 3.9:

    $ r2e add name1 url2 account3
    Traceback (most recent call last):
      File "/usr/lib/python-exec/python3.9/r2e", line 3, in <module>
        import rss2email.main
      File "/usr/lib/python3.9/site-packages/rss2email/main.py", line 34, in <module>
        from . import command as _command
      File "/usr/lib/python3.9/site-packages/rss2email/command.py", line 37, in <module>
        from . import error as _error
      File "/usr/lib/python3.9/site-packages/rss2email/error.py", line 30, in <module>
        import feedparser as _feedparser
      File "/usr/lib/python3.9/site-packages/feedparser.py", line 93, in <module>
        _base64decode = getattr(base64, 'decodebytes', base64.decodestring)
    AttributeError: module 'base64' has no attribute 'decodestring'
    

    Hence it would rock to have a rss2email release that works with more recent feedparser>=6. Are there any plans to make a release off master some time soon?

    Thanks and best

    Sebastian

    PS:

    $ python3.8 -c 'import base64; print(hasattr(base64, "decodestring"))'
    True
    
    $ python3.9 -c 'import base64; print(hasattr(base64, "decodestring"))'
    False
    
    is:bug 
    opened by hartwork 18
  • Lock the datafile at the start, only release at the end

    Lock the datafile at the start, only release at the end

    This PR corrects how the locking works, which caused issues in e.g. https://github.com/rss2email/rss2email/issues/83. The problem is outlined in a comment I wrote there but basically, the desired behaviour is that if there are multiple instances of r2e about, they should take it in turns to run and avoid all running at the same time, possibly mangling the data file or the config file.

    I implement this by acquiring an exclusive lock on the data file right at the start and releasing it right at the end. As far as I can tell, this eliminates the error @ezbik was experiencing, but it's always possible I broke something else subtle.

    Also, there is a branch that only happens if we're not on Solaris...I certainly hope no-one is.

    opened by kaashif 15
  • Add optional multipart/mixed digest format.

    Add optional multipart/mixed digest format.

    The previous format (multipart/digest), was incompatible with many popular e-mail readers (such as gmail), which made it essentially unusable.

    The new format is multipart/mixed, with each part consisting of a single non-digest message (of type text/plain or text/html). One possible incorrectness is that the parts still retain message headers (subject, date, etc.) that are not really used by normal text attachments.

    This is an incompatible change. It looks different, and may break existing digest-post-proc functions.

    opened by squeakbat 14
  • Run tests in development without subprocesses.

    Run tests in development without subprocesses.

    This runs notably faster even with the small number of tests we currently have and can make debugging easier in certain situations.

    However I'd suggest we continue using subprocesses in CI for better isolation. This will ensure that we don't accidentally introduce inter-test state dependence which in my experience is a common cause of false negative situations where tests don't actually test what they're supposed to.

    needs:design 
    opened by ryneeverett 13
  • Regression: basic authentication in URL does not work

    Regression: basic authentication in URL does not work

    % r2e list  | grep netch
    23: [*] netch (https://dottedmag:<redacted password>@netch.dreamwidth.org/data/atom?auth=digest -> [email protected])
    % r2e run --no-send
    processing error: expected bytes-like object, not str: netch (https://dottedmag:<redacted password>@netch.dreamwidth.org/data/atom?auth=digest -> [email protected])
    % r2e --version
    rss2email 3.9
    %
    

    It used to work in an ancient Python 2 version of rss2email.

    is:bug is:upstream blocked 
    opened by dottedmag 13
  • Testing mail chain

    Testing mail chain

    Hi, i am rebuilding my pi with rss2email running bullseye. I installed exim4 and tested to send mail to my hosting proviers with authentication. Sending mail by the mail command did result in a delivered mail in my mailbox.

    Running r2e run seem not to generate mails or are not been distributed by exim4 when i look in the config there is an executable file in /usr/sbin/sendmail (it seems a exim ) root@nms:/home/pi# /usr/sbin/sendmail Exim is a Mail Transfer Agent. It is normally called by Mail User Agents, not directly from a shell command line. Options and/or arguments control what it does when called. For a list of options, see the Exim documentation.

    The question is: does this emulate traditional sendmail and should there be an email in the exim maillog when r2e runns...??

    And, is there a trick i can use to create testmails with r2e and have some debug entrys to check?

    Regards

    Eelco

    opened by edegraaff 12
  • Single-part digest?

    Single-part digest?

    Not all e-mail clients (ahem, mail user agents) display the multipart digest format in a usable way, for example k-9 on android and gmail just show the parts as downloadable attachments.

    It would be nice to have an optional digest format as a single (html or plaintext) body. It can basically look like the concatenation of the digest parts with some separator. Alternatively (the cheap and nasty version), we can just make the message multipart/mixed wrapped around text/html, instead of multipart/digest around message/rfc822 around text/html.

    What do y'all think?

    Since I want this feature, I'll be happy to write the code, obvs.

    opened by squeakbat 12
  • could not connect to mail server smtp.gmail.com cause: server_hostname cannot be an empty string or start with a leading dot.

    could not connect to mail server smtp.gmail.com cause: server_hostname cannot be an empty string or start with a leading dot.

    Hi, I'm facing an issue when I try to run r2e:

    r2e -V run could not connect to mail server smtp.gmail.com cause: server_hostname cannot be an empty string or start with a leading dot. check your config file to confirm that smtp-server and other mail server settings are configured properly

    Could you please help me to fix it? Here is my rss2email.cfg:

    [DEFAULT] from = [email protected] use-8bit = False force-from = False use-publisher-email = False name-format = {feed-title}: {author} to = [email protected] proxy = feed-timeout = 60 active = True digest = False date-header = True date-header-order = modified, issued, created, expired bonus-header = trust-guid = True trust-link = False encodings = US-ASCII, ISO-8859-1, UTF-8, BIG5, ISO-2022-JP post-process = digest-post-process = html-mail = True use-css = False css = h1 { font: 18pt Georgia, "Times New Roman"; } body { font: 12pt Arial; } a:link { font: 12pt Arial; font-weight: bold; color: #0000cc; } blockquote { font-family: monospace; } .header { background: #e0ecff; border-bottom: solid 4px #c3d9ff; padding: 5px; margin-top: 0px; color: red; } .header a { font-size: 20px; text-decoration: none; } .footer { background: #c3d9ff; border-top: solid 4px #c3d9ff; padding: 5px; margin-bottom: 0px; } border: solid 4px #c3d9ff; } margin-left: 5px; margin-right: 5px; } unicode-snob = False links-after-each-paragraph = False body-width = 0 email-protocol = smtp sendmail = /usr/sbin/sendmail smtp-auth = True smtp-username = [email protected] smtp-password = password smtp-server = smtp.gmail.com:587 smtp-ssl = True smtp-ssl-protocol = SSLv3 imap-auth = False imap-username = username imap-password = password imap-server = imap.yourisp.net imap-port = 143 imap-ssl = False imap-mailbox = INBOX verbose = warning

    Thanks in advance for your kind help.

    opened by hista 11
  • URLs line-wrapped and therefore broken when using text format emails

    URLs line-wrapped and therefore broken when using text format emails

    When emails are being sent in text format instead of HTML, links are converted to markdown syntax and then the body of the text is line-wrapped. The line-wrapping doesn't treat links in any special way, which means that links with hyphens in them can get wrapped at the hyphen, thus breaking the link.

    is:bug good first issue has:solution 
    opened by jikamens 11
  • HTTP statuses cleanup

    HTTP statuses cleanup

    Fixes #229 by not attempting to enumerate all non-error statuses explicitly.

    While researching for this fix, I noticed that HTTP status 308 (Moved Permanently) is another form of permanent redirect and corrected the code to include that case. Note that currently feedparser does not handle HTTP status 308 as a redirect, but this will change when (hopefully) https://github.com/kurtmckee/feedparser/pull/326 gets merged and released there.

    In addition, while I was in the area, I added handling of status 410 (Gone) in similar vein to the handling of permanent redirects, by marking the feed as inactive (as suggested in the feedparser documentation).

    opened by amiryal 1
  • 303 HTTP status issue

    303 HTTP status issue

    When using rss2email on https://www.nature.com/nphys.rss I'm getting HTTP 303 errors. Feedparser seems to handle getting the feed content OK, but feed.py raises an error. I'm wondering if this line should be changed to also exclude 303 status.

    Happy to create a PR if needed.

    opened by arunpersaud 3
  • Hardcoded path (main.py) cause the program not usable on Android

    Hardcoded path (main.py) cause the program not usable on Android

    In current master, there is a hardcoded path during program initialisation in main.py

    https://github.com/rss2email/rss2email/blob/4ac56248e81c82affec75e4cef499437e8614208/rss2email/main.py#L186

    (Reproducible with a fresh install on Termux.)

    /tmp should be replaced with tempfile.gettempdir(), because on Android the /tmp is usually not available, result a initialisation failure on hardcoded path.

    opened by flosnvjx 3
  • Is it possible to extract item title and modify it?

    Is it possible to extract item title and modify it?

    Example RSS

    <rss version="2.0">
    <channel>
    <title>My RSS Today</title>
    <link>http://www.example.com/</link>
    <image>
    <url>http://www.example.com/img/myepisodes_logo.jpg</url>
    <title>www.example.com</title>
    <link>http://www.example.com/</link>
    </image>
    <description>
    This is my RSS example!
    </description>
    <language>en-us</language>
    <item>
    <guid isPermaLink="false">123456</guid>
    <title>
    [ rss2email ][ 123 - some more text ][ More text ][ 02-Sep-2022 ]
    </title>
    <link>
    https://www.example.com/weirdsite
    </link>
    <description>
    This is a description for my example
    </description>
    </item>
    <item>
    <guid isPermaLink="false">123456</guid>
    <title>
    [ thisisnotrss2email ][ 5689 - blabla ][blabla ][ 02-Sep-2022 ]
    </title>
    <link>
    https://www.example.com/nicesite
    </link>
    <description>
    More description!
    </description>
    </item>
    </channel>
    </rss>
    

    I would like to extract "rss2email" and "thisisnotrss2email" from the item title and put it the name-format line. Is it possible to capture/split this and put this in the name?

    If this is not possible, would it be possible to put the whole item title (not feed title) as the name?

    opened by EchoDev 1
This Python3 script will monitor Upwork RSS feed and then email you the results.

Upwork RSS Parser This Python3 script will monitor Upwork RSS feed and then email you the results. Table of Contents General Info Technologies Used Fe

Chris 5 Nov 29, 2021
Web service which feeds Navitia with real-time disruptions

Chaos Chaos is the web service which can feed Navitia with real-time disruptions. It can work together with Kirin which can feed Navitia with real-tim

KISIO Digital 7 Jan 7, 2022
Alfred 4 Workflow to search through your maintained/watched/starred GitHub repositories.

Alfred 4 Workflow to search through your maintained/watched/starred GitHub repositories. Setup This workflow requires a number of Python modules. Thes

Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 1 Oct 14, 2022
The next generation Canto RSS daemon

Canto Daemon This is the RSS backend for Canto clients. Canto-curses is the default client at: http://github.com/themoken/canto-curses Requirements De

Jack Miller 155 Dec 28, 2022
You can change your mac address with this program.

1 - Warning! You can use this program with Kali Linux. Therefore if you don't install the Kali Linux. Firstly you need to install Kali Linux. 2 - Star

Mustafa Bahadır Doğrusöz 1 Jun 10, 2022
Enhanced version of blender's bvh add-on with more settings supported. The bvh's rest pose should have the same handedness as the armature while could use a different up/forward definiton.

Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh importer Enhanced bvh exporter Ho

James Zhao 16 Dec 20, 2022
Paintbot - Forward & Inverse Kinematics

PAINTBOT - FORWARD & INVERSE KINEMATICS: Overview: We built a simulation of a RRR robot shown in the figure below. The robot has 3 links and is connec

Alex Lin 1 Oct 21, 2021
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021
A community-driven python bot that aims to be as simple as possible to serve humans with their everyday tasks

JARVIS on Messenger Just A Rather Very Intelligent System, now on Messenger! Messenger is now used by 1.2 billion people every month. With the launch

Swapnil Agarwal 1.3k Jan 7, 2023
This script is written with Python for selling steam community items automatically.

SteamCommunityItemAutoSell Description This script is written with Python for selling steam community items automatically. Install git clone https://g

null 14 Oct 26, 2022
null 1 May 12, 2022
Unofficial Python implementation of the DNMF overlapping community detection algorithm

DNMF Unofficial Python implementation of the Discrete Non-negative Matrix Factorization (DNMF) overlapping community detection algorithm Paper Ye, Fan

Andrej Janchevski 3 Nov 30, 2021
Movie recommend community

README 0. 초록 1) 목적 사용자의 Needs를 기반으로 영화를 추천해주는 커뮤니티 서비스 구현 2) p!ck 서비스란? "pick your taste!" 취향대로 영화 플레이리스트(이하 서비스 내에서의 명칭인 '바스켓'이라 함)를 만들고, 비슷한 취향을 가진

null 2 Dec 8, 2021
A blazing fast mass certificate generator script for the community ⚡

A simple mass certificate generator script for the community ⚡ Source Code · Docs · Raw Script Docs All you need Certificate Design a simple template

Tushar Nankani 24 Jan 3, 2023
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

null 4 Jan 1, 2022
Coinloggr - A learning resource and social platform for the coin collecting community

Coinloggr A learning resource and social platform for the coin collecting commun

John Galiszewski 1 Jan 10, 2022
The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

NHS Digital 50 Dec 22, 2022
Streamlit component to display topics from Streamlit's community forum related to any exception.

streamlit-forum Streamlit component to display topics from Streamlit's community forum related to any exception. Installation pip install streamlit-fo

Snehan Kekre 7 Jul 15, 2022
An integrated library for checking email if it is registered on social media

An integrated library for checking email if it is registered on social media

Sidra ELEzz 13 Dec 8, 2022