diff options
author | Tomas Touceda <chiiph@leap.se> | 2013-04-25 13:01:01 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@leap.se> | 2013-04-25 13:01:01 -0300 |
commit | 92257bdf0b993c67783631a4766d63678f4deb1b (patch) | |
tree | bdd25b9cd97e7271658fca37af33425fab67ca19 /src/leap/mx/mail_receiver.py | |
parent | a0df6b9b8fbf7d4db53bb21f379cb1941d823a5b (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,)) |