per email/domain whitelist/blacklist

2,120 views
Skip to first unread message

vurg...@gmail.com

unread,
May 26, 2015, 12:42:29 PM5/26/15
to rsp...@googlegroups.com
Hello,
is there a way to accomplish per domain or per email address blacklist or whitelist exported as user settings (https://rspamd.com/doc/configuration/settings.html) ?
If so could you give us a few examples. I made few tests, but looks likes nothing happened or I missed something

Vsevolod Stakhov

unread,
May 27, 2015, 5:47:19 AM5/27/15
to vurg...@gmail.com, rsp...@googlegroups.com
Could you show your tests please?

--
Vsevolod Stakhov

vurg...@gmail.com

unread,
May 27, 2015, 6:15:19 AM5/27/15
to rsp...@googlegroups.com, vurg...@gmail.com

According to this configuration, I expect all emails to us...@example.com to be rejected or at least to be penalized by 10 points
This was saved to rspamd_dynamic file (located in /var/lib/rspamd)

settings {
    user1 {
        priority = high;
        rcpt = "us...@example.com";
        apply "default" {
            actions {
                         reject = 10.0
            }
       }
   }
}

Vsevolod Stakhov

unread,
May 27, 2015, 7:58:19 AM5/27/15
to vurg...@gmail.com, rsp...@googlegroups.com
This means that the messages for recipient 'us...@example.com' will have
reject score threshold equal to `10`. I suppose you are looking for a
different thing that's implemented by multimap module:

https://rspamd.com/doc/modules/multimap.html

--
Vsevolod Stakhov

rspam...@judo.za.org

unread,
Jun 24, 2015, 1:54:15 PM6/24/15
to rsp...@googlegroups.com, vurg...@gmail.com
Hey,

The problem with a per-recipient white/blacklist is firstly assuring that messages with conflicting policies are not batched together - you could achieve this by deferring at SMTP time accordingly.

The way to do this with settings module would be to add a zero-value 'dummy' symbol to /all/ messages and use the settings module to adjust this symbol's value.

To enable such a dummy symbol, add the following to /etc/rspamd/lua/rspamd.local.lua

rspamd_config.R_DUMMY = function (task)
  return true
end

... and register R_DUMMY in metrics.conf or equivalent.

Settings could be configured by adding something like:

settings = "http://example.com/settings"
or:
settings = "file://$CONFDIR/settings"

... to config, where the referenced file could contain something like:

settings {
    creative_blacklist_name_one {
        priority = high;
        from = "@example.com";
        rcpt = "@example.net";
        apply "default" {
            R_DUMMY = 100.0;
        }
    }
}

Best,
-AL.
Reply all
Reply to author
Forward
0 new messages