A collection of spam checker modules for Synapse.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mathieu Velten 010f36cd3d Fix stupid typo 1 year ago
synapse_simple_antispam Fix stupid typo 1 year ago
README.md Fix examples 2 years ago
setup.py version 2 years ago

README.md

synapse-simple-antispam

A simple spam checker module for Synapse to block invites from unwanted homeservers

Installation

In your Synapse python environment:

pip install git+https://github.com/t2bot/synapse-simple-antispam#egg=synapse-simple-antispam

Then add to your homeserver.yaml:

spam_checker:
  # Module to block invites from listed homeservers
  - module: "synapse_simple_antispam.AntiSpamInvites"
    config:
      # A list of homeservers to block invites from.
      blocked_homeservers:
        - badcorp.example.org
        - evil.example.com
  # Module to block messages from listed homeservers
  - module: "synapse_simple_antispam.AntiSpamHomeserverMessages"
    config:
      # A list of homeservers to block messages from.
      blocked_homeservers:
        - badcorp.example.org
        - evil.example.com
  # Module to block messages with the given text
  - module: "synapse_simple_antispam.AntiSpamText"
    config:
      blocked_messages:
        - "This is spam. Spammy spam spam."
  # Module to block messages with the given text regexes
  - module: "synapse_simple_antispam.AntiSpamRegex"
    config:
      blocked_messages:
        - "spam"  # "spam" anywhere in the message
        - "sp[am]+" # "spammmm", "spaaaammmmm", etc

Synapse will need to be restarted to apply the changes. To modify the list of homeservers, update the config and restart Synapse.