MailScanner Installation Guide - Solaris 9
Compiler
========
From www.sunfreeware.com, download and install
gcc and gcc-lib
tar
patch
wget
If you can't find them all for Solaris 9,
then look in the Solaris 8 directory.
Download each file and gunzip them.
Then for package "xxx-local"
pkgadd -d xxx-local
Install everything from each package and say yes to any questions.
Path
====
PATH=/usr/local/bin:/usr/sbin:/usr/sbin
export PATH
Perl Modules
============
From www.mailscanner.info, download
IO-stringy
MIME-Base64
MailTools
File-Spec
HTML-Tagset
HTML-Parser
MIME-tools
patches 1 - 4
File-Temp
TNEF-Convert
ln -s gcc /usr/local/bin/cc
In the following, if you get errors when you do
make
you need to edit the Makefile it creates.
Remove -xO3 -xdepend
Remove -KPIC
Then run
make
again.
In the order
IO-stringy
MIME-Base64
MailTools
File-Spec
HTML-Tagset
HTML-Parser
MIME-tools
==========
Unpack the tar.gz file.
patch -p0 < mime-tools-patch.txt
patch -p0 < mime-tools-patch2.txt
patch -p0 < mime-tools-patch3.txt
patch -p0 < mime-tools-patch4.txt
cd MIME-tools-5.411
perl Makefile.PL
make
make test
make install
and lastly these:
File-Temp
Convert-TNEF
Net::CIDR
=========
perl -MCPAN -e 'install Net::CIDR'
You may be asked to configure CPAN.
Just accept the defaults for everything except the
continent, country and download sites.
Just pick answers that seem vaguely suitable for where
you are.
MailScanner
===========
Download the latest MailScanner-x.xx-x.tar.gz and put it into /opt
cd /opt
tar xzf MailScanner-x.xx-x.tar.gz
ln -s MailScanner-x.xx-x MailScanner
Sophos
======
The Sophos autoupdater assumes wget is in /usr/bin and yours will
be in /usr/local/bin. So
ln -s /usr/local/bin/wget /usr/bin/wget
Download Solaris version for either SPARC or Intel as appropriate.
You should have a file solaris.intel.tar.Z or solaris.sparc.tar.Z
in the current directory.
tar xzf solaris.intel.tar.Z
/opt/MailScanner/bin/Sophos.install
To test Sophos:
/opt/MailScanner/lib/sophos-wrapper /usr/local/Sophos /tmp
Sophos-SAVI Perl Module
=======================
Read
www.mailscanner.info/mailscanner/install/SAVI.shtml
Download the latest version of the module as directed.
tar xzf SAVI-Perl-0.15.tar.gz
cd SAVI-Perl-0.15.tar.gz
Edit Makefile.PL and change the long line to this:
'LIBS' => ['-L/usr/local/Sophos/lib -R/usr/local/Sophos/lib -lsavi'],
See if you already have links in
/usr/local/Sophos/lib/libsavi.so
/usr/local/Sophos/lib/libsavi.so.2
/usr/local/Sophos/lib/libsavi.so.3
If not then create the links as shown in step 6.
perl Makefile.PL
Then remove "-KPIC" and "-xO3 -xdepend" as described earlier.
make
make test
make install
TNEF Decoder
============
This is needed for reading those pesky winmail.dat attachments
that some versions of Microsoft Outlook and Outlook Express create.
If you are on SPARC, then skip the rest of this section.
If you are on Intel, then
cd /opt/MailScanner/bin
rm tnef.solaris
tar xzf tnef-1.1.4+sizelimit.tar.gz
cd tnef-1.1.4+sizelimit
./configure
make
cp src/tnef ../tnef.solaris
Virus Scanner Autoupdates
=========================
Create a root cron job to run
/opt/MailScanner/bin/update_virus_scanners
however frequently you want it to update. I recommend every
hour or two.
MailScanner Configuration
=========================
Edit /opt/MailScanner/etc/MailScanner.conf and replace the line
Virus Scanners = none
with
Virus Scanners = sophossavi
Directories Needed
==================
mkdir /var/spool/mqueue.in
chown root /var/spool/mqueue.in
chgrp bin /var/spool/mqueue.in
chmod u=rwx,g=rx,o-rwx /var/spool/mqueue.in
mkdir /var/spool/MailScanner
mkdir /var/spool/MailScanner/incoming
mkdir /var/spool/MailScanner/quarantine
Speed Enhancement
=================
You can make MailScanner run faster if you mount
/var/spool/MailScanner/incoming
using tmpfs. This is perfectly safe and there is no
chance that doing this could cause the loss of mail
if the system is suddenly reset or loses power.
You will need to edit /etc/vfstab to do this so that
it gets mounted properly at boot time.
Startup
=======
You need to edit /etc/init.d/sendmail so that it runs these:
/usr/lib/sendmail -bd -OPrivacyOptions=noetrn \
-ODeliveryMode=queueonly \
-OQueueDirectory=/var/spool/mqueue.in &
/usr/lib/sendmail -q15m &
/usr/lib/sendmail -Ac -q15m &
/opt/MailScanner/bin/check_mailscanner
Logging
=======
If nothing from MailScanner appears in your /var/log/syslog,
then edit /etc/syslog.conf and edit the line that starts
mail.debug
so it says
mail.debug /var/log/syslog
|