spamhaus / rspamd-dqs

Spamhaus code for RSPAMD Plugin. See https://docs.spamhaustech.com/40-real-world-usage/Rspamd/000-intro.html for instructions
Apache License 2.0
64 stars 12 forks source link

[Rspamd 2.0 compatibility] How to migrate emails.conf and surbl.conf? #1

Closed HansVanEijsden closed 5 years ago

HansVanEijsden commented 5 years ago

Rspamd 2.0 has been released. The emails.conf and surbl.conf are deprecated. The changelog mentiones this:

RBL module improvements and replacement of the SURBL and Emails module
RBL module has replaced both emails and surbl modules unifying all Runtime Black Lists checks in a single place. It has added new RBL types, such as selectors, and the simplified extending of the existing rules to more powerful ones.
Emails rules with maps instead of DNS RBLs are NO LONGER SUPPORTED. Please use multimap with selectors instead.

And the upgrade notes are mentioning this:

RBL module has replaced both emails and surbl module unifying all Runtime Black Lists checks in a single place. The existing rules are normally automatically converted to rbl syntax which also includes even your local.d defines. override.d defines act as local.d overrides unfortunately. If you need to use overrides then please consider converting them to override.d/rbl.conf rules.

After running rspamadm configtest I receive this message:

conflicting names in surbl and rbl rules: DBL, prefer surbl rule!
symbol 'RBL_SPAMHAUS_ZEN' has its score defined but there is no corresponding rule registered
syntax OK

What do I have to do to solve the issues? And/or migrating emails.conf and surbl.conf to rbl.conf? Thanks!

tjharman commented 5 years ago

I fixed this by changing

rbls {
  spamhaus {
    rbl = "<key>.zen.dq.spamhaus.net";
    returncodes {
      RBL_SPAMHAUS_ZEN = "127.0.0.";
    }
  }

to

rbls {
  spamhaus_dq {
    rbl = "<key>.zen.dq.spamhaus.net";
    returncodes {
      RBL_SPAMHAUS_ZEN = "127.0.0.";
    }
  }

It seems something else is using the spamhaus name now, and overwriting what's in local.conf

vstakhov commented 5 years ago

I think I need to make a pull request. Or somebody else can do it :) That should be similar to the existing surbl -> rbl transition done in Rspamd.

ricalfieri commented 5 years ago

Hello everyone, I'm in the process of releasing a version compatible with 2.x branch; please have a little patience, and thanks for the tip above :)

tjharman commented 5 years ago

Thank YOU @ricalfieri ! :-)

vstakhov commented 5 years ago

By the way, new rbl plugin supports almost any possible lookup you can do for a single message using the selectors framework. Please do not hestitate to contact me directly (e.g. via email) if you have ideas about other useful checks that could be helpful to fight spam using your DQS service.

ricalfieri commented 5 years ago

hello, I released a ruleset for 2.x so I'm closing this issue. let me know if everything is ok and if you find bugs please open another issue