MailScanner Installation Guide — Sophos

My copy of the Sophos anti-virus package is installed under /opt/sophos so all references in the following text apply to that location. If you use that location, then my installation script will work for you, and put everything in the right place.

I use a directory structure like this:

bin/
sweep - main Sophos executable
sophoswrapper - script which sets environment then calls sweep
autoupdate - script called by cron which updates IDE files every day
ide
Link to the <version>.<current-date> directory
<version>.<current-date-and-time>/
All the latest Sophos virus pattern IDE files
lib/
Latest Sophos libsavi run-time library and latest vdl-<version>.dat file.
man/
Man pages

Installation

If you are going to install it into /opt/sophos then this is really simple:

  1. Find the Sophos distribution, and copy it into a directory somewhere (/tmp will do nicely). The Sophos distribution is called something like solaris.sparc.tar.Z or solaris.sparc.tar.
  2. Use the cd command to change into the directory containing the Sophos distribution.
  3. Run /opt/mailscanner/bin/Sophos.install

You should now have a directory /opt/sophos/ide which contains the latest virus definitions and a link to your vdl.dat file.

-->

Test Sophos

At this point, you should be able to test the operation of Sophos with a command such as

# /opt/sophos/bin/sophoswrapper /opt/sophos

This will attempt to scan the main Sophos directory, but it will demonstrate that Sophos is working properly. It should report the number of viruses it can detect and the list of IDE files it has found.

Automating the Updates

The /opt/sophos/bin/autoupdate script is best run automatically on a daily basis by cron. A suitable crontab entry is

# 23/05/2000 JKF Automatically fetch updates to Sophos just after midnight
13 0 * * * [ -x /opt/sophos/bin/autoupdate ] && /opt/sophos/bin/autoupdate >/dev/null 2>&1

If you need to find out how to install a crontab entry, type "man crontab".


Julian Field