return response;
} else if (! (baseuser instanceof JamesUser ) ) {
response = new RemoteManagerResponse("Can't set forwarding for this user type.");
return response;
}
JamesUser user = (JamesUser)baseuser;
if ( user == null ) {
response = new RemoteManagerResponse("No such user " + parameters);
return response;
}
if ( !user.getForwarding() ) {
response = new RemoteManagerResponse("User " + parameters + " is not currently being forwarded");
return response;
}
MailAddress fwdAddr = user.getForwardingDestination();
if ( fwdAddr == null ) { // defensive programming -- should not occur
String errmsg = "For user " + parameters + ", the system indicates that forwarding is set but no forwarding destination was found";
response = new RemoteManagerResponse(errmsg);
session.getLogger().error(errmsg);