summaryrefslogtreecommitdiff
path: root/loader/lib
diff options
context:
space:
mode:
Diffstat (limited to 'loader/lib')
-rw-r--r--loader/lib/parser.py1
-rw-r--r--loader/lib/storage.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/loader/lib/parser.py b/loader/lib/parser.py
index 258cc2b..670a70c 100644
--- a/loader/lib/parser.py
+++ b/loader/lib/parser.py
@@ -18,6 +18,7 @@ class ArchivesParser(object):
def parse(self, stream):
self.msg = self.parser.parse(stream)
+ self.rawtxt = unicode(self.msg)
def is_msgid(self, msgid):
# Look for a specific messageid. This means we might parse it twice,
diff --git a/loader/lib/storage.py b/loader/lib/storage.py
index ab25793..1a34b1b 100644
--- a/loader/lib/storage.py
+++ b/loader/lib/storage.py
@@ -131,7 +131,7 @@ class ArchivesParserStorage(ArchivesParser):
if len(curs.fetchall()):
log.status("Tagged thread %s with listid %s" % (self.threadid, listid))
- curs.execute("INSERT INTO messages (parentid, threadid, _from, _to, cc, subject, date, has_attachment, messageid, bodytxt) VALUES (%(parentid)s, %(threadid)s, %(from)s, %(to)s, %(cc)s, %(subject)s, %(date)s, %(has_attachment)s, %(messageid)s, %(bodytxt)s) RETURNING id", {
+ curs.execute("INSERT INTO messages (parentid, threadid, _from, _to, cc, subject, date, has_attachment, messageid, bodytxt, rawtxt) VALUES (%(parentid)s, %(threadid)s, %(from)s, %(to)s, %(cc)s, %(subject)s, %(date)s, %(has_attachment)s, %(messageid)s, %(bodytxt)s, %(rawtxt)s) RETURNING id", {
'parentid': self.parentid,
'threadid': self.threadid,
'from': self._from,
@@ -142,6 +142,7 @@ class ArchivesParserStorage(ArchivesParser):
'has_attachment': len(self.attachments) > 0,
'messageid': self.msgid,
'bodytxt': self.bodytxt,
+ 'rawtxt': self.rawtxt,
})
id = curs.fetchall()[0][0]
if len(self.attachments):