'Check whether a user exists in this domain or an alias of it.
@type user: L{User}
@param user: A user.
@type memo: L{None} or L{dict} of L{AliasBase}
@param memo: A record of the addresses already considered while
resolving aliases. The default value should be used by all
external code.
@rtype: no-argument callable which returns L{IMessage <smtp.IMessage>}
provider.
@return: A function which takes no arguments and returns a message
receiver for the user.
@raises SMTPBadRcpt: When the given user does not exist in this domain
or an alias of it.'

def exists(self, user, memo=None):

    if (self.userDirectory(user.dest.local) is not None):
        return (lambda : self.startMessage(user))
    try:
        a = self.alias[user.dest.local]
    except:
        raise smtp.SMTPBadRcpt(user)
    else:
        aliases = a.resolve(self.alias, memo)
        if aliases:
            return (lambda : aliases)
        log.err(('Bad    alias    configuration:    ' + str(user)))
        raise smtp.SMTPBadRcpt(user)
