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
).
Example 1. blst_add
usage
... if (src_ip==10.0.0.0/9) blst_add(30); # 30 s else blst_add(); # use default blacklist timeout ...
Adds the source of the current message to the blacklist 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 then
min
, then min
seconds will be
used instead.
If the Retry-After value is greater then
max
, then max
seconds will be
used instead.
Example 2. blst_add_retry_after
usage
... # on_reply route if (msg_status==503){ # blacklist 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 } ...
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 returns false.