VirtualMailManager/handler.py
branchv0.6.x
changeset 373 1016a17684c1
parent 372 ef99be5b7ec0
child 375 4cbaf8d229f9
equal deleted inserted replaced
372:ef99be5b7ec0 373:1016a17684c1
   709     def relocated_add(self, emailaddress, targetaddress):
   709     def relocated_add(self, emailaddress, targetaddress):
   710         """Creates a new `Relocated` entry in the database. If there is
   710         """Creates a new `Relocated` entry in the database. If there is
   711         already a relocated user with the given *emailaddress*, only the
   711         already a relocated user with the given *emailaddress*, only the
   712         *targetaddress* for the relocated user will be updated."""
   712         *targetaddress* for the relocated user will be updated."""
   713         relocated = self._get_relocated(emailaddress)
   713         relocated = self._get_relocated(emailaddress)
   714         relocated.set_destination(DestinationEmailAddress(targetaddress,
   714         destination = DestinationEmailAddress(targetaddress, self._dbh)
   715                                                           self._dbh))
   715         relocated.set_destination(destination)
       
   716         if destination.gid and \
       
   717            not self._chk_other_address_types(destination, TYPE_RELOCATED):
       
   718             self._warnings.append(_(u"The destination account/alias '%s' "
       
   719                                     u"doesn't exist.") % destination)
   716 
   720 
   717     def relocated_info(self, emailaddress):
   721     def relocated_info(self, emailaddress):
   718         """Returns the target address of the relocated user with the given
   722         """Returns the target address of the relocated user with the given
   719         *emailaddress*."""
   723         *emailaddress*."""
   720         relocated = self._get_relocated(emailaddress)
   724         relocated = self._get_relocated(emailaddress)