Whitelist and Blacklist

929 views
Skip to first unread message

Esteban Gutiérrez

unread,
Feb 17, 2017, 10:40:14 AM2/17/17
to rspamd
Hi!

I wondering how can I add some domains to a whitelist or blacklist?

For example: Does not matter if the domain has a correct SPF and DKIM I just want to block all messages from that domain.

The same for whitelist, does not matter if the domain send me an email from a blocked ip or incorrect SPF, I want to receive all the messages from that domain.

Hope someone can help me.

Regards.

Andrew Lewis

unread,
Feb 17, 2017, 12:27:17 PM2/17/17
to rsp...@googlegroups.com
Hi Esteban,

> For example: Does not matter if the domain has a correct SPF and DKIM I
> just want to block all messages from that domain.

For this purpose you could use multimap (with "from" and/or "header"
type): https://rspamd.com/doc/modules/multimap.html

Best,
-AL.

Esteban Gutiérrez

unread,
Feb 17, 2017, 3:19:52 PM2/17/17
to rspamd
Thank you Andrew, it is working now.

One more question, I have several domains hosted in the server, can I apply different rules (With multimap) to each of my domains?

Andrew Lewis

unread,
Feb 17, 2017, 4:03:28 PM2/17/17
to rsp...@googlegroups.com

Hi Esteban,

> One more question, I have several domains hosted in the server, can I apply
> different rules (With multimap) to each of my domains?

Yes, you can enable symbols selectively using settings:
https://rspamd.com/doc/configuration/settings.html

Conditional maps are also a way to do it:
https://rspamd.com/doc/modules/multimap.html#conditional-maps

Best,
-AL.

Esteban Gutiérrez

unread,
Feb 17, 2017, 4:46:11 PM2/17/17
to rspamd
This is the example:

# local.d/multimap.conf
FROM_WHITELISTED {
  require_symbols = "R_SPF_ALLOW & !MAILLIST";
  type = "from";
  map = "/some/list";
}

But I want to apply the config that I created in multimap.conf (override.d) to a selected domains hosted on my server.

This is one config:

SENDER_FROM_BLACKLIST_USER {
  type = "from";
  filter = "email";
  map = "file://etc/rspamd/override.d/blacklist-from.map";
  action = "reject"; # Prefilter mode
}

That apply for all domains hosted in my server, but what do I have to do to apply that just for one of my hosted domains?

Andrew Lewis

unread,
Feb 17, 2017, 5:56:27 PM2/17/17
to rsp...@googlegroups.com

Hi Esteban,

> But I want to apply the config that I created in multimap.conf (override.d)
> to a selected domains hosted on my server.

You could create `rcpt` maps (or write some custom rule) and reference
the symbols in `require_symbols`- or just use settings module which is
the intended way to do such things in general:
https://rspamd.com/doc/configuration/settings.html

Best,
-AL.

Reply all
Reply to author
Forward
0 new messages