Skip to content

Instantly share code, notes, and snippets.

@kapsiR
Forked from ThomasLeister/rspamd-whitelisting.md
Created April 19, 2023 13:25
Show Gist options
  • Save kapsiR/1d32ee5f8aafad002ec7e238f55c41e0 to your computer and use it in GitHub Desktop.
Save kapsiR/1d32ee5f8aafad002ec7e238f55c41e0 to your computer and use it in GitHub Desktop.
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";
  }

/etc/rspamd/local.d/ip_whitelist.map:

  192.168.122.3
  192.168.122.4

Lower spam score of e-mails with a certain domain name (post-filter mode)

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

  WHITELIST_SENDER_DOMAIN {
      type = "from";
      filter = "email:domain";
      map = "/etc/rspamd/local.d/whitelist.sender.domain.map";
      score = -6.0
  }

/etc/rspamd/local.d/whitelist.sender.domain.map:

  meinedomain.tld
  anderedomain.tld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment