NOTE:
	For sendmail's versions >= 8.11 we recommend to install the solution
	using libmilter facility of sendmail. You can download this kit from:
	http://www.ravantivirus.com

1.	Install RAV AntiVirus v8 for Sendmail
=	=====================================
	The product contains the following packages:
	ravcore-8.*-*.i386.rpm		-- RAV scanning engine
	ravmd-8.*-*.i386.rpm		-- RAV mail scanning daemon
	ravsendmail-8.*-*.i386.rpm	-- external filter used by sendmail

	You can use our install.sh script in order to install them or use the
	following comands to install them manually (you must be root):

	rpm -ivh --force ravcore-*
	or
	rpm -Uvh --force ravcore-*
	in order to install or upgrade ravcore.

	rpm -ivh --force ravmd-*
	or
	rpm -Uvh --force ravmd-*
	in order to install or upgrade ravmd.

	rpm -ivh --force ravsendmail-*
	or
	rpm -Uvh --force ravsendmail-*
	in order to install or upgrade ravsendmail.

	The argument "--force" will solve the conflicts with any RAV
	AntiVirus v8 installed packages.If something goes wrong, please look at
	README file to figure out what rpm should have done.

2.	Start RAV AntiVirus mail scanning daemon (ravmd)
=	================================================

	The installation process will try to add automatically in the
	file /etc/opt/rav/domains two values for the 'domain'
	parameter (the hostname and the domainname for the local machine).
	Please verify if the values are correctly specified. If the
	domain values are successfully added then the ravmd daemon 
	will be started when the installation has been finished.

	You can manually start the daemon using:
	/etc/init.d/ravmail start
	or
	/opt/rav/bin/ravmd

	By default, ravmd will use RAV logging system. The log files 
	are located in the /var/opt/rav/log/ directory.
	If '--syslog' is used in the ravmd command line parameters, 
	ravmd will use syslogd daemon for logging. Please check mail info
	log file to see ravmd's output.

	IMPORTANT: For RAV, a 'domain' is the string which follows the '@'
	symbol in an e-mail address.

3.	Modify sendmail configuration
=	=============================
	The scanning process requires two different sendmail daemons running at
	the same time. One daemon receives local or remote mails and executes
	ravsendmail mailer for every mail which must be sent. This mailer scans
	mail files from the sendmail queue and move them to the second sendmail
	queue directory. The second sendmail daemon process its queue directory
	and sends the mails to the initial receivers. Only the first sendmail
	daemon will accept SMTP connection. The second's job 	is to deliver
	mails after the scanning process ends. 	This way all mail files will be
	scanned.

	Please follow next steps:
	Make a copy of sendmail executable:
	===================================
	cp /usr/sbin/sendmail   /usr/sbin/sendmail.orig

	If your sendmail is in other directory please adjust the paths
	accordingly. We will use sendmail.orig as the second daemon. It will be
	started with a different configuration file, queue directory and
	status file.
	Copy original settings (that's mandatory for mail delivery):
	======================
	cp /etc/sendmail.cf /etc/sendmail.cf.orig
	If your sendmail.cf is in other directory (i.e /etc/mail/sendmail.cf):
	cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig

	Now you have to modify /etc/sendmail.cf and /etc/sendmail.orig (or
	/etc/mail/sendmail.cf, /etc/mail/sendmail.cf.orig)

A)  Modifications in sendmail.cf
================================

a)  In "Ruleset 0" section, the line:

R$*         $: $>Parse1 $1      final parsing
must be replaced with:

R$*         $#ravsendmail $@$1 $:$1

!!!NOTE:    attention with tabs:"R$*<tab><tab>$#ravsendmail $@$1 $:$1"

b)  In "MAILER DEFINITIONS" section you must add:

Mravsendmail,   P=/opt/rav/bin/ravsendmail, F=ClADFMSPhu, S=0, R=0,
T=DNS/RFC822/X-Unix,
A=ravsendmail /var/opt/rav $h $f $u $i

c)	Write next line in "Format of headers" section:
HX-RAV-AntiVirus: This e-mail has been scanned for viruses on host: $j
if you want that scanned mails have such a information on their header.
Be careful with its position among other lines. For example:

H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
$.by $j ($v/$Z)$?r with $r$. id $i$?u
for $u; $|;
$.$b
HX-RAV-AntiVirus: This e-mail has been scanned for viruses on host: $j
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $?x$x <$g>$|$g$.
H?F?From: $?x$x <$g>$|$g$.
H?x?Full-Name: $x
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

B)  Modifications in sendmail.cf.orig
=====================================
Set the new mail queue directory for sendmail.orig:
# queue directory
#O QueueDirectory=/var/spool/mqueue
O QueueDirectory=/var/opt/rav/tmp

Set a new status file for sendmail.orig:
# status file
#O StatusFile=/var/log/sendmail.st
O StatusFile=/var/log/sendmail.st.orig

Set a new pid file for second sendmail (for sendmail >= 8.11 only):
# location of pid file
#O PidFile=/var/run/sendmail.pid
O PidFile=/var/run/sendmail.pid.orig

Directory /var/opt/rav/tmp must has the same access rights and
owners 	as /var/spool/mqueue (this is set by rpm).

drwxr-xr-x    2 root     mail        12288 Feb 27 02:27 mqueue
drwxr-xr-x    2 root     mail        24576 Feb 27 02:28 tmp

4.	Restart sendmail system
=	=======================

	/etc/init.d/sendmail restart
	or
	killall -HUP sendmail

5.	Start sendmail.orig daemon
=	==========================
	As root execute:
	/usr/sbin/sendmail.orig	-C/etc/sendmail.cf.orig -q5m

	The daemon will run in background and will process the queue directory
	every 5 minutes. The file sendmail.cf.orig contains the initial
	configuration 	except the queue directory and status file. You can put
	this line in one of your boot scripts, so that the daemon starts when
	your system reboots.
