mail.py
branchstable
changeset 7815 2a164a9cf81c
parent 5736 375819ec7d43
child 7879 9aae456abab5
equal deleted inserted replaced
7814:1ec9fe1dfba9 7815:2a164a9cf81c
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    65         values, qualif = msgid.split('@')
    65         values, qualif = msgid.split('@')
    66         padding = len(values) % 4
    66         padding = len(values) % 4
    67         values = b64decode(str(values + '='*padding), '.-')
    67         values = b64decode(str(values + '='*padding), '.-')
    68         values = dict(v.split('=') for v in values.split('&'))
    68         values = dict(v.split('=') for v in values.split('&'))
    69         fromappid, host = qualif.split('.', 1)
    69         fromappid, host = qualif.split('.', 1)
    70     except:
    70     except Exception:
    71         return None
    71         return None
    72     if appid != fromappid or host != gethostname():
    72     if appid != fromappid or host != gethostname():
    73         return None
    73         return None
    74     return values
    74     return values
    75 
    75