# PrestaShop anti-spam module: documentation (installation, settings, log, cleanup)

> Installation Install the module from Modules > Module Manager > Upload a module by uploading the ZIP file, then click Configure. On installation, protection is active in log-only mode: nothing…

- Page: <https://www.datafirefly.com/en/documentation/prestashop-anti-spam-module/>
- Language: en
- Last updated: 2026-11-28
- Other languages: [fr](https://www.datafirefly.com/documentation/module-antispam-prestashop/index.md), [es](https://www.datafirefly.com/es/documentation/modulo-antispam-prestashop/index.md), [it](https://www.datafirefly.com/it/documentation/modulo-antispam-prestashop/index.md), [pl](https://www.datafirefly.com/pl/documentation/modul-antyspamowy-prestashop/index.md), [de](https://www.datafirefly.com/de/documentation/prestashop-spamschutz-modul/index.md), [pt](https://www.datafirefly.com/pt/documentation/modulo-antispam-prestashop/index.md), [nl](https://www.datafirefly.com/nl/documentation/prestashop-antispam-module/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Installation

Install the module from **Modules > Module Manager > Upload a module** by uploading the ZIP file, then click **Configure**. On installation, protection is active in **log-only** mode: nothing is blocked, and the log shows what would have been. No third-party service is called.

To update from 1.0.0, simply upload the new ZIP. Settings, lists and log are kept, and so is your mode (log-only or blocking). Only a few 1.0.0 defaults that caused false positives are corrected, and only if you had not changed them: the "no JavaScript" and "too fast" points, and the words "casino" and "escort", which now add points instead of blocking.

## Getting started with the wizard

The first time you open it, the dashboard offers three presets:

- **Light**: for stores that receive little spam, very tolerant (threshold 80).
- **Balanced** (recommended): stops most bots and lets through visitors without JavaScript, with autofill or a VPN (threshold 60).
- **Strict**: for a store under attack; more signals are required to pass, so keep an eye on the log (threshold 45).

Also choose whether to start in **log-only** mode (recommended for a few days) or with blocking right away. All settings can still be changed afterwards.

![Setup wizard with three presets (light, balanced, strict) and a log-only start](https://www.datafirefly.com/wp-content/uploads/2026/11/setup-wizard-presets-dfantispam-en.webp)

## The dashboard

It shows submissions blocked over 24 hours, 7 and 30 days, those that **would have been blocked** in log-only mode, and the false positives you flagged, with their share of stopped submissions. The chart covers 30 days. The **By form**, **By layer** and **Top reasons** blocks show where and how spam is stopped. **Protection health** lists the points to check, each linking to the relevant tab.

In log-only mode, a banner reminds you that nothing is blocked and offers to switch to blocking once the log looks right to you.

![DataFirefly Antispam dashboard: submissions blocked over 24 hours, 7 and 30 days, daily chart and protection health](https://www.datafirefly.com/wp-content/uploads/2026/11/blocked-spam-dashboard-dfantispam-en.webp)

## Protected forms

The **Forms** tab lists everything the module can protect. Only these forms are examined, and only when they are submitted (POST request). Pages, AJAX calls, payment returns, webhooks, cron URLs, feeds, the webservice and the back office are never read.

- **PrestaShop**: contact, account creation (including guest sign-up in the checkout), login, forgotten password, newsletter, product reviews (productcomments), stock alerts (ps_emailalerts).
- **DataFirefly modules**: reviews, B2B quotes, express quotes, helpdesk, contest, private shop, UGC gallery, blog comments. When a module already has its own trap field or minimum time, these checks are not duplicated: only the content, the email address and the rate limit are added.
- Checkout, two-factor authentication and social login modules are recognized and never blocked.

For each form: activation, checks applied, limit of submissions per hour and per network, captcha (if a provider is configured) and the number of submissions stopped over 30 days.

![Per-form settings: PrestaShop forms and DataFirefly modules, checks applied, hourly limit and captcha](https://www.datafirefly.com/wp-content/uploads/2026/11/protected-forms-dfantispam-en.webp)

### Forms of other modules

Add one rule per line, in three parts separated by `|`: the page, the field that identifies the submission, and optionally the CSS selector of the form (to add the trap field and the proof of work).

- `mymodule:quote | submitQuote | #quote-form`: "quote" controller of the "mymodule" module, when the submitQuote field is sent.
- `mymodule:request | action=send`: when the "action" field equals "send".
- `* | submitQuote`: any page. Payment modules and technical controllers (cron, webhook, validation, return…) are always excluded.

Then enable the **Custom forms** line. Lines starting with `#` are comments.

## How a submission is evaluated

Each signal adds points; a submission is refused when its total reaches the **blocking score** (60 by default). Some signals block on their own: filled trap field, blocked IP or address, disposable address, blocking word, link in a name, forged or replayed proof of work.

### Invisible signals

- **Trap field**: a field hidden from visitors and screen readers. A bot fills it in, a human does not. If autofill fills it after real keyboard input, it only adds 15 points.
- **Fill time**: below the minimum (3 s, two thirds of that for sign-up and newsletter), points are added. Without JavaScript, a technical cookie set only on the relevant pages makes it possible to measure it, with reduced points.
- **JavaScript**: a submission without JavaScript receives points, once. This signal alone never blocks.
- **Proof of work**: the browser solves a small computation in a Web Worker while the visitor types. The token is signed, bound to the form and the store, valid for 20 minutes and usable only once. Difficulty is low, medium or high; in adaptive mode, it doubles after 30 stopped submissions in 10 minutes and quadruples after 100.
- **User agent**: curl, python, headless browsers, empty user agent. Never applied to login.

![Invisible bot detection: log or block mode, score threshold, trap field, fill time and proof of work](https://www.datafirefly.com/wp-content/uploads/2026/11/bot-detection-proof-of-work-dfantispam-en.webp)

### Content

The **Content** tab sets the links allowed in a message, BBCode or HTML links, the blocking words and suspicious words (one per line, `/regex/i` accepted), unexpected alphabets (automatic, based on the store's active languages), name checking and campaign detection (the same text sent from another network within 24 hours).

## Email addresses

The list of disposable domains comes from the community project disposable-email-domains (public domain, CC0 1.0); the notice is shipped in the module. You can choose to block or only add points, add domains and define exceptions. Major providers and privacy relays (Gmail, Outlook, Orange, GMX, Proton, Apple or DuckDuckGo hidden addresses…) are never treated as disposable.

**Update now** downloads the list from a fixed HTTPS address, never entered in the back office. It is installed only if it passes all checks: format of each line, size, no major provider, no mass removal. Otherwise, the current list is kept. The SHA-256 fingerprint of the installed list is displayed.

The same tab sets the check that the domain receives mail (MX), the Gmail dots trick, suspicious extensions, and the lists of blocked and trusted addresses or domains.

![Disposable email addresses: verified CC0 list, updates from a fixed source with integrity checks, exceptions](https://www.datafirefly.com/wp-content/uploads/2026/11/disposable-emails-verified-list-dfantispam-en.webp)

## Network and login

- **Trusted IPs** and **blocked IPs**: one per line, range (10.0.0.0/8) or wildcard (1.2.3.*). A malformed rule is flagged on save.
- **Automatic ban**: a network refused 10 times in 24 hours is refused on all forms.
- **Proxies and Cloudflare**: X-Forwarded-For is only read if the request comes from a trusted proxy, and Cloudflare headers only from the ranges published by Cloudflare. A visitor therefore cannot forge their IP.
- **Country**: only with a local source (PrestaShop's GeoLite2 database or the Cloudflare header). VPNs and corporate networks may appear in another country: prefer points over blocking.

### Credential stuffing brake

After too many failures on an account (5 by default) or from a network (20), the next attempt has to wait 1 minute, then the wait doubles with each new failure, up to 30 minutes. A successful login resets the account. Forgotten password has its own counter. The **Clear all locks** button unlocks everything immediately.

![Credential stuffing brake: failures allowed per account and per network, a wait that doubles at each new failure](https://www.datafirefly.com/wp-content/uploads/2026/11/progressive-login-lock-dfantispam-en.webp)

## Captcha and third-party services

### StopForumSpam

Off by default. Once enabled, each checked submission sends data to stopforumspam.org, outside the European Union: the email as an MD5 fingerprint and, if you allow it, the visitor's IP. Mention this service in your privacy policy. If the service does not respond within 3 seconds or returns an error, the submission is not blocked.

### Optional captcha

Turnstile, hCaptcha, reCAPTCHA v2 or v3, on the forms you tick in the **Forms** tab. The secret key is stored encrypted and is never displayed again. The provider's script is only loaded after consent:

- **DataFirefly Cookie Consent** (tarteaucitron): depending on the service the visitor accepted. Since Turnstile is not in the tarteaucitron library, create a custom service with the key shown.
- **Visitor's click**: a "Show verification" button loads the script.
- **Always**: if your consent tool already manages the script.

Without consent, the captcha is never imposed: the invisible signals decide alone. If the provider is down, the submission is not blocked.

![Optional captcha (Turnstile, hCaptcha, reCAPTCHA) loaded only after consent, StopForumSpam off by default](https://www.datafirefly.com/wp-content/uploads/2026/11/optional-captcha-consent-dfantispam-en.webp)

## The log

The log lists blocked submissions, those that would have been blocked in log-only mode, and allowed submissions with points (option). Filter by form, result, layer or false positives, or search for a network, an address or a text. The IP is truncated and the email masked by default.

![Spam log with filters by form, result and layer, explained reasons, truncated IPs and masked emails](https://www.datafirefly.com/wp-content/uploads/2026/11/spam-log-dfantispam-en.webp)

The eye-shaped button opens the detail: layer, points of each signal, received content (displayed as text, never interpreted), user agent and address. The available actions:

- **It was a person**: flags a false positive, counted on the dashboard;
- **Trust this address**: adds it to the trusted addresses (or its domain if the address is masked);
- **Block this network**: adds the network (/24 in IPv4) to the blocked IPs;
- **Delete**.

![Detail of a blocked submission: points of each signal, received content, and false positive, trusted address or block network actions](https://www.datafirefly.com/wp-content/uploads/2026/11/blocking-explanation-dfantispam-en.webp)

**Export to CSV** exports the filtered selection. Cells starting with `=`, `+`, `-` or `@` are neutralized so that a spreadsheet does not execute them.

## What a refused visitor sees

The visitor sees a clear message, your custom message if you entered one, and the store's email address. If the refusal comes from weak signals, a block offers a short question ("what is 4 plus 6?"). After the right answer, they resubmit their form: behavior signals no longer count for 20 minutes. The question works with the keyboard, with a screen reader, and without JavaScript on a dedicated page. It never lifts a hard block (trap field, lists, disposable address, blocking word).

![Refused contact form: clear explanation and accessible human verification, without image or third-party service](https://www.datafirefly.com/wp-content/uploads/2026/11/accessible-human-verification-dfantispam-en.webp)

## The tester

The **Tester** tab answers the question "would this form, with this data, be blocked, and why?". Choose a form, enter an email, names and a message, then describe the browser behavior: time spent, JavaScript, proof of work, trap field, human verification passed. The result details each signal, with its points or the mention "blocks". Nothing is sent, logged or counted. Ready-made examples are provided.

![Built-in tester: would this form with this data be blocked, and why, signal by signal](https://www.datafirefly.com/wp-content/uploads/2026/11/tester-explained-score-dfantispam-en.webp)

## Cleaning up existing accounts

The **Cleanup** tab scans customer accounts (over a period or all) and newsletter addresses. The scan only lists: nothing is ever deleted automatically. Customers who have placed an order are excluded and cannot be modified from here.

- **Export to CSV** the list before acting.
- **Deactivate** (reversible) or **Delete** the ticked accounts. To confirm, you must enter the number of selected accounts.
- A backup is made before each action (addresses included for a deletion), downloadable as JSON from the history.
- **Restore** reactivates deactivated accounts or puts deleted newsletter addresses back.

![Spam account cleanup: scan, accounts with orders protected, strong confirmation, backup and history](https://www.datafirefly.com/wp-content/uploads/2026/11/spam-account-cleanup-dfantispam-en.webp)

## Settings

- **Message shown to refused visitors**, in each language.
- **Log privacy**: truncated IP (recommended), not stored or full; masked or full email; message excerpt; retention period (30 days by default). **Anonymize existing entries** applies these settings to older entries.
- **Attack alert**: an email when the number of submissions stopped in 15 minutes exceeds a threshold, at most one every 6 hours. A button sends a test alert.
- **Maintenance task (cron)**: to be called once a day. It purges old data, updates the disposable list every week and checks the alert. The URL contains a secret token; only one run at a time.
- **Presets**: resets thresholds, points, difficulty and login limits to a preset, without touching lists or forms.

## Permissions and multistore

Every back-office action is protected by a token and requires the right to configure the module; an employee who can only view sees neither a save button nor the cron URL. In multistore, settings can differ per store, and the log, actions and cleanup are limited to the stores of the chosen context.

## Troubleshooting

### A customer says their message was refused

Search for their address or text in the log and open the detail. If the refusal comes from weak signals, they could have passed through human verification. Flag the false positive, trust their address or domain, or lower the severity (light preset, higher threshold).

### A form from another module is not protected

Add a custom rule (see above) and enable the **Custom forms** line. Then test a submission from the store and check the log.

### The style of the verification block does not appear

If CSS combination (CCC) is active, clear the PrestaShop cache after an installation or an update.

### A checkout sign-up form is not checked

A checkout module that takes over the order page must run after the antispam on the `actionDispatcher` hook. The module places itself first on installation; if another module was installed afterwards, reset dfantispam or move it back to the top in **Design > Positions**.

## Limits to be aware of

- No antispam blocks 100% of spam; the module stops common bots and slows down the others.
- The human verification question is simple by design (accessibility): it only lifts weak signals.
- The country filter requires a local geolocation database or Cloudflare.
- The module does not guarantee any legal compliance; optional third-party services fall under your privacy policy.

## Compatibility

- PrestaShop 1.7.8 to 9.x with the same ZIP. Tested on 1.7.8.11, 8.2.1 and 9.1.5, with PHP 7.4, 8.1 and 8.5, Classic and Hummingbird themes.
- Multistore and multilingual.
- Interface translated into French, English, Spanish, German, Italian, Dutch, Polish and Portuguese.
