VirtualMailManager/Handler.py
branchv0.6.x
changeset 222 d0c16e70a9fb
parent 221 371ae0b4443d
child 223 5c7b7cbb01cd
equal deleted inserted replaced
221:371ae0b4443d 222:d0c16e70a9fb
   545                                               warnings)
   545                                               warnings)
   546         if warnings:
   546         if warnings:
   547             self.__warnings.append(_('Ignored destination addresses:'))
   547             self.__warnings.append(_('Ignored destination addresses:'))
   548             self.__warnings.extend(('  * %s' % w for w in warnings))
   548             self.__warnings.extend(('  * %s' % w for w in warnings))
   549         for destination in destinations:
   549         for destination in destinations:
   550             try:
   550             gid = get_gid(self._dbh, destination.domainname)
   551                 gid = get_gid(self._dbh, destination.domainname)
   551             if gid and (not Handler.accountExists(self._dbh, destination) and
   552             except DomainError, e:
   552                         not Handler.aliasExists(self._dbh, destination)):
   553                 if e.code == ERR.NO_SUCH_DOMAIN:
       
   554                     continue
       
   555                 else:
       
   556                     raise
       
   557             if gid > 0 and \
       
   558                     (not Handler.accountExists(self._dbh, destination) and
       
   559                      not Handler.aliasExists(self._dbh, destination)):
       
   560                 self.__warnings.append(
   553                 self.__warnings.append(
   561                     _(u"The destination account/alias %r doesn't exist.") %
   554                     _(u"The destination account/alias %r doesn't exist.") %
   562                                        str(destination))
   555                                        str(destination))
   563 
   556 
   564     def userDelete(self, emailaddress, force=None):
   557     def userDelete(self, emailaddress, force=None):