Implementing personal whitelists.

532 views
Skip to first unread message

japan...@gmail.com

unread,
Jul 21, 2017, 10:58:47 AM7/21/17
to rspamd
I have been experimenting with rspamd for a day or so.

I am trying to use it with multiple domains and multiple personal user preferences.

Looking for a way that users have their own whitelists, reading what I can find online it looks like a multimap would fit on environment the best.

We would maintain a file for each user, with their own multimap file of whitelisted senders.

I know there are issues with SA and rspamd doing things on an individual basis, but let's assume that each message is being sent to an individual user. 
We should be able to implement that with Exim using PRDR (Per-Recipient Data Responses) or by limiting the number of recipients for each delivery
attempt to one recipient.

Then we pass the message to rspamd, what is the procedure we use to get the multimap system to read the user's personal whitelist?


Are there any examples online or in the user documentation of someone implementing personal whitelists or blacklists?



Regards,


Kai

Andrew Lewis

unread,
Jul 21, 2017, 11:03:58 AM7/21/17
to rsp...@googlegroups.com

Hi Kai,

TIMTOWTDI. Multimap is one way to go about it- you can use conditional
maps to limit these to certain recipients:
https://rspamd.com/doc/modules/multimap.html#conditional-maps ; the
other way to go about it is using settings:
https://rspamd.com/doc/configuration/settings.html

There is currently no possibility to support something like PRDR -
you'll need to see that recipients are batched appropriately (ie. by
deferring recipients which don't share policy with existing recipients).

Best,
-AL.

japan...@gmail.com

unread,
Jul 21, 2017, 11:13:38 AM7/21/17
to rspamd
Wow, that was a quick reply.

Our Exim server (and rspamd) are sitting behind another SMTP server that we control, so we can use PRDR to deliver to Exim and Exim then passes the individual message to rspamd for processing.

I have seen the conditional maps example online and I see some examples use a variable to point to a file location, like in this example:

FILENAME_BLACKLISTED {
  type = "filename";
  filter = "extension";
  map = "${LOCAL_CONFDIR}/filename.map";
  action = "reject";
}


Is there some way to use a unique variable that represents the email address of the recipient?  So we can point multimap to the user's personal map file?

Andrew Lewis

unread,
Jul 21, 2017, 11:22:43 AM7/21/17
to rsp...@googlegroups.com
Hi,

> Is there some way to use a unique variable that represents the email
> address of the recipient? So we can point multimap to the user's personal
> map file?

No - the way to do this would be to create a map that identifies some
particular recipient and use this symbol in `require_symbols` setting
of some other map.

Maybe settings module would work better for your purposes: you could
use this to conditionally enable/disable some symbols; whitelisting
could also be configured in here directly.

Rspamd produces _one_ result: which applies to all recipients.

Best,
-AL.

Reply all
Reply to author
Forward
0 new messages