[Rspamd-Users] standalone configuration?

Marc Roos M.Roos at f1-outsourcing.eu
Tue Jun 23 09:48:57 UTC 2020


I have the same. I tried to just configure one test to see how this 
works. But did not get any reply. What I did is rpm install on centos. 
Replaced rspamd.conf with[1] They just want you to install and run it as 
it is, I don’t think about what you are running

[@rspamd]# service rspamd start

And then test with

[@rspamd]# rspamc -h localhost:11333 /tmp/test.eml
Results for file: /tmp/test.eml (0.006 seconds)
[Metric: default]
Action: no action
Spam: false
Score: 0.00 / 15.00
Message-ID: 202006161906.05GJ61TM021914 at spam2.xxxx.xxxx

# See https://rspamd.com/doc/tutorials/writing_rules.html for details

#.include "$CONFDIR/common.conf"

options {
    pidfile = "$RUNDIR/rspamd.pid";
    tempdir = "/tmp";
#    .include "$CONFDIR/options.inc"
#    .include(try=true; priority=1,duplicate=merge) 
#    .include(try=true; priority=10) 

#.include(try=true; duplicate=merge) "$CONFDIR/cgp.inc"
#.include(try=true; priority=1,duplicate=merge) 

logging {
    type = "file";
    filename = "$LOGDIR/rspamd.log";
    level = "debug";
    .include "$CONFDIR/logging.inc"
    .include(try=true; priority=1,duplicate=merge) 
    .include(try=true; priority=10) 

# for command line, sendmail will only use the proxy
worker "normal" {
    bind_socket = "localhost:11333";
    .include "$CONFDIR/worker-normal.inc"
    .include(try=true; priority=1,duplicate=merge) 
    .include(try=true; priority=10) 

worker "rspamd_proxy" {
    bind_socket = "localhost:11332";
    .include "$CONFDIR/worker-proxy.inc"
    .include(try=true; priority=1,duplicate=merge) 
    .include(try=true; priority=10) 

actions {
    greylist = 4;
    rewrite_subject = 6;
    add_header = 6;
    reject = 15;

#lua = "/usr/share/rspamd/rules/rspamd.lua";
#lua = "/usr/share/rspamd/plugins/rbl.lua";
modules {
    path = "/usr/share/rspamd/plugins";
    try_path = "/etc/rspamd/plugins.d/";
    fallback_path = "/usr/share/rspamd/lua";

rbl {
    default_exclude_users = true;
    default_received = false;
    default_unknown = true;
    default_from = true;
    rbls {
        virusfree {
            returncodes {
                RBL_VIRUSFREE_BOTNET = "";
            rbl = "bip.virusfree.cz";
            ipv6 = false;
            symbol = "RBL_VIRUSFREE_UNKNOWN";
        msblebl {
            returncodes {
                MSBL_EBL = ["",""];
        rbl = "ebl.msbl.org";
        domain_only = false;
        check_replyto = true;
        hash = "sha1";

-----Original Message-----
To: users at lists.rspamd.com
Subject: [Rspamd-Users] standalone configuration?

For purposes of testing and understanding, I'd like to set up rspamd so 
that it simply runs in the foreground, reading one message (or an mbox) 
and outputting those same messages with the spam results inserted as 
headers (or logged or whatever) and no other changes. Not integrated 
with any MTA, not running as a daemon, just operating standalone.  I've 
been perusing the FAQ and other docs but have not found a way to do 
this. Any advice / doc pointers on how to do this?

What I've tried so far ...  I installed the centos7 rspamd package 
without any changes. From the man page, I saw there was a -f (--no-fork) 
option, so I tried running
  rspamd -f -u _rspamd -g _rspamd </tmp/in.msg where /tmp/in.msg is just 
a test message. I could see from the log that it did all kinds of stuff 
to initialize itself, but what it didn't do is generate any output that 
I could see. Not on stdout anyway.

I also saw there is a "wizard" to simplify configuration, so I ran (as 
  rspamadm configwizard
but it asked questions about particular modules and features, nothing 
about overall setup that I could discern, before aborting with a Lua 
error, maybe because I said "n" to "set Redis servers?".
  Do you want to setup dkim signing feature?[y/N]: n
  2020-06-20 18:24:33 #0(main) lua_thread_str_error_cb: call to rspamadm 
lua script failed (2): /usr/share/rspamd/lualib/lua_redis.lua:407: 
attempt to index local 'options' (a nil value); trace: 
[1]:{/usr/share/rspamd/lualib/lua_redis.lua:491 - try_load_redis_servers 
[Lua]}; [2]:{/usr/share/rspamd/lualib/rspamadm//configwizard.lua:455 - 
check_redis_classifier [Lua]}; 
[3]:{/usr/share/rspamd/lualib/rspamadm//configwizard.lua:652 - 
setup_statistic [Lua]}; 
[4]:{/usr/share/rspamd/lualib/rspamadm//configwizard.lua:786 - <unknown> 

Any help on getting rspamd to run as a one-shot analyzer appreciated.
--thanks, karl at freefriends.org
Users mailing list
Users at lists.rspamd.com

More information about the Users mailing list