Happy New Year @Xdigit
To remove mail scanner
chmod +x /usr/local/CyberCP/CPScripts/mailscanneruninstaller.sh
/usr/local/CyberCP/CPScripts/mailscanneruninstaller.sh
To remove spamassassin on ubuntu
apt-get -y autoremove --purge spamassassin
To remove spamassassin on centos/almalinux
Run the commands line by line for centos/almalinux/ubuntu
vi /etc/postfix/master.cf || nano /etc/postfix/master.cf
remove this line
smtp inet n - n - - smtpd -o content_filter=spamassassin
and replace it with
# add below line
smtp inet n - n - - smtpd
Remove the following code which is at the end of the file /etc/postfix/master.cf
:
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
Also serach for these lines in /etc/postfix/main.cf
and delete them
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
Finally, restart Postfix:
service postfix restart