'Handle cred login errors by translating them to the SMTP authenticate
failed.  Translate all other errors into a generic SMTP error code and
log the failure for inspection.  Stop all errors from propagating.
@param reason: Reason for failure.'

def _ebAuthenticated(self, reason):

    self.challenge = None
    if reason.check(cred.error.UnauthorizedLogin):
        self.sendCode(535, 'Authentication    failed')
    else:
        log.err(reason, 'SMTP    authentication    failure')
        self.sendCode(451, 'Requested    action    aborted:    local    error    in    processing')
