Skip to main content

Rspamd Configuration Guide

This section helps you understand and customize Rspamd configuration for your specific needs. Unlike pure reference documentation, these guides focus on what to configure and how to configure it effectively.

Configuration Philosophy

Rspamd configuration follows a layered approach:

  1. Start simple - Get working spam filtering with minimal changes
  2. Understand the system - Learn what each configuration area controls
  3. Customize incrementally - Make targeted changes based on real-world results
  4. Monitor and iterate - Continuously improve based on feedback

Getting Started with Configuration

New to Rspamd Configuration?

Recommended path: Foundation → Practical → Advanced

  1. Configuration Fundamentals - What to configure and how
  2. Tool Selection Guide - Choose the right approach for your task
  3. Common Patterns - Proven configuration approaches
  4. Testing and Validation - Ensure your changes work correctly

Specific Configuration Tasks?

Recommended path: Find your task → Apply → Validate

Configuration Areas

Core Configuration

These are the essential areas most users need to understand:

AreaPurposeTypical ChangesImpact Level
Actions & ThresholdsWhat to do at different spam scoresAlmost everyone adjusts🔥 High
Module SettingsWhich tests to run and howCommon for customization🔶 Medium
Worker ConfigurationProcess behavior and integrationMTA integration required🔶 Medium

Advanced Configuration

These areas require deeper understanding but offer powerful customization:

AreaPurposeWhen to ModifyImpact Level
Symbol ScoresFine-tune individual test weightsPerformance optimization🔥 High
Custom RulesBusiness-specific detection logicUnique requirements🔶 Medium
System OptionsDNS, timeouts, resource limitsInfrastructure adaptation🔵 Low

Configuration by Scenario

Different environments have different needs. Find the guide that matches your situation:

By Organization Size

By Use Case

By Integration Type

Configuration Best Practices

File Organization

/etc/rspamd/
├── local.d/ # Your customizations (recommended)
│ ├── actions.conf # Spam thresholds
│ ├── metrics.conf # Symbol scores
│ └── worker-*.inc # Worker settings
├── override.d/ # Complete replacements (advanced)
└── modules.d/ # Don't edit - defaults only

Change Management Process

  1. Backup current configuration before making changes
  2. Test syntax with rspamd -t before restarting
  3. Monitor results in web interface after changes
  4. Document changes for future reference
  5. Have rollback plan for critical changes

Common Mistakes to Avoid

  • ❌ Editing files in /etc/rspamd/ directly
  • ❌ Making multiple changes without testing
  • ❌ Setting unrealistic action thresholds
  • ❌ Disabling essential modules without understanding impact
  • ❌ Ignoring log files during troubleshooting

Configuration Tools and Interfaces

  • Access: http://your-server:11334
  • Best for: Monitoring, basic adjustments, learning
  • Limitations: Not all settings available

Configuration Files (Advanced Users)

  • Location: /etc/rspamd/local.d/
  • Best for: Complex customizations, automation
  • Requirements: Understanding of Rspamd configuration syntax

Command Line Tools

  • rspamc - Query statistics, test messages
  • rspamadm - Administrative tasks, configuration management
  • rspamd -t - Configuration validation

Getting Help with Configuration

Built-in Help

# Check current configuration
rspamc configdump

# Validate configuration files
rspamd -t

# Get help on specific commands
rspamadm help

Documentation Resources

Community Support

Configuration Examples

Quick Start Configuration

Minimal setup for immediate spam filtering:

# /etc/rspamd/local.d/actions.conf
reject = 15;
add_header = 6;
greylist = 4;

Production Configuration

Balanced setup for business email:

``hcl

/etc/rspamd/local.d/actions.conf

reject = 12; add_header = 5; greylist = 3;

/etc/rspamd/local.d/metrics.conf

symbol "FORGED_SENDER" { score = 1.0; }


### High-Volume Configuration
Optimized for performance:

``hcl
# /etc/rspamd/local.d/worker-normal.inc
max_tasks = 200;
task_timeout = 5s;

# /etc/rspamd/local.d/options.inc
dns {
sockets = 32;
timeout = 2s;
}

What's Next?

Choose your path based on your current needs:

Remember: Effective configuration is an iterative process. Start with the basics, monitor results, and refine based on your actual email patterns and business requirements.