Software /
code /
prosody-modules
Changeset
2567:5e1fb7e6b558
mod_firewall: spam-blocking.pfw: Add more extension points
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 Feb 2017 14:19:41 +0000 |
parents | 2566:ed4815bb8fe2 |
children | 2568:01fcc5ebc655 |
files | mod_firewall/scripts/spam-blocking.pfw |
diffstat | 1 files changed, 26 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/scripts/spam-blocking.pfw Fri Feb 24 14:10:42 2017 +0000 +++ b/mod_firewall/scripts/spam-blocking.pfw Fri Feb 24 14:19:41 2017 +0000 @@ -7,11 +7,17 @@ # The following chains are available as extension # points: # +# ::user/spam_check_message_custom +# Apply additional rules to messages from strangers +# # ::user/spam_check_message_content -# Apply additional checks to messages that may be spam +# Apply additional rules to messages that may be spam +# +# ::user/spam_check_presence_custom +# Apply additional rules to presence that may be spam # # ::user/spam_check_subscription_request -# Apply additional checks to subscription requests +# Apply additional rules to subscription requests # # ::user/spam_handle_unknown_custom # Override default handling of stanzas that weren't explicitly @@ -21,11 +27,24 @@ # Override default handling of stanzas that have # been recognised as spam (default is to bounce # a policy-violation error) +# ################################################################## -#### General rules for all incoming stanzas ###################### +#### Entry point for all incoming stanzas ######################## ::deliver +# Override this if you want to prevent certain stanzas going through +# the normal spam_check chain +JUMP_CHAIN=user/spam_check_custom + +# Run the default spam_check chain +JUMP_CHAIN=user/spam_check + +################################################################## + +#### General spam-checking rules (all stanzas) ################### +::user/spam_check + # Pass stanzas that a user sends to their own account TO SELF? PASS. @@ -55,6 +74,8 @@ #### Rules for messages ########################################## ::user/spam_check_message +JUMP CHAIN=user/spam_check_message_custom + # Non-chat message types often generate pop-ups in clients, # so we won't accept them from strangers NOT TYPE: chat @@ -69,6 +90,8 @@ #### Rules for presence stanzas ################################## ::user/spam_check_presence +JUMP CHAIN=user/spam_check_presence_custom + # These may be received if rosters get out of sync and are harmless # because they will not be routed to the client unless necessary TYPE: unsubscribe|unsubscribed