Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@hiandras

This comment has been minimized.

Copy link

hiandras commented Mar 12, 2019

Hi,

In: /etc/rspamd/local.d/multimap.conf
the prefilter = "true";
should be prefilter = true;
(without quotation marks).

That is how it worked for me. (Version 1.8.3)
Regards,
hiandras

@pannal

This comment has been minimized.

Copy link

pannal commented Mar 14, 2019

Sorry for the slight offtopic:

Does the rspamc learn_ham only train the bayes filter or does it actually add some whitelisting on its own?

I've just had an email where bayes was 100% sure it wasn't spam, but their other parameters were so bad, it was marked as spam. Does learn_ham help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.