Software /
code /
prosody-modules
Comparison
mod_spam_report_forwarder/README.markdown @ 5238:94472eb41d0a
mod_spam_report_forwarder: Forward spam/abuse reports to one or more JIDs
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Mar 2023 20:20:37 +0000 |
comparison
equal
deleted
inserted
replaced
5237:3354f943c1fa | 5238:94472eb41d0a |
---|---|
1 --- | |
2 labels: | |
3 - 'Stage-Beta' | |
4 summary: 'Forward spam/abuse reports to a JID' | |
5 --- | |
6 | |
7 This module forwards spam/abuse reports (e.g. those submitted by users via | |
8 XEP-0377 via mod_spam_reporting) to one or more JIDs. | |
9 | |
10 ## Configuration | |
11 | |
12 Install and enable the module the same as any other. | |
13 | |
14 There is a single option, `spam_report_destinations` which accepts a list of | |
15 JIDs to send reports to. | |
16 | |
17 For example: | |
18 | |
19 ```lua | |
20 modules_enabled = { | |
21 --- | |
22 "spam_reporting"; | |
23 "spam_report_forwarder"; | |
24 --- | |
25 } | |
26 | |
27 spam_report_destinations = { "antispam.example.com" } | |
28 ``` | |
29 | |
30 ## Protocol | |
31 | |
32 This section is intended for developers. | |
33 | |
34 XEP-0377 assumes the report is embedded within another protocol such as | |
35 XEP-0191, and doesn't specify a format for communicating "standalone" reports. | |
36 This module transmits them inside a `<message>` stanza, and adds a `<jid/>` | |
37 element (borrowed from XEP-0268): | |
38 | |
39 ```xml | |
40 <message from="prosody.example" to="destination.example"> | |
41 <report xmlns="urn:xmpp:reporting:1" reason="urn:xmpp:reporting:spam"> | |
42 <jid xmlns="urn:xmpp:jid:0">spammer@bad.example</jid> | |
43 <text> | |
44 Never came trouble to my house like this. | |
45 </text> | |
46 </report> | |
47 </message> | |
48 ``` |