Software /
code /
prosody-modules
Comparison
mod_firewall/scripts/spam-blocking.pfw @ 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 |
parent | 2566:ed4815bb8fe2 |
child | 2571:a33edc07d829 |
comparison
equal
deleted
inserted
replaced
2566:ed4815bb8fe2 | 2567:5e1fb7e6b558 |
---|---|
5 # modules as desired. | 5 # modules as desired. |
6 # | 6 # |
7 # The following chains are available as extension | 7 # The following chains are available as extension |
8 # points: | 8 # points: |
9 # | 9 # |
10 # ::user/spam_check_message_custom | |
11 # Apply additional rules to messages from strangers | |
12 # | |
10 # ::user/spam_check_message_content | 13 # ::user/spam_check_message_content |
11 # Apply additional checks to messages that may be spam | 14 # Apply additional rules to messages that may be spam |
15 # | |
16 # ::user/spam_check_presence_custom | |
17 # Apply additional rules to presence that may be spam | |
12 # | 18 # |
13 # ::user/spam_check_subscription_request | 19 # ::user/spam_check_subscription_request |
14 # Apply additional checks to subscription requests | 20 # Apply additional rules to subscription requests |
15 # | 21 # |
16 # ::user/spam_handle_unknown_custom | 22 # ::user/spam_handle_unknown_custom |
17 # Override default handling of stanzas that weren't explicitly | 23 # Override default handling of stanzas that weren't explicitly |
18 # passed or rejected by the anti-spam checks | 24 # passed or rejected by the anti-spam checks |
19 # | 25 # |
20 # ::user/spam_reject_custom | 26 # ::user/spam_reject_custom |
21 # Override default handling of stanzas that have | 27 # Override default handling of stanzas that have |
22 # been recognised as spam (default is to bounce | 28 # been recognised as spam (default is to bounce |
23 # a policy-violation error) | 29 # a policy-violation error) |
30 # | |
24 ################################################################## | 31 ################################################################## |
25 | 32 |
26 #### General rules for all incoming stanzas ###################### | 33 #### Entry point for all incoming stanzas ######################## |
27 ::deliver | 34 ::deliver |
35 | |
36 # Override this if you want to prevent certain stanzas going through | |
37 # the normal spam_check chain | |
38 JUMP_CHAIN=user/spam_check_custom | |
39 | |
40 # Run the default spam_check chain | |
41 JUMP_CHAIN=user/spam_check | |
42 | |
43 ################################################################## | |
44 | |
45 #### General spam-checking rules (all stanzas) ################### | |
46 ::user/spam_check | |
28 | 47 |
29 # Pass stanzas that a user sends to their own account | 48 # Pass stanzas that a user sends to their own account |
30 TO SELF? | 49 TO SELF? |
31 PASS. | 50 PASS. |
32 | 51 |
53 PASS. | 72 PASS. |
54 | 73 |
55 #### Rules for messages ########################################## | 74 #### Rules for messages ########################################## |
56 ::user/spam_check_message | 75 ::user/spam_check_message |
57 | 76 |
77 JUMP CHAIN=user/spam_check_message_custom | |
78 | |
58 # Non-chat message types often generate pop-ups in clients, | 79 # Non-chat message types often generate pop-ups in clients, |
59 # so we won't accept them from strangers | 80 # so we won't accept them from strangers |
60 NOT TYPE: chat | 81 NOT TYPE: chat |
61 JUMP CHAIN=user/spam_reject | 82 JUMP CHAIN=user/spam_reject |
62 | 83 |
66 | 87 |
67 ################################################################## | 88 ################################################################## |
68 | 89 |
69 #### Rules for presence stanzas ################################## | 90 #### Rules for presence stanzas ################################## |
70 ::user/spam_check_presence | 91 ::user/spam_check_presence |
92 | |
93 JUMP CHAIN=user/spam_check_presence_custom | |
71 | 94 |
72 # These may be received if rosters get out of sync and are harmless | 95 # These may be received if rosters get out of sync and are harmless |
73 # because they will not be routed to the client unless necessary | 96 # because they will not be routed to the client unless necessary |
74 TYPE: unsubscribe|unsubscribed | 97 TYPE: unsubscribe|unsubscribed |
75 PASS. | 98 PASS. |