Skip to content

Instantly share code, notes, and snippets.

@azmeuk
azmeuk / rspamd-whitelisting.md
Created February 3, 2023 10:57 — forked from ThomasLeister/rspamd-whitelisting.md
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
#
# Finds the closest virtualenv root directory, starting from $1, and going up to the root.
# If the target directory is not specified as an argument, current directory is used.
# Prints the virtualenv path found, or nothing otherwise.
#
function venv_find () {
# The cycle is just for the case with broken root folder detection -- never do more than N iterations.
venv_root=${1:-"."}
venv_found=""