VirtualMailManager/VirtualMailManager.py
changeset 84 c1363b84a24b
parent 83 cc195af37de0
child 86 e43e4e7e9ec0
equal deleted inserted replaced
83:cc195af37de0 84:c1363b84a24b
   605     def aliasAdd(self, aliasaddress, targetaddress):
   605     def aliasAdd(self, aliasaddress, targetaddress):
   606         alias = self.__getAlias(aliasaddress, targetaddress)
   606         alias = self.__getAlias(aliasaddress, targetaddress)
   607         alias.save()
   607         alias.save()
   608         gid = self.__getDomain(alias._dest._domainname).getID()
   608         gid = self.__getDomain(alias._dest._domainname).getID()
   609         if gid > 0 and not VirtualMailManager.accountExists(self.__dbh,
   609         if gid > 0 and not VirtualMailManager.accountExists(self.__dbh,
   610                 alias._dest):
   610         alias._dest) and not VirtualMailManager.aliasExists(self.__dbh, 
       
   611         alias._dest):
   611             self.__warnings.append(
   612             self.__warnings.append(
   612                     _(u"The destination account »%s« doesn't exists yet.")%\
   613                 _(u"The destination account/alias »%s« doesn't exists yet.")%\
   613                             alias._dest)
   614                         alias._dest)
   614 
   615 
   615     def userDelete(self, emailaddress, force=None):
   616     def userDelete(self, emailaddress, force=None):
   616         if force not in [None, 'delalias']:
   617         if force not in [None, 'delalias']:
   617             raise VMMException(_(u"Invalid argument: »%s«") % force,
   618             raise VMMException(_(u"Invalid argument: »%s«") % force,
   618                     ERR.INVALID_AGUMENT)
   619                     ERR.INVALID_AGUMENT)