X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/52830641556fa8f0423677b9d48b35ea54b4f9bf..ea9637da6215483da6f4ad236a4291dbad6bd698:/rss2maildir.py?ds=sidebyside diff --git a/rss2maildir.py b/rss2maildir.py index 4ee2126..a1e8819 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -39,7 +39,11 @@ from optparse import OptionParser from ConfigParser import SafeConfigParser from base64 import b64encode -import md5 + +if sys.version_info[0] == 2 and sys.version_info[1] >= 6: + import hashlib as md5 +else: + import md5 import cgi import dbm @@ -742,6 +746,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'<', title)