def validateTo(self, user):
        log.msg("validateTo(): %s" % user)

        if self.user and self.service.queue:
            d = self.service.domains.get(user.dest.domain, None)
            log.msg('Debug:\n %s' % dir(self.service))
            if d is None and not self.service.authed:
                raise smtp.SMTPDeliveryError(550, "We do not relay unless you have an account.")
            elif d is None and not self.orig_is_local:  # relay foreign addresses
                log.msg('Debug: d is None and not self.orig_is_local')
                d = relay.DomainQueuer(self.service, True)
            elif d is None and self.orig_is_local:  # we know the sender, lets relay
                d = relay.DomainQueuer(self.service, True)
        else:
            d = self.service.domains[user.dest.domain]  # delivery to local domain
        return defer.maybeDeferred(d.exists, user)
dataset/ETHPy150Open tkanerva/openmail/OpenMail/openmail/mytap.py/MyESMTPDomainDelivery.validateTo/original