A Maubot plugin that automatically bans unsolicited DMs
Find a file
2026-08-13 09:07:17 -07:00
dm_honeypot_bot Add explicit profile enum 2026-08-13 09:07:17 -07:00
.gitignore Initial commit 2026-08-13 02:57:10 +01:00
base-config.yaml Add detection profiles system and normal profile 2026-08-13 08:48:29 -07:00
LICENSE Initial commit 2026-08-13 02:57:10 +01:00
maubot.yaml Initial commit 2026-08-13 02:57:10 +01:00
README.md Support listening to specific room IDs 2026-08-13 03:28:35 +01:00

DM Honeypot

The latest and greatest in Continuwuity's moderation arsenal. This incredibly advanced bot uses an inconspicuous account to sit and listen in on configured rooms, waving to passers-by who say hello. Should one of those passers-by get some funny ideas and randomly start a DM after this brief interaction (perhaps even without an interaction!), the plugin adds them to a policy list with a pre-configured reason.

Setup

Bring your own account, set it up in maubot.

Install this plugin, and adjust the configuration.

Invite the bot (using an admin account) to any room you want it to watch over.

Kick the bot from any room to stop watching it.

Configuration

admins: this is a list of user IDs the bot will accept invites from, and will ignore messages from.

policy_list_room_id: the ID of the room to write policies to. Make sure the bot has enough power level to send m.policy.rule.user in there.

policy_list_reason: the reason template to use when issuing a ban policy. There is one template variable available, {trigger_reason}, which will be the reason the ban was triggered. Currently, this is just "unsolicited DM".

conservative: if set to true, the bot will be more conservative/stealthy. For example:

  1. Ignore messages from users who have been joined for 3 days or more (enables account aging bypass, less likely to trigger scrapers)
  2. Ignore invites that do not have the DM flag set (enables regular room invite bypass)
  3. Don't send read receipts for new events (less likely to trigger scrapers)
  4. Don't randomly start typing (less likely to trigger scrapers)

Refer to the config file itself for a complete, up-to-date list of things "conservative" mode will do.

explicit_rooms: a list of room IDs to explicitly watch, instead of just watching every joined room. Does nothing if the list is empty.