summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-31 16:31:48 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-31 16:31:48 -0300
commit551a4d7bd1630847333ba67b8609491372230540 (patch)
tree2819d9e1626172d04e1bc7804e501b072e39541f /src/leap
parent44fc31656f028942caeca5a9ce55b86ef14b3289 (diff)
Properly parse mail address
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mx/mail_receiver.py2
1 files changed, 2 insertions, 0 deletions
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)