0

I have set up my rspamd and redis server but the ratelimit doesn't work. The Rspamd speaks to Postfix and my log file doesnt show anything unusual. Even GTUBE works --> So, the spam protection works because rspamd won't accept e-mails with the following content: XJSC4JDBQADN1.NSBN32IDNENGTUBE-STANDARD-ANTI-UBE-TEST-EMAILC.34X

The ratelimit file is stored in /etc/rspamd/local.d/ratelimit.conf and its actually the configuration, which rspamd provides --> https://rspamd.com/doc/modules/ratelimit.html

# local.d/ratelimit.conf
servers="127.0.0.1";
rates {
# Selector based ratelimit
some_limit = {
  selector = 'user.lower';
  # You can define more than one bucket, however, you need to use array syntax only
  bucket = [
  {
    burst = 1;
    rate = "1 / 1min";
  }

  ]
  }

  }

The rspamd-log shows the following lines:

2022-01-02 11:04:26 #64526(main) <zex58i>; lua; ratelimit.lua:767: enabled ratelimit:
some_limit [1 msgs burst, 0.016666666666667 msgs/sec rate]
2022-01-02 11:04:26 #64526(main) <zex58i>; cfg; rspamd_init_lua_filters: init lua
            module ratelimit

The command "rspamadm configtest" says --> syntax OK

I've added the following lines into the main.cf:

milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name}
{auth_authen}
 milter_default_action = accept
smtpd_milters = inet:127.0.0.1:11332
non_smtpd_milters = inet:127.0.0.1:11332

However, if i open the redis-cli and search for keys, no keys are stored regarding the redis chache.

I've set up the redis configuration as well and i used the following tutorial: https://linuxize.com/post/install-and-integrate-rspamd/

Thank you for your help in advance

cd4user
  • 33
  • 6

1 Answers1

0

Solved: Please consider, if you install rspamd, please don't use the offical ubuntu-repository. Even the rspamd project tells, that it could be possible, that the rspamd configuration could have been touched by the developers of ubuntu.

After a reinstall it works now.

Just install it via wget -O- https://rspamd.com/apt-stable/gpg.key | sudo apt-key add - echo "deb http://rspamd.com/apt-stable/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/rspamd.list

cd4user
  • 33
  • 6