Rspamd not running

tristan

Verified User
Joined
Feb 11, 2005
Messages
404
Location
The Netherlands
Tried to test Rspamd but it looks like it's not running at all on Debian 9.5. It's installed ok via CB as outlined in the Rspamd guide. But when sending an email to this test box:

Code:
SPFCheck: Server passes SPF test, -30 Spam score
X-DKIM: signer='prism.nl' status='pass' reason=''
DKIMCheck: Server passes DKIM test, -20 Spam score
SpamTally: Final spam score: unset because ESF not run (SpamAssassin unset, whitelist, or skippped)
Code:
# service rspamd status
● rspamd.service - rapid spam filtering system
   Loaded: loaded (/etc/systemd/system/rspamd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-08-09 17:10:07 CEST; 3s ago
     Docs: https://rspamd.com/doc/
  Process: 2349 ExecStart=/usr/local/bin/rspamd -c /etc/rspamd/rspamd.conf -f (code=exited, status=127)
 Main PID: 2349 (code=exited, status=127)

Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Main process exited, code=exited, status=127/n/a
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Unit entered failed state.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Failed with result 'exit-code'.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Service hold-off time over, scheduling restart.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: Stopped rapid spam filtering system.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Start request repeated too quickly.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: Failed to start rapid spam filtering system.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Unit entered failed state.
Aug 09 17:10:07 phoenix.prism.nl systemd[1]: rspamd.service: Failed with result 'exit-code'.
CB options.conf:
Code:
#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.6
blockcracking=yes
easy_spam_fighter=yes
spamd=rspamd
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=yes
Weekly Cron:
Code:
/etc/cron.weekly/custombuild:
/usr/local/bin/rspamd: error while loading shared libraries: libicudata.so.58: cannot open shared object file: No such file or directory
/usr/local/bin/rspamd: error while loading shared libraries: libicudata.so.58: cannot open shared object file: No such file or directory
/usr/local/bin/rspamd: error while loading shared libraries: libicudata.so.58: cannot open shared object file: No such file or directory
 
Last edited:

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
It seems that the libicu version CentOS 7 Is using is outdated or is not the one Rspamd is expecting.

On my system I have 50.1.2 while Rspamd is looking for 58

I have tried to recompile ICU from CB but that doesn't help, I will keep looking for a solution.
I have also tried to symlink the current libicu to the Rspamd expected version with:
Code:
ln -s /usr/lib64/libicudata.so /usr/lib64/libicudata.so.58
ln -s /usr/lib64/libicuuc.so /usr/lib64/libicuuc.so.58
ln -s /usr/lib64/libicui18n.so /usr/lib64/libicui18n.so.58
But of course that cause an issue on Rspamd itself:
rspamd: symbol lookup error: rspamd: undefined symbol: ucnv_close_58

Side note, actually CB do install ICU 58.2, so it might be conflict somewhere, I am trying to remove the OS one (which was installed because of the Open-VM Tools)

I will update if I have news
 
Last edited:

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
So maybe it does "notice" that the 58 is installed by CB but the symlink are not done or is looking only in /var/lib64/ rather than where CB actually install ICU
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
In fact, ICU 58.2 installed by CB is in /usr/local/icu and the libs are actually there:
Code:
>ll /usr/local/icu/lib/
total 31M
drwxr-xr-x 3 root root   72 Aug 16 11:11 icu
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicudata.so -> libicudata.so.58.2
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicudata.so.58 -> libicudata.so.58.2
-rwxr-xr-x 1 root root  26M Aug 16 11:11 libicudata.so.58.2
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicui18n.so -> libicui18n.so.58.2
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicui18n.so.58 -> libicui18n.so.58.2
-rwxr-xr-x 1 root root 3.1M Aug 16 11:11 libicui18n.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicuio.so -> libicuio.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicuio.so.58 -> libicuio.so.58.2
-rwxr-xr-x 1 root root  62K Aug 16 11:11 libicuio.so.58.2
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicutest.so -> libicutest.so.58.2
lrwxrwxrwx 1 root root   18 Aug 16 11:11 libicutest.so.58 -> libicutest.so.58.2
-rwxr-xr-x 1 root root  81K Aug 16 11:11 libicutest.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicutu.so -> libicutu.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicutu.so.58 -> libicutu.so.58.2
-rwxr-xr-x 1 root root 229K Aug 16 11:11 libicutu.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicuuc.so -> libicuuc.so.58.2
lrwxrwxrwx 1 root root   16 Aug 16 11:11 libicuuc.so.58 -> libicuuc.so.58.2
-rwxr-xr-x 1 root root 2.0M Aug 16 11:11 libicuuc.so.58.2
drwxr-xr-x 2 root root   59 Aug 16 11:11 pkgconfig
I am gonna try now to symlink those in /usr/lib64/
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
This symlink works as expected:
Code:
ln -s /usr/local/icu/lib/libicudata.so /usr/lib64/libicudata.so.58
ln -s /usr/local/icu/lib/libicuuc.so /usr/lib64/libicuuc.so.58
ln -s /usr/local/icu/lib/libicui18n.so /usr/lib64/libicui18n.so.58
Now I am facing another issue, but that would probably fairly simple to fix, it might have to do with my attempt to install Rspamd from their YUM Repo.
Code:
2018-08-16 11:39:39 #14055(main) <5617a2>; main; detect_priv: cannot run rspamd workers as root user, please add -u and -g options to select a proper unprivilleged user or specify --insecure flag
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Ok, started! :)
The log folder was owned by "root" instead of the user, a chown fix it:
Code:
chown _rspamd. /var/log/rspamd/ -R
Odd the _rspamd user, I wonder why rspamd has not been set as user
That is set in CB:
Code:
        addUserGroup _rspamd _rspamd
