From 26f5a1c8b1c85e85ea390cd10421d17ef2cc9118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 29 Aug 2013 17:45:36 -0300 Subject: Actually save the doc in couch --- changes/bug_save_doc | 1 + src/leap/mx/mail_receiver.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changes/bug_save_doc diff --git a/changes/bug_save_doc b/changes/bug_save_doc new file mode 100644 index 0000000..287228a --- /dev/null +++ b/changes/bug_save_doc @@ -0,0 +1 @@ + o Properly save the incoming mail as a doc in couch. \ No newline at end of file diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py index 77e7cf4..cabb5cb 100644 --- a/src/leap/mx/mail_receiver.py +++ b/src/leap/mx/mail_receiver.py @@ -168,6 +168,7 @@ class MailReceiver(Service): uuid = 0 db = CouchDatabase(self._mail_couch_url, "user-%s" % (uuid,)) + db.put_doc(doc) log.msg("Done exporting") -- cgit v1.2.3 From 78f6ca775dc42eba69f2dc1e134ca360c0813aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 30 Aug 2013 12:29:33 -0300 Subject: Keep file watcher in memory to prevent losing file events --- changes/bug_keep_watcher_in_memory | 1 + src/leap/mx/mail_receiver.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changes/bug_keep_watcher_in_memory diff --git a/changes/bug_keep_watcher_in_memory b/changes/bug_keep_watcher_in_memory new file mode 100644 index 0000000..4ac9541 --- /dev/null +++ b/changes/bug_keep_watcher_in_memory @@ -0,0 +1 @@ + o Keep file watcher in memory to prevent losing file events. \ No newline at end of file diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py index 77e7cf4..8c39353 100644 --- a/src/leap/mx/mail_receiver.py +++ b/src/leap/mx/mail_receiver.py @@ -72,16 +72,16 @@ class MailReceiver(Service): Starts the MailReceiver service """ Service.startService(self) - wm = inotify.INotify() - wm.startReading() + self.wm = inotify.INotify() + self.wm.startReading() mask = inotify.IN_CREATE for directory, recursive in self._directories: log.msg("Watching %s --- Recursive: %s" % (directory, recursive)) - wm.watch(filepath.FilePath(directory), mask, - callbacks=[self._process_incoming_email], - recursive=recursive) + self.wm.watch(filepath.FilePath(directory), mask, + callbacks=[self._process_incoming_email], + recursive=recursive) def _gather_uuid_pubkey(self, results): if len(results) < 2: -- cgit v1.2.3 From 551a4d7bd1630847333ba67b8609491372230540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Sat, 31 Aug 2013 16:31:48 -0300 Subject: Properly parse mail address --- changes/properly_parse_addr | 2 ++ src/leap/mx/mail_receiver.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changes/properly_parse_addr diff --git a/changes/properly_parse_addr b/changes/properly_parse_addr new file mode 100644 index 0000000..a41ba05 --- /dev/null +++ b/changes/properly_parse_addr @@ -0,0 +1,2 @@ + o Properly parse mail address of the form "Name + ". Fixes #3653. \ No newline at end of file diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py index 77e7cf4..6f9b8a7 100644 --- a/src/leap/mx/mail_receiver.py +++ b/src/leap/mx/mail_receiver.py @@ -24,6 +24,7 @@ import os import uuid as pyuuid import json +import email.utils from email import message_from_string @@ -218,6 +219,7 @@ class MailReceiver(Service): "Delivered-To: field") log.msg("Mail owner: %s" % (owner,)) + owner = email.utils.parseaddr(owner)[1] log.msg("%s received a new mail" % (owner,)) dpubk = self._users_cdb.getPubKey(owner) duuid = self._users_cdb.queryByAddress(owner) -- cgit v1.2.3 From bf74c7720808ae4a0a94ea80439bea08e1441acd Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 6 Sep 2013 16:36:13 -0300 Subject: Fold in changes. --- CHANGELOG | 5 +++++ changes/bug_keep_watcher_in_memory | 1 - changes/bug_save_doc | 1 - changes/properly_parse_addr | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 changes/bug_keep_watcher_in_memory delete mode 100644 changes/bug_save_doc delete mode 100644 changes/properly_parse_addr diff --git a/CHANGELOG b/CHANGELOG index 543604f..fcc216e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.3.2 Sep 6: + o Keep file watcher in memory to prevent losing file events. + o Properly save the incoming mail as a doc in couch. + o Properly parse mail address of the form "Name ". Fixes #3653. + 0.3.1 Aug 23: o Migrate mx functions to work on the new couchdb structure and views. Fixes #3502. diff --git a/changes/bug_keep_watcher_in_memory b/changes/bug_keep_watcher_in_memory deleted file mode 100644 index 4ac9541..0000000 --- a/changes/bug_keep_watcher_in_memory +++ /dev/null @@ -1 +0,0 @@ - o Keep file watcher in memory to prevent losing file events. \ No newline at end of file diff --git a/changes/bug_save_doc b/changes/bug_save_doc deleted file mode 100644 index 287228a..0000000 --- a/changes/bug_save_doc +++ /dev/null @@ -1 +0,0 @@ - o Properly save the incoming mail as a doc in couch. \ No newline at end of file diff --git a/changes/properly_parse_addr b/changes/properly_parse_addr deleted file mode 100644 index a41ba05..0000000 --- a/changes/properly_parse_addr +++ /dev/null @@ -1,2 +0,0 @@ - o Properly parse mail address of the form "Name - ". Fixes #3653. \ No newline at end of file -- cgit v1.2.3