Reverting to Spamassassin

PeterL

Verified User
Joined
Sep 6, 2019
Messages
8
Sorry for the cross-post from https://forum.directadmin.com/threads/redis.63793/post-368886. I replaced Spamassassin with rspamd as a test, following this guide: https://forum.directadmin.com/threads/rspamd-guide.56709/

Then wanted to go back to Spamassassin, and execute the commands under Undo!/Abort! in that topic.

But this leaves behind the Redis server:
_rspamd 18237 0.2 0.0 205444 720 ? Ssl Nov18 63:11 /usr/local/bin/redis-server unixsocket:/var/lib/rspamd/.redis/redis.sock

How to remove Redis server (and _rspamd user?) when rspamd is uninstalled via the guide?

I did
./build set redis no
./build remove_redis

But remove_redis does not exist. Thought maybe it could be uninstalled via yum, but it doesn't list as installed.

What is the proper way to remove the Redis that is installed with rspamd?

Thanks!
 
But remove_redis does not exist. Thought maybe it could be uninstalled via yum, but it doesn't list as installed.
Try like this if it's installed via Custombuild.

Code:
cd /usr/local/directadmin
./build set redis no
./build update
./build list_removals
./build remove_items

If all is well then after the list_removals command redis should be listed.
 
you need to stop and remove service that installed by rspamd, I don't know which name. So just find in "/etc/systemd/system/"
 
Try like this if it's installed via Custombuild.

Code:
cd /usr/local/directadmin
./build set redis no
./build update
./build list_removals
./build remove_items

If all is well then after the list_removals command redis should be listed.

Thanks for your help! Sorry for the belated reply (holidays).

I did

Code:
./build set redis no
./build update
./build list_removals

But it doesn't show Redis as something that has to be removed. I checked the options.conf, and redis=no is there.

I did also do

Code:
./build remove_items

But it removed things that it shouldn't have (like multiple older PHP extensions still in use..). So I restored them with for example:

Code:
./build restore_old_local libwebp

Redis is still running on the server, and isn't listed in list_removals.
Any ideas?
 
From another topic it seems redis is installed via yum.

So you could try like this:
Code:
cd /usr/local/directadmin/custombuild
./build set redis no
./build update
./build rewrite_confs
yum remove redis

Does this work?
 
I don't think redis is installed via yum:

Code:
yum list installed | grep redis

doesn't show redis.

https://forum.directadmin.com/threads/redis.63793/post-331792 does mention removing via

Code:
make uninstall

But I don't know where that should be run, since rspamd is already removed. I see a source .tar.gz at /usr/local/directadmin/custombuild/cache/redis-7.2.3.tar.gz. Would unpacking, configuring and running make uninstall work on this?
 
Would unpacking, configuring and running make uninstall work on this?
Custombuild is the most logical place for that. Most likely unpacking, configurating and make uninstall will work.
You might want to check if nowhere else some unpacked and configured redis is still present, like in /usr/local/src or something like that because then you could run the make uninstall from there.
 
trying this to find relative the services.
Code:
systemctl list-units --type=service | grep rspamd
systemctl list-units --type=service | grep redis
 
Unpacking and running make uninstall (there is no configure) did not work either directly. The service was still running, but it removed the redis binaries in /usr/local/bin/.

Specifically it runs this command:

Code:
rm -f /usr/local/bin/{redis-server,redis-benchmark,redis-cli,redis-check-rdb,redis-check-aof,redis-sentinel}

I disabled the service manually (CentOS 7):

Code:
systemctl disable redis-rspamd
systemctl stop redis-rspamd

After this the systemd unit configuration file is left:

/etc/systemd/system/redis-rspamd.service

which (I think) can be left there or removed manually without harm.

Thanks for all help!
 
Back
Top