Returns an iterable which includes all allowed commands. This does
        not mean that a specific command from the result is executable right now
        in this session state (or that it can be executed at all in this
        connection).

        Please note that the returned values are /internal/ commands, not SMTP
        commands (use get_all_allowed_smtp_commands for that) so there will be
        'MAIL FROM' instead of 'MAIL'.

def get_all_allowed_internal_commands(self):
        """Returns an iterable which includes all allowed commands. This does
        not mean that a specific command from the result is executable right now
        in this session state (or that it can be executed at all in this
        connection).

        Please note that the returned values are /internal/ commands, not SMTP
        commands (use get_all_allowed_smtp_commands for that) so there will be
        'MAIL FROM' instead of 'MAIL'."""
        states = set()
        for command_name in self._get_all_commands(including_quit=True):
            if command_name not in ['GREET', 'MSGDATA']:
                states.add(command_name)
        return states