# HG changeset patch # User Pascal Volk # Date 1295295554 0 # Node ID 1016a17684c1dbdf7d5756a43cb1bee798df3736 # Parent ef99be5b7ec0ab6767346e757467c683c4d6b382 VMM/handler: Handler.relocated_add() check if the target address' domain is known, if so add a warning when the account/alias doesn't exist. diff -r ef99be5b7ec0 -r 1016a17684c1 VirtualMailManager/handler.py --- a/VirtualMailManager/handler.py Mon Jan 17 19:44:36 2011 +0000 +++ b/VirtualMailManager/handler.py Mon Jan 17 20:19:14 2011 +0000 @@ -711,8 +711,12 @@ already a relocated user with the given *emailaddress*, only the *targetaddress* for the relocated user will be updated.""" relocated = self._get_relocated(emailaddress) - relocated.set_destination(DestinationEmailAddress(targetaddress, - self._dbh)) + destination = DestinationEmailAddress(targetaddress, self._dbh) + relocated.set_destination(destination) + if destination.gid and \ + not self._chk_other_address_types(destination, TYPE_RELOCATED): + self._warnings.append(_(u"The destination account/alias '%s' " + u"doesn't exist.") % destination) def relocated_info(self, emailaddress): """Returns the target address of the relocated user with the given