Setting up an RTBL bot with Riddim

What is it?

Riddim is an XMPP bot framework, which can respond to commands or perform various automated tasks via XMPP.

One of Riddim’s features is to protect rooms it is in using one or more RTBLs, such as those published by xmppbl.org. It can automatically ban users that are found on a blocklist, before they have the opportunity to spam a channel.

How to run Riddim

There are various ways to set up Riddim, but we’re going to focus on running it as a container, because this is the simplest and most widely available method.

Configuration

First, create a file called config.lua with the following contents:

-- Provide the JID and password of the account the bot will use
jid = "antispam@example.com"
password = "secret-account-password"

-- The list of rooms the bot should join
autojoin = {
    "your-channel@channels.example.com";
    "other-channel@somewhere.example";
}

-- What nickname the bot should use
nick = "spamguard"

-- Choose a prefix for commands
command_prefix = "-"

-- What plugins to load
plugins = {
    "groupchat";
    "rtbl_guard";
}

-- Configure the RTBLs to monitor
rtbl_guard = {
    { host = "xmppbl.org", node = "muc_bans_sha256" };
};

Deployment

There are multiple tools available to download, run and manage containers. Here we provide an example of how to run riddim with docker or podman.

docker

This command assumes that:

You can choose any name for the container (to allow you to identify and manage it later). Here we give it the name ‘spamguard’.

docker run --name spamguard --restart=always -v "$PWD/config.lua:/etc/riddim/config.lua" mwild1/riddim

podman

The podman command should work just the same as the docker command:

podman run --name spamguard --restart=always -v "$PWD/config.lua:/etc/riddim/config.lua" docker.io/mwild1/riddim