| 开发者 | mondaydigitallab |
|---|---|
| 更新时间 | 2026年11月24日 20:25 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0+ |
| 版权网址: | 版权信息 |
mdl-spam-filter folder to /wp-content/plugins/.Very likely. It checks any form that asks for an email address, and recognises popular form plugins (Contact Form 7, WPForms, Gravity Forms, Ninja Forms, and similar) even without an email field. It works with most form plugins and simple HTML forms with no extra setup, including forms that send without reloading the page.
Yes. Under Settings → Form targeting choose "Selected forms" and add each form by its ID, class, or name (for example #contact-form or .wpcf7-form). Only the forms you list are checked.
No. Keywords work with no outside service. You only need an API key if you turn on AI detection.
You choose, under Settings → Protection. "Silently discard" shows the form's normal thank-you message while the message is dropped, so bots get no clue. "Show a blocked message" shows a clear message that it was flagged as spam.
No. When a message is spam, none of the emails it would trigger are sent — not the "new message" email to you, and not any automatic reply to the visitor. This needs the outgoing-email check (Settings → Email & logging) turned on, which it is by default.
Yes, as an advanced option. Wrap a keyword in forward slashes to use it as a pattern, for example /\bcheap +rolex\b/. Patterns ignore upper and lower case, and a broken pattern is simply skipped. Every keyword also shows how many messages it has blocked on the Keywords page, so keywords that never match are easy to spot.
Detection is set to "AI only" and the keyword backup (used when the AI can't be reached) is turned off, so keywords are not used. Switch to "Keywords only" or "Keywords, then AI", or turn the keyword backup back on in Settings → AI engine. With the backup on, keywords can still be edited and are used only when the AI service can't be reached.
Yes. Under Settings → AI engine, "Detection rules" lets you use the built-in rules, your own rules, or both. Rules are plain sentences such as "Treat requests for electrical or roofing work as spam — we only do plumbing." If you'd rather not write them, the "Draft rules with AI" helper writes them from a short description of your business (with ready-made templates) — check the draft, change it if needed, and save.
By default, if you use "AI only" and the AI service can't be reached (it is down, too busy, or the API key is wrong), the plugin checks the message with keywords instead, so spam doesn't slip through. You can turn this off in Settings → AI engine. In "Keywords, then AI" mode keywords always run first anyway. A message blocked this way shows the reason "Matched keyword (AI unavailable)". You can also get an email when this happens: turn on the AI error email in Settings → Notifications. It tells you about problems such as a wrong or expired API key, no credit left, or the service being down — at most one email per problem every 10 minutes.
API keys are never included in a settings export. For extra safety, a developer can keep them out of the database completely by adding them to your site's wp-config.php file:
define( 'MDLSF_ANTHROPIC_API_KEY', '...' ); (or MDLSF_OPENAI_API_KEY / MDLSF_CUSTOM_API_KEY).
When a key is set this way, it is used instead of the saved one, and the settings page shows a note instead of the key field.
Yes. Under Settings → Protection, set "Submission limit per minute" to the most messages one visitor can send in a minute. Anything over that is blocked, which stops floods and keeps AI costs down. The default is 20; set it to 0 to turn it off.
Two free bot checks under Settings → Advanced protection. The bot trap (honeypot) adds a hidden field to your forms that people never see; bots fill it in, so those messages are blocked. The minimum submit time blocks forms sent faster than a person could fill them in (bots usually send instantly). Neither check ever blocks a visitor who has JavaScript turned off or is shown a cached page.
Yes. Turn on the language guard under Settings → Advanced protection and pick a mode. Block selected languages & alphabets blocks messages written mostly in a language or alphabet you tick (by default, everything except Latin). Allow only selected languages & alphabets does the opposite: anything written mostly in a language or alphabet you did not tick is blocked, including ones not listed. Either way, it also blocks words disguised with look-alike letters from another alphabet — a common trick to sneak words like "vіаgra" past spam keywords. Languages with accented letters, such as French, German, or Spanish, count as Latin, and a foreign name or city in a normal message is fine. This check is instant and free, and runs before keywords or AI. The guard looks at the alphabet, not the exact language, so it can't tell apart languages that share one, such as Russian and Ukrainian or English and Indonesian. To allow or block one specific language, use AI detection: add a rule under Settings → AI engine → Detection rules such as "We only serve English-speaking customers — treat submissions written entirely in another language as spam." The AI understands every language, so it judges foreign-language spam by what it says.
Yes. Under Settings → Advanced protection, add email addresses, website domains, or IP addresses to the allow list (always let through) or the block list (always blocked). You can also do it in one click: every Filter Log and Review row with a valid email has a "Block sender" link, and Review rows also have "Allow sender" (senders already listed show "On block list" or "On allow list" instead). Each change is recorded in the Activity Log, and both lists can be edited under Settings → Advanced protection.
A place where suspected spam (caught by keywords or AI) waits for your decision instead of being deleted straight away. It is on by default — turn it off with "Hold suspected spam for review" under Settings → Email & logging. While a message is held, your form plugin does not save it and no email is sent until you decide. The visitor still sees the form's normal thank-you message. You can also get an email when a message is held: turn it on under Settings → Notifications. For each held message you can:
Only in this plugin's own log, and only if you turn logging on. They are never saved in your form plugin or email log. Entries don't pile up forever: log and review entries older than the number of days you choose (Settings → Email & logging, default 90 days) are deleted automatically once a day. Set it to 0 to keep entries forever.
Only if you turn on AI detection, or use the "Draft rules with AI" helper. With AI detection on, the text of each message is sent to the AI service you choose (Anthropic, OpenAI, or another provider) to check whether it is spam. The rules helper also sends the business description you type into it. See External Services below. Fields that look like passwords, card numbers, bank details, or other secrets are never sent and never stored in the log.
A record of what happened in the plugin, separate from the Filter Log: settings and keyword changes (which settings changed, never their values), imports and exports, log clean-ups, review decisions, senders blocked or allowed, keywords added from the review queue, weekly digests sent, AI connection tests, test emails, plugin activation, and AI errors. Each entry shows who did it, and entries are deleted after 90 days — change this with "Keep activity entries for (days)" under Settings → Email & logging. Setting values and API keys are never stored here.
Yes. The Filter Log page can export a spreadsheet (CSV) of what you are viewing, using your current search and filters. The Import/Export page copies your settings to another site (API keys are never included), and can also copy just your keywords.
Set one central address under Settings → Notifications and every email the plugin sends — held messages, AI errors, and the weekly digest — goes there. Leave it blank to use the site admin email. Each email can also be turned on or off and given its own address, so you could send the digest to a different mailbox. You can add several addresses to any field (press Enter or type a comma after each), and any address that is not valid is pointed out when you save. Use "Send test email" to check delivery before you rely on it.
Yes. Turn on the weekly digest under Settings → Notifications. Once a week the plugin emails a summary — how much spam was blocked in the last 7 days, how it was caught, the top spam senders, and how many messages are waiting for review — to the central notification address (or the digest's own address; otherwise the site admin email). Nothing is sent in weeks with nothing to report.
WordPress runs scheduled tasks only when someone visits your site. On a quiet, test, or local site they can run late, and the System health card tells you instead of hiding it. Visiting your site once usually runs the task. For a reliable fix, ask your host or developer to set up a real scheduled task (cron job) for WordPress — for example by adding define( 'DISABLE_WP_CRON', true ); to wp-config.php and having the server call wp-cron.php every few minutes. If the card says the schedule looks wrong (a daily task set more than a day ahead), turn the plugin off and on again to reset it.
Yes. These hooks are available:
mdlsf_predefined_keywords (filter) — modify the built-in keyword list.mdlsf_excluded_requests (filter) — mark additional requests (by your own logic) as non-contact-form so they are never scanned.mdlsf_sensitive_field_keys (filter) — modify the list of field-name substrings excluded from scanning, AI, and logging (passwords, tokens, card numbers, etc.).mdlsf_language_guard_threshold (filter) — adjust the ratio of offending-script letters (0–1, default 0.3) above which the language guard blocks.mdlsf_log_max_rows / mdlsf_quarantine_max (filters) — adjust the filter-log row cap and review-queue size cap.mdlsf_ai_prompt (filter) — modify the classification prompt sent to the AI provider, receiving the full prompt text and the sampled submission content.mdlsf_feedback_enabled (filter) — return false to switch off the optional feedback popup shown when the plugin is deactivated.mdlsf_allow_insecure_custom_endpoint (filter) — permit an http:// custom AI endpoint (e.g. a trusted local model).mdlsf_submission_blocked (action) — fires when a submission is blocked, passing the submitter email and the detector verdict.mdlsf_submission_quarantined (action) — fires when a flagged submission is held in the review queue, passing the submitter email and the detector verdict.