summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/admin/spam.md23
-rw-r--r--docs/configuration/instance.md37
2 files changed, 60 insertions, 0 deletions
diff --git a/docs/admin/spam.md b/docs/admin/spam.md
new file mode 100644
index 000000000..268a43dde
--- /dev/null
+++ b/docs/admin/spam.md
@@ -0,0 +1,23 @@
+# Spam Filtering
+
+To make life a bit easier for admins trying to combat spam messages from open signup instances, GoToSocial has an experimental spam filter option.
+
+If you or your users are being barraged by spam, try setting the option `instance-federation-spam-filter` to true in your config.yaml. You can read more about the heuristics used in the [instance config page](../configuration/instance.md).
+
+Messages that are considered to be spam will not be stored on your instance, and will not generate notifications.
+
+!!! warning
+ Spam filters are necessarily imperfect tools, since they will likely catch at least a few legitimate messages in the filter, or indeed fail to catch some messages that *are* spam.
+
+ Enabling `instance-federation-spam-filter` should be viewed as a "battening down the hatches" option for when the fediverse is facing a spam wave. Under normal circumstances, you will likely want to leave it turned off to avoid filtering out legitimate messages by accident.
+
+!!! tip
+ If you want to check what's being caught by the spam filter (if anything), grep your logs for the phrase "looked like spam".
+
+ If you're [running GoToSocial as a systemd service](../getting_started/installation/metal.md#optional-enable-the-systemd-service), you can do this with the command:
+
+ ```bash
+ journalctl -u gotosocial --no-pager | grep 'looked like spam'
+ ```
+
+ If you see no output, that means no spam has been caught in the filter. Otherwise, you will see one or more log lines with links to statuses that have been filtered and dropped.
diff --git a/docs/configuration/instance.md b/docs/configuration/instance.md
index 0be3d52be..36181268b 100644
--- a/docs/configuration/instance.md
+++ b/docs/configuration/instance.md
@@ -39,6 +39,43 @@ instance-languages: []
# Default: "blocklist"
instance-federation-mode: "blocklist"
+# Bool. Enable spam filtering heuristics for messages entering your instance
+# via the federation API. Regardless of what you set here, basic checks
+# for message relevancy will still be performed, but you can try enabling
+# this setting if you are being spammed with unwanted messages from other
+# instances, and want to more strictly filter out spam messages.
+#
+# THIS IS CURRENTLY AN EXPERIMENTAL SETTING, AND MAY FILTER OUT LEGITIMATE
+# MESSAGES, OR FAIL TO FILTER OUT SPAMMY MESSAGES. It is recommended to
+# only enable this setting when the fediverse is in the midst of a spam
+# wave, and you need to batten down the hatches to keep your instance usable.
+#
+# The decision of whether a message counts as spam or not is made based on
+# the following heuristics, in order, where receiver = the account on your
+# instance that received a message in their inbox, and requester = the
+# account on a remote instance that sent the message.
+#
+# First, basic relevancy checks
+#
+# 1. Receiver follows requester. Return OK.
+# 2. Statusable doesn't mention receiver. Return NotRelevant.
+#
+# If instance-federation-spam-filter = false, then return OK now.
+# Otherwise check:
+#
+# 3. Receiver is locked and is followed by requester. Return OK.
+# 4. Five or more people are mentioned. Return Spam.
+# 5. Receiver follow (requests) a mentioned account. Return OK.
+# 6. Statusable has a media attachment. Return Spam.
+# 7. Statusable contains non-mention, non-hashtag links. Return Spam.
+#
+# Messages identified as spam will be dropped from your instance, and not
+# inserted into the database, or into home timelines or notifications.
+#
+# Options: [true, false]
+# Default: false
+instance-federation-spam-filter: false
+
# Bool. Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=open in order
# to see a list of instances that this instance 'peers' with. Even if set to 'false', then authenticated
# users (members of the instance) will still be able to query the endpoint.