I cannot see anything in the config that but just on the init file, I wonder why this decision has been made
 
Last edited:

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
I have spoken with Martyans, the _rspamd is the suggested user from Rspamd documentation, regarding the ICU he will think about a way to make it work since my solution it would simply be a temp workaround for testing purposes.
 

tristan

Verified User
Joined
Feb 11, 2005
Messages
404
Location
The Netherlands
My preference would be if it could just use the system provided ICU just like their official Debian package does to keep things as simple as possible.
 

tristan

Verified User
Joined
Feb 11, 2005
Messages
404
Location
The Netherlands
Same "/usr/local/bin/rspamd: error while loading shared libraries: libicudata.so.58: cannot open shared object file: No such file or directory" problem with rspamd 1.7.5 unfortunately.
 

tristan

Verified User
Joined
Feb 11, 2005
Messages
404
Location
The Netherlands
Nope, sounds a bit like a quick hack to me, don't know what other programs use this library on this Debian install. IMHO it's better to have Rspamd compiled with the Debian 9 default libicu version 57 or just use the Rspamd provided binaries unless DirectAdmin has a compelling reason to build Rspamd specifically for libicu version 58.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
That doesn't make any sense.
You are doing a symlink creating a file which doesn't exist at the moment, so how is possible that this might break things, other software are not using nor looking for the 58 one,

It is a workaround, yes, but definetely not an hack nor somthing that can break other things.

If you prefer, you might simply symlink the .58 to .57 so you're sure will be the same version but just available under a different name (this to me is worse that what I sugested :) )

Anyway, Martynas is informed so I guess he will find better solution soon.
 

tristan

Verified User
Joined
Feb 11, 2005
Messages
404
Location
The Netherlands
Ah misunderstood your fix, sorry about that.

Still think it's better to just use the Debian supplied version 57 or use the Rspamd supplied binary unless there is a real reason to build Rpsamd from source. Would be easier to maintain for the DirectAdmin guys as well.
 
Top