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

Font licensing is wild. Proxima Nova — one of the most-used typefaces on the entire web — will run you $65 per style, and a full family license easily clears $300. Futura? Brandon Grotesque? Circular (yes, Spotify’s font)? We’re talking hundreds of dollars before you’ve typed a single character. For personal projects, indie dev work, […]

So you want to set up email on a subdomain. Maybe you’re trying to route support@help.yourdomain.com to your helpdesk, or you want newsletters@mail.yourdomain.com to run through your ESP without torching your main domain’s reputation. Whatever the reason, you’ve landed on the right page. MX records for subdomains are one of those DNS topics that seem […]

If you have ever embedded an audio player on a podcast site, a music portfolio, or a media archive, you have probably noticed that pretty rendered waveform behind the playhead. Libraries like Wavesurfer.js and Peaks.js can draw those visuals on the client, but decoding a 60-minute MP3 in the browser is slow, memory-hungry, and unreliable […]

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.