add example how to write own rules

This commit is contained in:
psy 2021-05-01 11:58:32 +02:00
parent f9c80329b9
commit 64530f3fe8
No known key found for this signature in database
GPG key ID: DFF5B17AC3A8ECF5

View file

@ -55,3 +55,21 @@ rspamd can sign outgoing mails with dkim. the following steps are necessary:
## spam learning ## spam learning
To train ham/spam from move actions from/to junk folder, `imap_sieve` needs to be enabled in dovecot. To train ham/spam from move actions from/to junk folder, `imap_sieve` needs to be enabled in dovecot.
## writing manual rules
example:
```
files:
"/etc/rspamd/local.d/rspamd.lua":
owner: _rspamd
group: root
mode: "0640"
content: |
-- Generica
config['regexp']['SUBJECT_GENERICA'] = {
re = 'Subject=/Die besten Generica/Hu',
description = 'Subject contains "Die besten Generica"',
score = 13.37,
group = 'headers'
}
```