STATUS ÜBERPRÜFEN
I AM LISTENING TO
|

mosparo – Adding your own shared rule packages

11. November 2025
.SHARE

Table of Contents

mosparo’s rule packages are a powerful way to protect your forms from spam without relying on external services. As an open-source spam protection solution, mosparo puts you in control of your form security through customizable rule sets that analyze submitted content in real-time.

One of mosparo’s standout features is its rule package system, which not only allows you to create sophisticated spam filters tailored to your needs but also makes it incredibly easy to share these rules between different mosparo installations. Whether you’re managing multiple projects, collaborating with team members, or contributing to the community, you can export your carefully crafted rule packages and import them elsewhere with just a few clicks. This portability means you don’t have to recreate the wheel – once you’ve developed an effective ruleset, you can deploy it across all your mosparo instances or share it with others facing similar spam challenges.

5 Days of Docker: Setting up mosparo.

What are Rule Packages?

Rule packages in mosparo are collections of rules that define what content should be blocked or allowed in your forms. They work by analyzing submitted form data and matching it against patterns you’ve defined, helping you filter out spam while letting legitimate submissions through.

Creating Your First Rule Package

To create a rule package, navigate to the rule packages section in your mosparo administration panel. Each package consists of individual rules that can check for:

  • Specific words or phrases that commonly appear in spam
  • Regular expressions for more complex pattern matching
  • Domain and URL patterns to catch suspicious links
  • Email patterns to identify disposable or suspicious addresses

Rule Types and Configuration

mosparo supports different rule types to give you flexibility:

Word rules are straightforward – they block submissions containing specific words. You can make them case-sensitive or insensitive depending on your needs.

Regex rules offer more sophisticated matching. For example, you might create a pattern to catch common spam phrases while allowing legitimate variations.

Domain rules help you block known spam domains while maintaining a whitelist of trusted sources.

Sharing Rule Packages

The export and import functionality makes collaboration effortless. You can export your rule package as a JSON file and share it with colleagues, deploy it to staging and production environments, or even contribute it to the mosparo community. When importing, mosparo validates the package structure and allows you to review the rules before activation, ensuring you maintain control over what gets implemented in your installation.

Best Practices

Start with a minimal ruleset and expand based on the spam you actually receive. Overly aggressive rules can lead to false positives, blocking legitimate users. Test your rules thoroughly before deploying them to production, and regularly review blocked submissions to ensure you’re not catching valid content.

Maintaining Your Rules

Rule packages require ongoing maintenance. As spammers adapt their tactics, you’ll need to update your rules accordingly. Schedule regular reviews of your blocked and allowed submissions to identify patterns and adjust your rules for optimal protection.

Example

Also see the OpenGist here.

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Content editing in Elementor Elementor excels at layout-building and design flexibility, but when it comes to long-form content or complex structured text, traditional editors quickly hit their limits. That’s where the Gutenberg Editor — specifically the Isolated Block Editor (IBE) — becomes a game-changer. TinyMCE simply doesn’t hold up inside Elementor, and after years of […]

If you’ve ever tried to style text in a WYSIWYG editor and ended up with HTML that looked like a spaghetti disaster, you’ve already met the reason why semantic editors meaning, structure, and sanity. In other words: they keep your content clean, organized, and machine-friendly. This article walks you through the most important semantic and […]

If you’ve ever worked with text editors on the web, you know the routine: dependencies everywhere, fragile integrations, and editors that only behave when the stars align. The Isolated Block Editor (IBE) solves this by taking the core of Gutenberg and making it work anywhere — no WordPress environment required. It gives you the power […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.