|
@@ -1,4 +1,4 @@
|
|
|
-Blst Module - Blacklist Management
|
|
|
+Blst Module - Blocklist Management
|
|
|
|
|
|
Andrei Pelinescu-Onciul
|
|
|
|
|
@@ -17,7 +17,7 @@ Andrei Pelinescu-Onciul
|
|
|
2.1. blst_add([timeout])
|
|
|
2.2. blst_add_retry_after(min, max)
|
|
|
2.3. blst_del()
|
|
|
- 2.4. blst_is_blacklisted()
|
|
|
+ 2.4. blst_is_blocklisted()
|
|
|
2.5. blst_set_ignore([flags])
|
|
|
2.6. blst_rpl_set_ignore([flags])
|
|
|
2.7. blst_clear_ignore([flags])
|
|
@@ -28,7 +28,7 @@ Andrei Pelinescu-Onciul
|
|
|
1.1. blst_add usage
|
|
|
1.2. blst_add_retry_after usage
|
|
|
1.3. blst_del usage
|
|
|
- 1.4. blst_is_blacklisted usage
|
|
|
+ 1.4. blst_is_blocklisted usage
|
|
|
1.5. blst_set_ignore usage
|
|
|
1.6. blst_clear_ignore usage
|
|
|
|
|
@@ -42,7 +42,7 @@ Chapter 1. Admin Guide
|
|
|
2.1. blst_add([timeout])
|
|
|
2.2. blst_add_retry_after(min, max)
|
|
|
2.3. blst_del()
|
|
|
- 2.4. blst_is_blacklisted()
|
|
|
+ 2.4. blst_is_blocklisted()
|
|
|
2.5. blst_set_ignore([flags])
|
|
|
2.6. blst_rpl_set_ignore([flags])
|
|
|
2.7. blst_clear_ignore([flags])
|
|
@@ -50,14 +50,14 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
1. Overview
|
|
|
|
|
|
- This module exports blacklist related functions to the script.
|
|
|
+ This module exports blocklist related functions to the script.
|
|
|
|
|
|
2. Functions
|
|
|
|
|
|
2.1. blst_add([timeout])
|
|
|
2.2. blst_add_retry_after(min, max)
|
|
|
2.3. blst_del()
|
|
|
- 2.4. blst_is_blacklisted()
|
|
|
+ 2.4. blst_is_blocklisted()
|
|
|
2.5. blst_set_ignore([flags])
|
|
|
2.6. blst_rpl_set_ignore([flags])
|
|
|
2.7. blst_clear_ignore([flags])
|
|
@@ -65,21 +65,21 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
2.1. blst_add([timeout])
|
|
|
|
|
|
- Adds the source of the current message to the blacklist for timeout
|
|
|
- seconds. If timeout is missing or 0 it uses the default blacklist
|
|
|
- timeout (dst_blacklist_expire).
|
|
|
+ Adds the source of the current message to the blocklist for timeout
|
|
|
+ seconds. If timeout is missing or 0 it uses the default blocklist
|
|
|
+ timeout (dst_blocklist_expire).
|
|
|
|
|
|
Example 1.1. blst_add usage
|
|
|
...
|
|
|
if (src_ip==10.0.0.0/9)
|
|
|
blst_add(30); # 30 s
|
|
|
else
|
|
|
- blst_add(); # use default blacklist timeout
|
|
|
+ blst_add(); # use default blocklist timeout
|
|
|
...
|
|
|
|
|
|
2.2. blst_add_retry_after(min, max)
|
|
|
|
|
|
- Adds the source of the current message to the blacklist for the time
|
|
|
+ Adds the source of the current message to the blocklist for the time
|
|
|
interval specified in the Retry-After header. If the Retry-After header
|
|
|
is missing, it will fail (returns false). If the Retry-After value is
|
|
|
less than min, then min seconds will be used instead. If the
|
|
@@ -89,7 +89,7 @@ else
|
|
|
Example 1.2. blst_add_retry_after usage
|
|
|
...
|
|
|
# on_reply route
|
|
|
-if (msg_status==503){ # blacklist 503 source for Retry-After seconds
|
|
|
+if (msg_status==503){ # blocklist 503 source for Retry-After seconds
|
|
|
if (! blst_add_retry_after(30, 3600))
|
|
|
blst_add(60); # if no retry_after header add it for 60s
|
|
|
}
|
|
@@ -97,8 +97,8 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
|
|
|
|
|
|
2.3. blst_del()
|
|
|
|
|
|
- Removes the source of the current message from the blacklist. If the
|
|
|
- address is not present in the blacklist at the time of the call it
|
|
|
+ Removes the source of the current message from the blocklist. If the
|
|
|
+ address is not present in the blocklist at the time of the call it
|
|
|
returns false.
|
|
|
|
|
|
Example 1.3. blst_del usage
|
|
@@ -106,14 +106,14 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
|
|
|
blst_del();
|
|
|
...
|
|
|
|
|
|
-2.4. blst_is_blacklisted()
|
|
|
+2.4. blst_is_blocklisted()
|
|
|
|
|
|
- Returns true if the source of the current message is blacklisted.
|
|
|
+ Returns true if the source of the current message is blocklisted.
|
|
|
|
|
|
- Example 1.4. blst_is_blacklisted usage
|
|
|
+ Example 1.4. blst_is_blocklisted usage
|
|
|
...
|
|
|
- if (blst_is_blacklisted()){
|
|
|
- log("message from a blacklisted source");
|
|
|
+ if (blst_is_blocklisted()){
|
|
|
+ log("message from a blocklisted source");
|
|
|
drop;
|
|
|
}
|
|
|
...
|
|
@@ -121,7 +121,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
|
|
|
2.5. blst_set_ignore([flags])
|
|
|
|
|
|
Set errors that will not be taken into account when deciding whether to
|
|
|
- blacklist a destination for the current message or a local reply to the
|
|
|
+ blocklist a destination for the current message or a local reply to the
|
|
|
current message.
|
|
|
|
|
|
blst_set_ignore(..) works for forwarding the current message and
|
|
@@ -143,7 +143,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
|
|
|
Note
|
|
|
|
|
|
TCP and TLS send and connect errors are handled per connection and not
|
|
|
- per message. The connection blacklist ignore flags are inherited from
|
|
|
+ per message. The connection blocklist ignore flags are inherited from
|
|
|
the message that caused the connection establishment.
|
|
|
|
|
|
Example 1.5. blst_set_ignore usage
|
|
@@ -157,7 +157,7 @@ Note
|
|
|
|
|
|
2.7. blst_clear_ignore([flags])
|
|
|
|
|
|
- Clears blacklist ignore flags previously set by the corresponding
|
|
|
+ Clears blocklist ignore flags previously set by the corresponding
|
|
|
blst_set_ignore(...) or blst_rpl_set_ignore(...) functions.
|
|
|
|
|
|
See also blst_set_ignore.
|