Blame
|
1 | # Mailu |
||||||
| 2 | ||||||||
| 3 | ## Spamd Training |
|||||||
| 4 | ||||||||
| 5 | In the `mailu-dovecot` container run e.g. |
|||||||
| 6 | ```bash |
|||||||
|
7 | JUNKFOLDERS="/mail/mail@redimp.de/.Junk/cur/ /mail/rebecca@hillenkoetter.de/.Junk/cur/ /mail/christian@hillenkoetter.de/.Junk/cur/" |
||||||
|
8 | # fuzzy add |
||||||
|
9 | rspamc -h mailu-rspamd:11334 -P mailu -f 11 fuzzy_add $JUNKFOLDERS |
||||||
|
10 | # learn spam |
||||||
|
11 | rspamc -h mailu-rspamd:11334 -P mailu learn_spam $JUNKFOLDERS |
||||||
|
12 | ``` |
||||||
| 13 | ||||||||
| 14 | Note: `learn error: all learn conditions denied learning ham in default classifier` is miss worded, with debug log on it reads: |
|||||||
| 15 | `rspamd_stat_classifier_is_skipped: learn condition for classifier bayes returned: already in class spam; probability 100.00%; skip classifier`. |
|||||||
|
16 | |||||||
| 17 | ### fuzzy flags `-f` |
|||||||
| 18 | ||||||||
| 19 | Defined in `mailu-rspamd:/etc/rspamd/local.d/fuzzy_check.conf` |
|||||||
| 20 | ||||||||
| 21 | ```cpp |
|||||||
| 22 | ... |
|||||||
| 23 | fuzzy_map = { |
|||||||
| 24 | LOCAL_FUZZY_DENIED { |
|||||||
| 25 | # Local threshold |
|||||||
| 26 | max_score = 20.0; |
|||||||
| 27 | # Flag to match |
|||||||
| 28 | flag = 11; |
|||||||
| 29 | } |
|||||||
| 30 | LOCAL_FUZZY_PROB { |
|||||||
| 31 | max_score = 10.0; |
|||||||
| 32 | flag = 12; |
|||||||
| 33 | } |
|||||||
| 34 | LOCAL_FUZZY_WHITE { |
|||||||
| 35 | max_score = 2.0; |
|||||||
| 36 | flag = 13; |
|||||||
| 37 | } |
|||||||
| 38 | } |
|||||||
| 39 | ``` |
|||||||
|
40 | |||||||
| 41 | ### Fulltext Search indices |
|||||||
| 42 | ||||||||
| 43 | ```bash |
|||||||
| 44 | # check the cache sizes |
|||||||
| 45 | find /mail -type d -name xapian-indexes -exec du -sh {} \; | sort -h |
|||||||
| 46 | ``` |
|||||||
| 47 | ||||||||
| 48 | <https://doc.dovecot.org/main/core/man/doveadm-fts.1.html> |
|||||||
| 49 | ||||||||
| 50 | ```bash |
|||||||
| 51 | # Removes mails from the index that have already been expunged |
|||||||
| 52 | doveadm fts rescan -u mail@nachtling.com |
|||||||
| 53 | ``` |
|||||||
