Esempio n. 1
0
def newUser_email(mail):
    user=current_user.email.split("@")[1]
    print user
    r = zm.getAllAccount()
    print r
    for n in r:
            if n[1] == mail + "@" + user:
                return False
    return mail
Esempio n. 2
0
def check_all_aliases(alias):
    a = zm.getAllAccount()
    for i in a:
        r = zm.getAccount(id=i[0])
        for n in r['GetAccountResponse']['account']['a']:
            if n['n'] == "zimbraMailAlias":
                if n['_content'].split("@")[0] == alias:
                    return False
    return alias