[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
[1]
#
# 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)
"$LOCAL_CONFDIR/local.d/options.inc"
# .include(try=true; priority=10)
"$LOCAL_CONFDIR/override.d/options.inc"
}
#.include(try=true; duplicate=merge) "$CONFDIR/cgp.inc"
#.include(try=true; priority=1,duplicate=merge)
"$LOCAL_CONFDIR/local.d/cgp.inc"
logging {
type = "file";
filename = "$LOGDIR/rspamd.log";
level = "debug";
.include "$CONFDIR/logging.inc"
.include(try=true; priority=1,duplicate=merge)
"$LOCAL_CONFDIR/local.d/logging.inc"
.include(try=true; priority=10)
"$LOCAL_CONFDIR/override.d/logging.inc"
}
# 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)
"$LOCAL_CONFDIR/local.d/worker-normal.inc"
.include(try=true; priority=10)
"$LOCAL_CONFDIR/override.d/worker-normal.inc"
}
worker "rspamd_proxy" {
bind_socket = "localhost:11332";
.include "$CONFDIR/worker-proxy.inc"
.include(try=true; priority=1,duplicate=merge)
"$LOCAL_CONFDIR/local.d/worker-proxy.inc"
.include(try=true; priority=10)
"$LOCAL_CONFDIR/override.d/worker-proxy.inc"
}
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 = "127.0.0.2";
}
rbl = "bip.virusfree.cz";
ipv6 = false;
symbol = "RBL_VIRUSFREE_UNKNOWN";
}
msblebl {
returncodes {
MSBL_EBL = ["127.0.0.2","127.0.0.3"];
}
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
root)
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>
[Lua]};
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
https://lists.rspamd.com/mailman/listinfo/users
More information about the Users
mailing list