CHECKING STATUS
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

Spend a lot of time with Vikunja (cubicFUSION Vikunja Importer) lately, one thing that it is currently missing is an easy way to style the interface. Especially the task view is just one long page without any clear section separation. LET’S TWEAK IT Here a quick starting point to tweak the style quickly. You can […]

File synchronization is usually treated as a cloud problem. Put the folder in Dropbox, Google Drive, OneDrive, or iCloud, wait for everything to upload, and hope the storage quota, privacy model, transfer speed, and client support all line up with your workflow. That works for office documents. It gets awkward fast when you are syncing […]

An Elementor widget that renders a fully configurable honeycomb grid. Each hexagon cell carries an icon or image, title, text, and a link. The grid supports two orientations, responsive column and size controls, rounded corners, hover effects, hover-reveal modes, per-cell style overrides, a media-gallery source with lightbox, auto-fit columns, background fill, and drop shadows. Content […]

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.