+ else:
+ ldap_dict['uid'] = [ user ]
+ # objectClass: inetLocalMailRecipient
+ ldap_dict['mailLocalAddress'] = [ json_dict['redir'] ]
+ ldap_dict['mailHost'] = [ 'imaps://mail.%s:993' % json_dict['redir'].rsplit('@', 1)[1] ]
+ # photo JPEG
+ photo_filename = PHOTO_FILENAME % adel
+ if os.path.exists(photo_filename):
+ ldap_dict['jpegPhoto'] = [ file(photo_filename, 'rb').read() ]
+ #ldap_dict['photo'] = [ file(photo_filename, 'rb').read() ]
+ # identification unique