How can I remove the MailScanner Service package from my server? Print

  • 4

Here is how to uninstall Mailscanner completely and reverse the changes we made:

1. To remove MailScanner and the MailScanner Front-End, run these commands in shell as root:

cd /usr/mscpanel
sh uninstall.msfe.sh

cd /root
wget http://www.configserver.com/free/msinstall.tar.gz
tar -xzf msinstall.tar.gz
cd msinstall/
sh uninstall.sh

2. Remove the sare rules and MailScanner-specific SpamAssassin configuration files (in shell as root):

cd /etc/mail/spamassassin/
rm -fv *sare* configserver.cf mailscanner.cf

3. To remove the MailScanner Configuration icon from cPanel, go to WHM > Packages > Feature Manager. Edit the "disabled" Feature List and uncheck the box for MailScanner Configuration.

4. Remove the root cron jobs that run mscpanel.pl, sa_rules.sh (or rules_du_jour), and the cronjob that restarts clamd (in shell as root):

crontab -e

5. Remove the following lines (if they exist - they may or may not be there) from /scripts/postupcp:

#!/bin/sh
perl /usr/mscpanel/mscheck.pl

6. Reset Exim Configuration (if desired), in WHM > Exim Configuration Editor > Reset All Configs to Defaults. This is not required.

7. To remove our install of clamav, run these commands in shell as root:

killall clamd

/bin/rm -Rfv /usr/bin/clam*
/bin/rm -Rfv /usr/sbin/clam*
/bin/rm -Rfv /usr/lib/libclam*
/bin/rm -Rfv /usr/share/clam*
/bin/rm -Rfv /usr/include/clam*
/bin/rm -Rfv /usr/bin/freshclam*
/bin/rm -Rfv /usr/etc/clamav*
/bin/rm -Rfv /var/clamd

/bin/rm -Rfv /usr/local/bin/clam*
/bin/rm -Rfv /usr/local/sbin/clam*
/bin/rm -Rfv /usr/local/lib/libclam*
/bin/rm -Rfv /usr/local/share/clam*
/bin/rm -Rfv /usr/local/include/clam*
/bin/rm -Rfv /usr/local/bin/freshclam*
/bin/rm -Rfv /usr/local/etc/clamav*
/bin/rm -fv /etc/init.d/clamd
/bin/rm -fv /etc/cron.daily/freshclam
/bin/rm -fv /etc/cron.hourly/freshclam
/bin/rm -fv /etc/cron.d/freshclam

In WHM > Service Configuration > Service Manager > Additional Services uncheck both boxes for clamav.

You can then install clamavconnector via WHM > Manage Plugins if desired.

8. If you want to re-enable SpamAssassin through cPanel:

WHM > Tweak Settings > SpamAssassin > tick
WHM > Service Manager > spamd > tick both boxes
WHM > Feature Manager > Edit a Feature List > disabled > Edit > SpamAssassin and SpamAssassin Spam Box > tick
WHM > Feature Manager > Edit Feature List - edit any feature lists that you want to allow access to the SpamAssassin configuration in cPanel

 

How do I temporarily disable MailScanner?

 

The simplest way to disable it is to do the following:

rm -fv /etc/exim_outgoing.conf
/scripts/buildeximconf
service exim restart

MailScanner will still be running, but won't be involved in email delivery. If you also want to stop it running, go to WHM > Service Configuration > Service Manager and uncheck both boxes for MailScanner. Then login via SSH and do:

service MailScanner stop

You do need to do the first steps above to disable MailScanner before stopping the service, otherwise no mail will be delivered at all.

Important: Before disabling MailScanner, you should check to see if there are any mails waiting to be processed by MailScanner. If there are and you disable MailScanner, the waiting emails will not be processed by exim until MailScanner is re-enabled. To find out if there are mails waiting (do this before disabling MailScanner), in root SSH enter:

exim -bpc

You can contact us via the helpdesk if you need help after you've disabled MailScanner.

To re-enable it:

touch /etc/exim_outgoing.conf
/scripts/buildeximconf
/scripts/mailscannerupdate
service exim restart
/usr/mscpanel/mscheck.pl

War diese Antwort hilfreich?
Back