How to uninstall Spamassassin

Hi. Is there a way of unstalling Spamassassin from Cyberpanel or by any other means. I am fairly new and I installed it thinking it would stop spam. However, after the installation, I have discovered that each time an email is sent to one of my addresses, CPU use shoots to 97% or so. It remains at this level till I have killed Postfix. The culprit seems to be Spamassassin and Spamd. I would be glad if there was a way of removing Spamassassin. I am on Centos 8.

Welcome @Tapiwa Happy you are here

Yes. For CentOs/AlamaLinux run in SSH terminal:

$ yum remove spamassassin

On Ubuntu run:

$ apt-get remove spamassassin && apt-get remove --auto-remove spamassassin

# OR

$ apt-get remove spamassassin && apt-get purge --auto-remove spamassassin


i want to remove spamassing and i am tring these commands in putty but all the time i am receving error" Command not found"

It means spamassasin isnt installed try the command

$ nano /etc/default/spamassassin ||  vi /etc/default/spamassassin

I installed it myself in cyberpanel yesterday, today I just stopped it in cyberpanel but it’s still causing issues and using all my cpu.

Kindly advise how i can remove it completely

Install htop using the commands

apt install -y htop || yum install -y htop || dnf install -y htop

Then reboo the server and run it through htop and after a few mins post a screenshot of terminal running htop

i hope this will not disturb my server, as i am new in using commands. is there an easy way to remove spamassassin?

I am trying to help you investigate as to why your cpu is overloaded. As of now you assume its spamassasin. Let’s be sure

yes its spamaassasin, i already checked htop command.
i run below command i can see blank screen only
$ nano /etc/default/spamassassin || vi /etc/default/spamassassin.
htop command screenshot attached

Did you tweak the configuration of spamassassin at /etc/default/spamassassin

i dont understand what do you mean. but i just installed it from cyber panel

this command worked for me
yum remove spamassassin -y

There is no trick here

Sorry I missed you are on centos 8

yum remove spamassassin

then remove smtp inet n - n - - smtpd -o content_filter=spamassassin from /etc/postfix/

Remove the following code which is at the end of the file:

spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

Also delete these lines Any way to disable spamassasin? - #2 by usmannasir1

Finally, restart Postfix:

service postfix restart

i will just copy and paste these commands because i dont have much experties. so i will just copy and paste your commands to remove it

permession denied to open /etc/postfix/

how i can give permission, sorry if i am asking foolish questions

Run these commands as they are whatever is in > or # are just guidelines

$ vi /etc/postfix/
> now search for these lines using format      /whatyoursearchingfor

# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
# Do not forget to execute "postfix reload" after editing this file.
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================

# delete below line
smtp inet n - n - - smtpd -o content_filter=spamassassin

# add below line 
smtp inet  n -  n  - - smtpd

$ vi /etc/postfix/ 
> delete these lines 

smtpd_milters = inet:
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

Do you have a sudo user or root user ? If you have the root password run all commands beginning with sudo

is it possible if i give you access of my server you can access through putty and solve this issue?
its bit technical beyond my scope

tried this is the error
[root@server ~]# sudo/etc/postfix/
-bash: sudo/etc/postfix/ No such file or directory
[root@server ~]#


you did not space sudo and the command

[root@server ~]# sudo /etc/postfix/