@Override
    public void process(IQ iq) throws PacketException {

        // Check for 'no such user' as per RFC 6121 8.5.1.
        if (performNoSuchUserCheck()) {
            final Optional<IQ> noSuchUserResponse = processNoSuchUserCheck(iq);
            if (noSuchUserResponse.isPresent()) {
                Log.trace("Responding with 'no such user' defined response, since the intended recipient isn't a local user ('no-such-user' check) to: {}", iq);
                sessionManager.getSession(iq.getFrom()).process(noSuchUserResponse.get());
                return;
            }
        }

        try {
            IQ reply = handleIQ(iq);
            if (reply != null) {
                deliverer.deliver(reply);
            }
        }
        catch (org.jivesoftware.openfire.auth.UnauthorizedException e) {
            if (iq != null) {
                try {
                    IQ response = IQ.createResultIQ(iq);
                    response.setChildElement(iq.getChildElement().createCopy());
                    response.setError(PacketError.Condition.not_authorized);
                    sessionManager.getSession(iq.getFrom()).process(response);
                }
                catch (Exception de) {
                    Log.error(LocaleUtils.getLocalizedString("admin.error"), de);
                    sessionManager.getSession(iq.getFrom()).close();
                }
            }
        }
        catch (Exception e) {
            Log.error(LocaleUtils.getLocalizedString("admin.error"), e);
            try {
                IQ response = IQ.createResultIQ(iq);
                response.setChildElement(iq.getChildElement().createCopy());
                response.setError(PacketError.Condition.internal_server_error);
                sessionManager.getSession(iq.getFrom()).process(response);
            }
            catch (Exception e1) {
                // Do nothing
            }
        }
    }
Performs the check as defined in RFC 6121 8.5.1. "No Such User":
<blockquote>If the 'to' address specifies a bare JID <localpart@domainpart> or full JID
<localpart@domainpart/resourcepart> where the domainpart of the JID matches a configured domain that is serviced
by the server itself, the server MUST proceed as follows. [...] If the user account identified by the 'to'
attribute does not exist, how the stanza is processed depends on the stanza type. [...] For an IQ stanza, the
server MUST return a <service-unavailable/> stanza error to the sender.</blockquote>

@see <a href="http://xmpp.org/rfcs/rfc6121.html#rules-localpart-nosuchuser">RFC 6121 8.5.1. "No Such User"</a>
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQHandler.java