Download the PHP package tommykivits/statamic-spam-sentry without Composer
On this page you can find all versions of the php package tommykivits/statamic-spam-sentry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tommykivits/statamic-spam-sentry
More information about tommykivits/statamic-spam-sentry
Files in tommykivits/statamic-spam-sentry
Package statamic-spam-sentry
Short Description Spam Sentry adds a smart validator to form fields in your Statamic site.
License
Informations about the package statamic-spam-sentry
Statamic Spam Sentry
Spam Sentry adds a smart validator to form fields in your Statamic site. Input is automatically checked against a comprehensive, up-to-date list of known spam terms. Easily extend it with your own blacklist or whitelist entries via simple configuration. Includes per-IP reputation checks via AbuseIPDB and logging of detected spam.
Features
- Text Spam Checking: Automatically validates form input against a large list of known spam words.
- Custom Blacklist/Whitelist: Add your own words or regex patterns to the blacklist, or allow specific words via the whitelist.
- IP Reputation: Check the submitter's IP address against the AbuseIPDB database.
- Logging: All detected spam (both words and IP matches) are logged to your Laravel logs and a dedicated Spam Log in the Statamic Control Panel.
- Spam Log Utility: Easily view and manage blocked submissions directly from the Statamic Control Panel.
- Caching: IP reputation checks are cached for 28 days to minimize API calls.
Installation
Install the addon via Composer:
The addon will automatically publish its assets and configuration upon installation.
Features & Usage
Text Spam Checking
To use the spam validator on a form field, add the NoKnowSpam rule to your field's validation rules in the blueprint:
IP Reputation
Spam Sentry can check the submitter's IP address against the AbuseIPDB database. If an IP is found to be abusive, the submission will be blocked automatically.
Add your AbuseIPDB API Key to your .env file:
Spam Log
All detected spam is recorded in a dedicated log. You can access this log in the Statamic Control Panel under Utilities > Spam Sentry. It provides a clear overview of:
- Time: When the spam was detected.
- Type: Whether it was a word match or an IP match.
- Message: The reason for blocking.
- IP Address: The sender's IP.
- Path: The URL where the submission occurred.
Configuration
Settings
You can manage the following settings in the Statamic Control Panel under Settings > Spam Sentry:
- Blocked Words: Add additional words or regular expressions (prefixed with
regex:) to the blacklist. - Allowed Words: Specify words that should always be permitted (whitelist).
- Enable AbuseIPDB: Toggle IP reputation checks on or off.
- Minimum Confidence Score: Set the threshold (0-100) for considering an IP address as abusive.
Advanced Configuration
Optionally, override how long a checked IP's verdict is cached (defaults to 28 days) in your .env:
The default list of spam words can be found and modified in storage/spamsentry/spam-words.php after installation.