[Release] Rspamd web interface plugin for DirectAdmin - v0.1

It's been 3 days since I installed and the interface is zeroed: http://prntscr.com/oys8bf

I did 2 changes in that situation open one udp port that was in error and it set some level that was not set

Also it is disable by default on all users to auto enable it there is code for spam assign in help.directadmin.com
 
Everything is installed: rspamd, easyspamblocker, cracker, there is big email traffic on the server, for sure there must be some numbers in terms of spam, however rspamd web stats shows 0. Where could i have made mistake? How can i test it?
 
Run each command one by one and control output results. Probably you have errors after any of them. Post last 10-20 lines from each of the following:

Code:
./build exim


./build rspamd


./build exim_conf

Installation via plugin from directadmin was showing error so I installed it using commands and it workings.

I appropriate for your hard work.

Any tutorial on how to use symbols?
 
I get this error on servers when installing:
CPU doesn't have SSSE3 instructions set required for hyperscan, disable it

I found how i sould be able to solve this but it seems not to be working.
I found online i should be able to disable hyperscan.
set: disable_hyperscan = true; in local.d/options.inc.

However this does not solve the issue.
I tried putting it in other files but also did not solve the issue.

Does someone else has this issue?
Is there anyone who knows how to solve this with Directadmin setup?
 
Hi All.

After update Rspamd web interface from 0.1.1 to 0.1.2 the Plugin is not anymore showing in "Extra Features" section.

OS: Centos 8 and also Centos 7
Skin: enhanced
Level: Admin
 
Try and check a plugin and click "Install" on a plugin manager page. There is a "feature" in Directadmin with plugin updates, then we need to do "Install" once again.
 
Try and check a plugin and click "Install" on a plugin manager page. There is a "feature" in Directadmin with plugin updates, then we need to do "Install" once again.

I have try again: install , activate, deactivate , activate aso.

Nothing change.

When i put /CMD_PLUGINS_ADMIN/rspamd/index.raw behind the 2222 it works !

Also when i switch to evolution skin it works and it show the entry for the plugin.
when i switch back to the enhanced skin the entry is lost.
 
Last edited:
Rpsamd web interface plugin in Debian OS

Rpsamd is a binary replacement of SpamAssassin.

Before installing rspamd check a server to meet the Requirements:

- DirectAdmin Version 1.56.0 or higher
- CentOS
- Exim
- EasySpamFighter 1.17+
- exim.conf 4.5+

Rpsamd is distributed also in Debian packages.
Is there any way to install DirectAdmin Rpsamd web interface plugin in Debian OS?

Thanks
 
Hi,

Anyone know it the DirectAdmin Rpsamd web interface plugin only work in CENTOS ?

Thanks.
 
Hi,

When we try to use the learn function to upload a spam email, it gives the following error:

local > Request failed: Unknown statistics error, found when storing data on backend; classifier: (null)

Any idea what could be going on?

Regards
 
Thanks for this, great work! :)

Small question, how can i toggle the display of columns in the History tab?
Normally this is:
IDIP address[Envelope From] From[Envelope To] To/Cc/BccSubjectActionScoreMsg sizeScan timeTimeAuthenticated user


But now only:
IDIP addressActionScoreMessage sizeScan timeTimeAuthenticated user

I would really like to see all details.

Also, when i expand a message i do not see all details:
1574158763292.png

While on another instance (not DA):

1574158906577.png

Any tips on how to adjust this?
 
Brent,

Thanks for your feedback.

@all,

segfaults mentioned in the post #21 have been already fixed by the author of Rspamd. It's running fine with experimental version 2.x as well.

Rspamd 2.x:

For those who runs the version 2.x, they switched to Redis for collecting stats, it used to be sqlite in the version 1.9.x. This change might produce unexpected errors when teaching emails as SPAM or HAM in the WebUI. Here is a possible fix:

Upload the following content into /etc/rspamd/local.d/statistic.conf and restart rspamd:

Code:
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
# parameters defined on the top level
#
# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
# parameters defined on the top level
#
# For specific modules or configuration you can also modify
# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
#
# See https://rspamd.com/doc/tutorials/writing_rules.html for details


