Last month we posted "Does Ubuntu Linux Really Need Antivirus Software?" Where there was a bit of discussion as to whether Linux needed antivirus software installed.
There were some very informative comments from readers, which showed that in reality it would be very difficult to develop Linux based viruses, and that the real use would be to protect Windows users. After some thought and a bit of playing, I was introduced to ClamAV. For those not familiar, their site description says:

"...Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for email scanning on mail gateways. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. The core of the package is an anti-virus engine available in a form of shared library..."

For me at least, this was a clear challenge to roll up my sleeves and create a small antivirus server (used to scan email). This would be useful to the small business owner, school, club or hobbyists in general. I'm not going to post the setup of the mail server for this (there are tons of tutorials on line), I'll just be writing about the installation of clamAV on the server.

Depending on your platform, you should see the appropriate documentation here: http://www.clamav.org/download/packages/packages-linux. However, as I'm using Ubuntu Linux, I'll simply run the following command on the mail server to install the package:

sudo apt-get install clamav clamav-daemon clamav-docs

ClamAV Install

clamav is the software and clamav-daemon is the service that will run the mail server modules that checks email attachments. The daemon will also ensure that the virus definitions are automatically updated. Be aware that the command will also install:

clamav-base
clamav-freshclam (Run by the daemon to keep the definitions updated).

After the installation is complete, you'll be able to scan files manually using:

sudo clamscan -r /<whatever-directory-name-your-mailserver-uses-to-store-email>

Or... better to have it run automatically using cron like this:

sudo vi crontab -e

(you can use nano, vi, whatever, it does not matter - just as long as it's a pure text editor) and add the following code to the cronjob:

*/10 * * * * sudo clamscan -r /<whatever-directory-name-your-mailserver-uses-to-store-email>

The above will scan the mail directory every 10 minutes.

Again, I'm not espousing that Linux "needs" anti virus protection. Rather, I'm suggesting one method we could use to protect all members, (by attempting to reduce virus transmission) to Windows and other platforms. If you need to remove this solution (because you're just trying this out), the command to do so would be:

sudo apt-get autoremove clamav clamav-daemon clamav-docs

The "autoremove" statement will also remove the dependencies that were installed with clamav.

You can of course use this solution for your desktops and have it automatically scan the Thunderbird email folder via cron too. ;)

As always, I hope this is helpful to some of you!
:)

If you like this post, why not share it?
  • StumbleUpon
  • del.icio.us
  • Digg
  • Google Bookmarks
  • Reddit
  • Mixx
  • Yahoo! Bookmarks
  • blogmarks
  • Twitter

Related posts:

  1. Does Ubuntu Linux Really Need Antivirus Software?
  2. Installing an Ubuntu Linux Hardy 8.04 LAMP and FFMpeg Server With a GUI – Installation of OpenSSH.
  3. Easily Use Cron to Backup Thunderbird eMail in Ubuntu Linux
  4. Installing a Web Server on Your Old Laptop
  5. Creating a Linux Terminal Media Server for Your Home PC’s


Comments

3 Comments so far

  1. Does Ubuntu Linux Really Need Antivirus Software? | Ubuntu Linux Help Does Ubuntu Linux Really Need Antivirus Software? | Ubuntu Linux Help on April 8, 2008 1:23 pm

    [...] 2: For those interested in a simple hands-on project, try this: Create a Linux Antivirus Server to Protect eMail – A Brief How to addthis_url = [...]

  2. Anti Virus Anti Virus on April 11, 2008 5:49 am

    [...] Rachel wrote an interesting post today onHere’s a quick excerptLast month we posted “Does Ubuntu Linux Really Need Antivirus Software?” Where there was a bit of discussion as to whether Linux needed antivirus software installed. There were some very informative comments from readers, which showed … [...]

  3. hari hari on December 18, 2008 1:06 pm

    simply superb, I read the previous one that discussed abt the need for AntiVirus on LInux. absolutely gr8 idea to stop the bad programms by stoping them at one place or the other.

Name (required)

Email (required)

Website

Speak your mind