Documentation · SpamGuard

Setup

Pre-release: this documentation describes the current development state and may change before release.

All settings are in the ACP under Setup → Options → SpamGuard.

How SpamGuard checks content

SpamGuard plugs into XenForo’s built-in spam checkers. Every post and registration that XenForo has checked goes through these steps:

  1. Rules: every rule that matches adds points. Together they make up a score from 0 to 100.
  2. Decision by score: below the allow threshold the content is approved, from the spam threshold on it counts as spam, in between it is a borderline case.
  3. AI only for borderline cases (Pro): if the AI review is set up, it decides borderline cases. Without it, borderline cases go to moderation.
  4. Audit log: score, matched rules and decision are stored, never the content or the prompt. Entries are deleted automatically after 30 days.

Moderators see the score and the reasons in the queue, e.g. “SpamGuard (score 55): …”.

Errors never lead to unchecked publishing. On an internal error or an error from the AI provider, the content goes to the moderation queue. If StopForumSpam is unreachable, only that one rule does not match, the other rules keep checking.

Rules

RuleWhat it checksPointsEdition
R01 HoneypotA form field invisible to humans was filled in.100Lite
R02 Time trapThe form was submitted faster than a human could fill it in.60Lite
R03 StopForumSpamIP, email address or username is listed at stopforumspam.com.30–90, depending on confidenceLite
R04 Link limitA new user posts more different links than allowed.40Lite
R05 DomainsLinks to blocked domains, or a deduction if all links point to trusted domains.50 / −30Pro
R06 KeywordsYour own words, phrases or regular expressions.per entry, default 30Pro
R07 Character tricksInvisible characters or words mixing scripts.40Pro
R08 DuplicatesThe same content was posted in the last 10 minutes, by anyone.50Pro
R09 Disposable emailEmail address at a throwaway domain.40Pro
R10 LanguageThe post is clearly written in a language the forum does not allow.15Pro
R11 VelocityToo many posts within one minute, per IP for guests.30Pro
R12 Profile fieldsNew users with links or keywords in profile fields.30Pro

Users count as new while they have fewer messages than XenForo’s “Maximum messages to check for spam” setting (5 if it is not set).

Basic settings

OptionMeaning
License keyYour Pro licence key. Leave empty for Lite. Only the key and the board URL are sent to Lemon Squeezy for the check. The current licence status is shown below the field.
Allow thresholdContent with a score below this value (0–100) is allowed. Default: 30.
Spam thresholdFrom this score on, content counts as spam. Default: 70. Must be higher than the allow threshold. Anything in between is a borderline case and is moderated.
Action for spamWhat happens to spam: “Hold for moderation” (default) or “Reject”. Borderline cases are always moderated.
Check StopForumSpamLooks up IP address, email address and username at stopforumspam.com. Default: on.
Links allowed for new usersHow many different links a new user may post per message. Default: 2.

Privacy: with “Check StopForumSpam”, IP address, email address and username are sent to a service outside your server. Mention this in your privacy policy or turn the option off.

Lists and keywords (Pro)

OptionMeaning
Blocked domainsOne domain per line, subdomains included. Lines starting with # are comments.
Trusted domainsOne domain per line. If all links in a post point to these domains, 30 points are subtracted.
KeywordsOne word or phrase per line, 30 points. Set your own points with phrase = 40, or use regular expressions like /casino\s*bonus/i = 45. Whole words are matched, case-insensitively. Also applied to new users’ profile fields.
Disposable email domainsOne domain per line, subdomains included.
Forum languagesLanguage codes separated by commas, e.g. de, en. Empty = the forum’s default language.

Example for Keywords:

# word with default points (30)
viagra
# phrase with custom points
cheap loans = 40
# regular expression
/casino\s*bonus/i = 45

The ACP reports invalid lines when you save.

AI review of borderline cases (Pro)

OptionMeaning
AI review of borderline cases (Pro)“Off” (default) or “Mistral AI (EU)”. You use your own API key.
AI API keyThe key is never shown again after saving, only its last characters. Leave the field empty to keep it, enter - to delete it.
AI modelModel name at Mistral. Default: mistral-small-latest. Advanced option.
Minimum AI confidence (%)The AI verdict only counts from this confidence on (50–100), otherwise the content is moderated. Default: 80. Advanced option.
Daily limit for AI requestsMaximum number of AI requests per day. Default: 500. After that, borderline cases are moderated. 0 = AI off.

The AI review only runs with a valid Pro licence, a selected provider, a stored key and a daily limit above 0. If any of these is missing, borderline cases are moderated. XenForo only shows “AI model” and “Minimum AI confidence” when advanced options are displayed.

Mistral AI (based in France) is currently the only provider. More providers with processing in the EU are planned.

What is sent to the AI provider

Before every request, SpamGuard replaces personal data in the text. This cannot be turned off.

DataReplaced with
Usernames[USER_1], [USER_2], …
Email addresses[EMAIL]
Phone numbers[PHONE]
IP addresses[IP]
URLsThe domain is kept, path and query are removed.
IBAN[IBAN]
Card numbers[CARD]

Sign a data processing agreement with Mistral and mention the review in your privacy policy.

← Back to project page