всё взято с вашей инструкции могу приложить файлы если надо
листинг антивирус.сш
#!/opt/bin/bash
##
### Config
##
File=$1
RejFile=$File".rej"
Temp=$File".av"
RemoteAddress=$2
Authuser=$3
timestamp=`date +%s`
date=`date +%Y%mР00`
nowtime=`date +%r`
ClamAV='/opt/bin/clamdscan --no-summary --stdout'
#BitDefender='bdc --arc --mail'
## Do not edit these
#Virus_BitDefender=""
Found_ClamAV=""
### Doing Stuff
XMail_lines=`cat $File | grep -n "<>" | awk -F: '{print $1}'`
Total_lines=`cat $File | wc -l | awk '{print $1}'`
Real_lines=$((Total_lines-XMail_lines))
## setup temp file
echo "Return-Path: localhost" > $Temp
tail -n $Real_lines $File >> $Temp
### Run the scan { clamav }
run=`$ClamAV $Temp`
#Found_ClamAV=`echo "$run" | awk '{print $3}'`
Virus_ClamAV=`echo "$run" | awk '{print $2}'`
#if [ "$Found_ClamAV" != "FOUND" ]; then
# run=`$BitDefender $Temp`
# Virus_BitDefender=`echo $run | grep -m 1 "infected: " | awk -F: '{print $8}' | awk '{print $1}'`
#fi
### Remove Them
rm -f $Temp
### Log
echo "$nowtime $RemoteAddress $Authuser "$Virus_ClamAV"" >> /opt/var/MailRoot/logs/anti-virus-$date
### Exiting
if [ $Found_ClamAV ]; then
echo "550 Virus : $Virus_ClamAV Found in Email " > $RejFile
exit 3
fi
#if [ $Virus_BitDefender ]; then
# echo "550 Virus : $Virus_BitDefender Found in Email " > $RejFile
# exit 3
#fi
Сообщение отредактировал 12 апреля 2010 - 14:12