[Rspamd-Users] INTRODUCTION rule disable best practice

Sophie Loewenthal sophie at klunky.co.uk
Tue May 28 15:04:45 UTC 2019

Hi guys,

Is this link still the correct way to disable the rule?
https://rspamd.com/doc/faq.html#how-can-i-disable-some-rspamd-rules-safely <https://rspamd.com/doc/faq.html#how-can-i-disable-some-rspamd-rules-safely>

How can I disable some Rspamd rules safely
The best way is to add a condition for the specific symbol. This could be done, for example, in /etc/rspamd/rspamd.local.lua:

rspamd_config:add_condition('SOME_SYMBOL', function(task) return false end)
You can add more complex conditions but this one is the easiest in terms of rules management and upgrades.

Additionally you can dynamically selectively enable/disable symbols with settings module <http://rspamd.com/doc/configuration/settings.html>.

To disable an entire module you can set enabled = false in its configuration.

The rule in question is:

        one_shot = true;
        group = "scams";
        re = "/\\b(?:my name is\\b|(?:i am|this is)\\s+(?:mr|mrs|ms|miss|master|sir|prof(?:essor)?|d(?:octo)?r|rev(?:erend)?)(?:\\.|\\b))/{sa_body}i";
        description = "Sender introduces themselves";
        score = 2;

Best, Sophie

More information about the Users mailing list