def _ebMailbox(self, failure):
        """
        Handle an expected authentication failure.

        Send an appropriate error response for a L{LoginDenied} or
        L{LoginFailed} authentication failure.

        @type failure: L{Failure}
        @param failure: The authentication error.
        """
        failure = failure.trap(cred.error.LoginDenied, cred.error.LoginFailed)
        if issubclass(failure, cred.error.LoginDenied):
            self.failResponse("Access denied: " + str(failure))
        elif issubclass(failure, cred.error.LoginFailed):
            self.failResponse(b'Authentication failed')
        if getattr(self.factory, 'noisy', True):
            log.msg(
                "Denied login attempt from " + str(self.transport.getPeer())
            )

        Handle an expected authentication failure.

        Send an appropriate error response for a L{LoginDenied} or
        L{LoginFailed} authentication failure.

        @type failure: L{Failure}
        @param failure: The authentication error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/pop3.py