Mercurial > prosody-modules
comparison mod_firewall/scripts/spam-blocking.pfw @ 5653:62c6e17a5e9d
Merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Mon, 18 Sep 2023 08:24:19 -0500 |
parents | 09311a8a3cfa |
children |
comparison
equal
deleted
inserted
replaced
5652:eade7ff9f52c | 5653:62c6e17a5e9d |
---|---|
95 # and should be routed normally to handle MUC 'ghosts' correctly | 95 # and should be routed normally to handle MUC 'ghosts' correctly |
96 TO: <*>@<*>/<*> | 96 TO: <*>@<*>/<*> |
97 TYPE: groupchat | 97 TYPE: groupchat |
98 PASS. | 98 PASS. |
99 | 99 |
100 # Mediated MUC invitations are naturally from 'strangers' and have special | |
101 # handling. We lean towards accepting them, unless overridden by custom rules. | |
102 NOT FROM FULL JID? | |
103 INSPECT: {http://jabber.org/protocol/muc#user}x/invite | |
104 JUMP CHAIN=user/spam_check_muc_invite | |
105 | |
100 # Non-chat message types often generate pop-ups in clients, | 106 # Non-chat message types often generate pop-ups in clients, |
101 # so we won't accept them from strangers | 107 # so we won't accept them from strangers |
102 NOT TYPE: chat | 108 NOT TYPE: chat |
103 JUMP CHAIN=user/spam_reject | 109 JUMP CHAIN=user/spam_reject |
104 | 110 |
136 | 142 |
137 JUMP CHAIN=user/spam_check_subscription_request_custom | 143 JUMP CHAIN=user/spam_check_subscription_request_custom |
138 | 144 |
139 ################################################################## | 145 ################################################################## |
140 | 146 |
147 #### Rules for MUC invitations ################################### | |
148 | |
149 ::user/spam_check_muc_invite | |
150 | |
151 # This chain can be used to inspect the invitation and determine | |
152 # the appropriate action. Otherwise, we proceed with the default | |
153 # action below. | |
154 JUMP CHAIN=user/spam_check_muc_invite_custom | |
155 | |
156 # Allow mediated MUC invitations by default | |
157 PASS. | |
158 | |
141 #### Stanzas reaching this chain will be rejected ################ | 159 #### Stanzas reaching this chain will be rejected ################ |
142 ::user/spam_reject | 160 ::user/spam_reject |
143 | 161 |
144 # This chain can be used by other scripts | 162 # This chain can be used by other scripts |
145 # and modules to override the default behaviour | 163 # and modules to override the default behaviour |
149 LOG=Rejecting suspected spam: $(stanza:top_tag()) | 167 LOG=Rejecting suspected spam: $(stanza:top_tag()) |
150 BOUNCE=policy-violation | 168 BOUNCE=policy-violation |
151 | 169 |
152 ################################################################## | 170 ################################################################## |
153 | 171 |
154 #### Stanzas that may be spam, but we're not sure either way###### | 172 #### Stanzas that may be spam, but we're not sure either way ##### |
155 ::user/spam_handle_unknown | 173 ::user/spam_handle_unknown |
156 | 174 |
157 # This chain can be used by other scripts | 175 # This chain can be used by other scripts |
158 # and modules to apply additional checks, or to | 176 # and modules to apply additional checks, or to |
159 # override the default behaviour | 177 # override the default behaviour |