Comparison

mod_report_forward/README.markdown @ 5878:fcfe490de8a4

mod_spam_report_forwarder: Rename to mod_report_forward This module is not only about spam reports.
author Matthew Wild <mwild1@gmail.com>
date Sun, 03 Mar 2024 16:03:27 +0000
parent 5238:mod_spam_report_forwarder/README.markdown@94472eb41d0a
comparison
equal deleted inserted replaced
5877:97c9b76867ca 5878:fcfe490de8a4
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 ```lua
15 modules_enabled = {
16 ---
17 "report_forward";
18 ---
19 }
20 ```
21
22 There are two main options. You can set `report_forward_to` which accepts a
23 list of JIDs to send all reports to (default is empty):
24
25 ```lua
26 report_forward_to = { "antispam.example.com" }
27 ```
28
29 You can also control whether the module sends a report to the server from
30 which the spam/abuse originated (default is `true`):
31
32 ```lua
33 report_forward_to_origin = false
34 ```
35
36 The module looks up an abuse report address using XEP-0157 (only XMPP
37 addresses are accepted). If it fails to find any suitable destination, it will
38 log a warning and not send the report.
39
40
41
42 ## Protocol
43
44 This section is intended for developers.
45
46 XEP-0377 assumes the report is embedded within another protocol such as
47 XEP-0191, and doesn't specify a format for communicating "standalone" reports.
48 This module transmits them inside a `<message>` stanza, and adds a `<jid/>`
49 element (borrowed from XEP-0268):
50
51 ```xml
52 <message from="prosody.example" to="destination.example">
53 <report xmlns="urn:xmpp:reporting:1" reason="urn:xmpp:reporting:spam">
54 <jid xmlns="urn:xmpp:jid:0">spammer@bad.example</jid>
55 <text>
56 Never came trouble to my house like this.
57 </text>
58 </report>
59 </message>
60 ```
61
62 It may also include the reported message, if this has been indicated by the
63 user, wrapped in a XEP-0297 `<forwarded/>` element:
64
65 ```xml
66 <message from="prosody.example" to="destination.example">
67 <report reason="urn:xmpp:reporting:spam" xmlns="urn:xmpp:reporting:1">
68 <jid xmlns="urn:xmpp:jid:0">spammer@bad.example</jid>
69 <text>Never came trouble to my house like this.</text>
70 </report>
71 <forwarded xmlns="urn:xmpp:forward:0">
72 <message from="spammer@bad.example" to="victim@prosody.example" type="chat" xmlns="jabber:client">
73 <body>Spam, Spam, Spam, Spam, Spam, Spam, baked beans, Spam, Spam and Spam!</body>
74 </message>
75 </forwarded>
76 </message>
77 ```