def _command_AUTH(self, arg):
        if 'AUTH' not in self.extensions:
            unknown_command.send(self.io)
            return
        if not self.ehlo_as or self.authed or self.have_mailfrom:
            bad_sequence.send(self.io)
            return
        auth = self.extensions.getparam('AUTH')

        try:
            result = auth.server_attempt(arg)
        except __HOLE__:
            bad_arguments.send(self.io)
            return
        except ServerAuthError as e:
            e.reply.send(self.io)
            return

        reply = Reply('235', '2.7.0 Authentication successful')
        self._call_custom_handler('AUTH', reply, result)
        reply.send(self.io)
        self._check_close_code(reply)

        if reply.code == '235':
            self.authed = True
dataset/ETHPy150Open slimta/python-slimta/slimta/smtp/server.py/Server._command_AUTH