# Rspamd statistic setup
# Pre-built files could be loaded from:
# http://rspamd.com/rspamd_statistics/bayes.spam.sqlite
#  - and -
# http://rspamd.com/rspamd_statistics/bayes.ham.sqlite


classifier "bayes" {
  tokenizer {
    name = "osb";
  }
  cache {
    path = "${DBDIR}/learn_cache.sqlite";
  }
  min_tokens = 11;
  backend = "sqlite3";
  languages_enabled = true;
  min_learns = 200;


  statfile {
    symbol = "BAYES_HAM";
    path = "${DBDIR}/bayes.ham.sqlite";
    spam = false;
  }
  statfile {
    symbol = "BAYES_SPAM";
    path = "${DBDIR}/bayes.spam.sqlite";
    spam = true;
  }
  learn_condition =<<EOD
return function(task, is_spam, is_unlearn)
  local learn_type = task:get_request_header('Learn-Type')


  if not (learn_type and tostring(learn_type) == 'bulk') then
    local prob = task:get_mempool():get_variable('bayes_prob', 'double')


    if prob then
      local in_class = false
      local cl
      if is_spam then
        cl = 'spam'
        in_class = prob >= 0.95
      else
        cl = 'ham'
        in_class = prob <= 0.05
      end


      if in_class then
        return false,string.format('already in class %s; probability %.2f%%',
          cl, math.abs((prob - 0.5) * 200.0))
      end
    end
  end


  return true
end
EOD


}

This is a version of the config for 1.9.x with a slight modification, and will make rspamd to use sqlite.
If you want to use redis with rspamd additional steps are required.

I managed to get redis to work with rspamd.

yum install -y redis
nano -w /etc/redis.conf (uncomment requirepass and set a password to it)
systemctl restart redis

nano -w /etc/rspamd/local.d/redis.conf
Code:
  servers = "127.0.0.1"; # Read servers (unless write_servers are unspecified)
  write_servers = "127.0.0.1"; # Servers to write data
  disabled_modules = ["ratelimit"]; # List of modules that should not use redis from this section
  timeout = 1s;
  db = "0";
  password = "replace_with_the_password_you_set_in_redis_config";

systemctl restart rspamd

Now, it should work.
 
Hi,

When we try to use the learn function to upload a spam email, it gives the following error:

local > Request failed: Unknown statistics error, found when storing data on backend; classifier: (null)

Any idea what could be going on?

Regards
Try to deploy redis using the steps in my previous post. I think you are on the newer version of rspamd
 
I managed to get redis to work with rspamd.

yum install -y redis
nano -w /etc/redis.conf (uncomment requirepass and set a password to it)
systemctl restart redis

nano -w /etc/rspamd/local.d/redis.conf
Code:
  servers = "127.0.0.1"; # Read servers (unless write_servers are unspecified)
  write_servers = "127.0.0.1"; # Servers to write data
  disabled_modules = ["ratelimit"]; # List of modules that should not use redis from this section
  timeout = 1s;
  db = "0";
  password = "replace_with_the_password_you_set_in_redis_config";

systemctl restart rspamd

Now, it should work.


Thanks for this, great work! :)

Small question, how can i toggle the display of columns in the History tab?
Normally this is:
IDIP address[Envelope From] From[Envelope To] To/Cc/BccSubjectActionScoreMsg sizeScan timeTimeAuthenticated user

But now only:
IDIP addressActionScoreMessage sizeScan timeTimeAuthenticated user
I would really like to see all details.


Also, when i expand a message i do not see all details:
View attachment 2719

While on another instance (not DA):

View attachment 2720

Any tips on how to adjust this?

Very nice! Using Redis also fixed the issues as mentioned!
 
Hi alex we have an issue with rspamd plugin in directadmin .

if we open rspamd plugin from control panel show red error notice like this . can i know how to fix this.

Module loading error: timeout, module: d3pie,d3,d3evolution,footable,bootstrap
 
Como posso agir no SPAM?
Eu tenho o plugin instalado, mas ele só serve como o histórico, eu não consigo encontrar a opção de excluir, liberar spam, lista branca ou coisas assim.
 
Hello guys.

We are running the rspamd plugin with redis but only the last 200 emails appear in the history which isn't enough for a shared hosting server.

Any idea on how to increase this limit?

Regards
 
Back
Top