diff options
author | Tomas Touceda <chiiph@leap.se> | 2013-04-25 13:01:01 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@leap.se> | 2013-05-07 14:02:12 -0300 |
commit | 23fbf0eabb6563b05a7264dff63af7fbe64cfdff (patch) | |
tree | d3a4dad531cd938f11ccc999e15782d86ea7e81e /src/leap/mx/mail_receiver.py | |
parent | 7d2756dd120800899f30b74ca68787e1044bed7c (diff) |
Simplify check recipient access, change the owner field in mail_receiver
Diffstat (limited to 'src/leap/mx/mail_receiver.py')
-rw-r--r-- | src/leap/mx/mail_receiver.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py index ae32f25..9006471 100644 --- a/src/leap/mx/mail_receiver.py +++ b/src/leap/mx/mail_receiver.py @@ -105,7 +105,9 @@ def _process_incoming_email(users_db, mail_couchdb_url_prefix, self, filepath, m with filepath.open("r") as f: mail_data = f.read() mail = message_from_string(mail_data) - owner = mail["Delivered-To"] + owner = mail["To"] + if owner is None: # default to Delivered-To + owner = mail["Delivered-To"] owner = owner.split("@")[0] owner = owner.split("+")[0] logger.debug("Mail owner: %s" % (owner,)) |