Add item fetched date header (X-rss2maildir-rundate)
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 14 Sep 2009 11:15:04 +0000 (12:15 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 14 Sep 2009 11:15:04 +0000 (12:15 +0100)
rss2maildir.py

index 4ee2126..482aaaf 100755 (executable)
@@ -742,6 +742,8 @@ def parse_and_deliver(maildir, url, statedir):
         except:
             pass
         msg.add_header("Date", createddate)
+        msg.add_header("X-rss2maildir-rundate", datetime.datetime.now() \
+            .strftime("%a, %e %b %Y %T -0000")
         subj_gen = HTML2Text()
         title = item["title"]
         title = re.sub(u'<', u'&lt;', title)