Completely remove Clamav and Spamassassin

8 posts / 0 new
Last post
#1 Fri, 09/04/2009 - 05:14

Completely remove Clamav and Spamassassin

Hi there! In the past month I have had 3 downtimes because of clamav/spamassassin eating up all the RAM while sending out a newsletter, so I was wondering: how do I completely remove clamav and spamassassin from the system? I don't need them and they're just a resource hog in my environment

Thanks :)

Fri, 09/04/2009 - 08:06


Well, my recommendation is to configure Virtualmin to stop using them, then to shut them down.

To do that, first go into System Settings -> Features and Plugins, and disable the "Spam Filtering" and "Virus Filtering" related features.

Next, go into Webmin -> System -> Bootup and Shutdown, where you can stop the daemons from running, as well as configure them to no longer start at bootup.


Tue, 09/06/2016 - 23:26 (Reply to #2)

I did the

1) System Settings -> Features and Plugins, and disabled the "Spam Filtering" and "Virus Filtering" related features.

2) Webmin -> System -> Bootup and Shutdowns set to NO & NO.

I did not have any virtual servers running the plugin. The only mail processed by the system is outbound SMTP generated by the virtual hosts.

Hopefully clamav-daemon won't start anymore.

But I would like to have clamscan* run whenever:

a) a file is uploaded to the machine via apache. there is no ftp access and I am the only one who can SSH/SCP into the machine.

b) when any user aside from root runs a curl or a wget.

c) when a file is created in /home and subdirs.

Question 1: Is it possible to have clamscan run only when a, b, and/or c happen?

Question 2: if left with the current config (default virtualmin conf), when & against what will clamscan run?

*I know clamscan uses more CPU than clamdscan, but the machine has plenty of cycles to spare, and not so much RAM.

Fri, 09/04/2009 - 08:09

Thanks for helping! However:

1- when I disable "default" and hit save in System Settings -> Features and Plugins, for some strange reason I am redirected to virtualmin's index page, and the settings are not saved (clamd and spamassassin are enabled by default, even though they are currently disabled)

2-Webmin -> System -> Bootup and Shutdown yields this:

Executing /etc/rc.d/init.d/clamd-wrapper stop ..

/bin/sh: /etc/rc.d/init.d/clamd-wrapper: Permission denied

Executing /etc/rc.d/init.d/spamassassin stop ..

Stopping spamd: [FAILED]

Disabling action clamd-wrapper at boot time.

Disabling action spamassassin at boot time

Is it normal?

Fri, 09/04/2009 - 09:06

Well, I can't say I'd expect the above messages, but it does sound like it'll no longer start them at boot time :-)

At this point, are both services stopped?

If you log in over SSH, what do these two commands show:

  • ps auxw | grep spamd

  • ps auxw | grep clam

You also disabled the features in Virtualmin, right? If so, you should be in good shape!


Fri, 09/04/2009 - 11:44

Yep, the features are disabled :)

The first command shows nothing at all, the second's output is

root 18913 0.0 0.0 2404 1004 ? Ss 18:00 0:00 /bin/bash /usr/share/clamav/freshclam-sleep root 19506 0.0 0.0 3912 688 pts/0 S+ 18:21 0:00 grep clam

I assume the second line is me grepping it and the first line is a clamav daemon idling?

Should I "kill -9 18913"? :)

Fri, 09/04/2009 - 13:38

Well, just make sure that the clamav-daemon as well as clamav-freshclam are stopped in the Bootup and Shutdown menu.

If so, then yeah, you can go ahead and kill it.


Fri, 09/04/2009 - 14:54

Before you go into System Settings -> Features and Plugins, and disable the "Spam Filtering" and "Virus Filtering" related features, you need to edit all your virtual servers and disable those features. Turning it off in features and plugins seems to be only for future virtual servers.


Topic locked