Author Topic: Avast and Postfix- Help!!!  (Read 10393 times)

0 Members and 1 Guest are viewing this topic.

latifa

  • Guest
Avast and Postfix- Help!!!
« on: December 22, 2005, 06:06:34 PM »
Hi every body,

I have installed avast for linux on postfix and I try to make it working.
I followd instructions in the HOWTO.postfix that existe in package avast4linux-1.0.8. I need more information about the Deamon Avastrelay especially : how to configure notifications, quarantaine,...

Any help or document will be appreciate.

thank's in advance and  sorry for my modest english.

latifa.

Culpeper

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #1 on: December 24, 2005, 06:58:08 AM »
Make sure you have the current version installed.  Ver 1.0.1

latifa

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #2 on: December 26, 2005, 11:24:26 AM »
I have postfix v1.1.11, avast v1.0.8 and avastrelay v1.0.8 installed.

I have problem to set administrator's notification adresse and enable avast to send virus notification to email sender, according to the manual pages this is possible:

avastrelay --notify-sender
avastrelay --notify-admin <adresse_mail>

but the commande doesn't work ???, it returns me:

avastrelay: application is already running

I dont understand what happens, some thing is wrrong in the syntaxe??

An other question about quarantine's files. Does avastrelay quarantine somewhere?I dont find any information indicated on this subject.
Frankly spreaking, I dont know what are the default actions performed by avastrelay when a virus is detected? is it possible to choose standard actions: repair, quarantine, delate,...?

think's for any help

latifa.

Culpeper

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #3 on: December 27, 2005, 02:41:50 AM »
You will need to send this to the support staff via email.  It could sit in this forum forever without being noticed. 

Dublin

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #4 on: December 27, 2005, 04:57:46 PM »
Hi,
try to insert --notify-sender and --notify-admin options to /etc/init.d/avastrelay file.
avastrelay doesn't support quarantine  :(, an infected message is deleted by default.

latifa

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #5 on: December 28, 2005, 05:12:13 PM »
Hi Dublin,

I put --notify-sender and --notify-admin options in /etc/init.d/avastrelay as you told me,I inserted them in the configuration bloc. then When  I restart avastrelay  I have the following error:
/etc/init.d/avastrelay: line 52: --notify-sender: command not found
/etc/init.d/avastrelay: line 53: --notify-admin: command not found
Would you please tell me where exactly should I insert this two lignes? or correct my syntaxe if it's wrrong.
I forward you my avastraly file  :

#!/bin/sh
#
# avastrelay
#
# A shell-script wrapper for avastrelay designed for
# use in the SysV-init system.
#
# usage: avastrelay { start [<switches>] | stop | restart | force-reload | status }
#
##
# RedHat comment block...
#
# chkconfig: 345 80 30
# description: Virus check Message Transfer Agent.
# pidfile: /var/run/avastrelay.pid
# processname: avastrelay
#
##
# LSB comment block...
#
### BEGIN INIT INFO
# Provides:       avastrelay
# Required-Start: $network $syslog
# Required-Stop:  $network $syslog
# Default-Start:  3 4 5
# Default-Stop:   0 1 2 6
# Description:    avastrelay is a virus check Message Transfer Agent.
### END INIT INFO


# Source function library.
if test -f /etc/init.d/functions
then
   style="rh"
   . /etc/init.d/functions
elif test -f /etc/rc.status
then
   style="suse"
   . /etc/rc.status
elif test -f /lib/lsb/init-functions
then
   style="lsb"
   . /lib/lsb/init-functions
else
   style="unix"
fi

# avastrelay configuration
avastrelay="/usr/sbin/avastrelay"
switches="-ilocalhost:10025 -Ilocalhost:10026 -a/var/run/avast4mailscanner.sock -l/var/log/avast4/avastrelay -t60"
pid_file="/var/run/avastrelay.pid"

--notify-sender
--notify-admin latifa@RedHat.test.com

# Functions
function printtext( )
{
   case "${style}" in
      rh | suse | unix )
         echo -n $* >&2
         ;;
      lsb)
         lsb_text="$@"
         ;;
   esac
}

function printusage( )
{
   usage="{ start [<switches>]|stop|restart|force-reload|status }"
   echo "usage: `basename $0` ${usage}" >&2
}

function getstatus( )
{
   case "${style}" in
      rh)
         echo
         [ "$?" -eq 0 ]
         ;;
      suse)
         rc_status $@
         ;;
      lsb)
         if test "$?" -eq 0 -a "${1}" = "-v"
         then
            log_success_msg "${lsb_text} done"
         elif test "${1}" = "-v"
         then
            log_failure_msg "${lsb_text} failed"
         fi
         ;;
      unix)
         if test "${1}" = "-v" -a "$?" -eq 0
         then
            echo " ... done"
         fi
         if test "${1}" = "-v" -a "$?" -ne 0
         then
            echo " ... failed"
         fi
         ;;
   esac
}

function startproces( )
{
   printtext "Starting avastrelay:"
   case "${style}" in
      rh)
         daemon $@
         ;;
      suse)
         startproc $@
         ;;
      lsb)
         start_daemon $@
         ;;
      unix)
         $@
         ;;
   esac
   getstatus -v
}

function killproces( )
{
   printtext "Shutting down avastrelay:"
   case "${style}" in
      rh | lsb)
         killproc "`basename \"${1}\"`"
         ;;
      suse)
         killproc $@
         ;;
      unix)
         if test -f "${pid_file}" && test "`cat ${pid_file}`" != ""
         then
            kill "`cat ${pid_file}`"
         fi
         ;;
   esac
   getstatus -v
}

function checkprocess( )
{
   case "${style}" in
      suse | lsb | unix)
         printtext "Checking for avastrelay:"
         ;;
   esac

   base="`basename \"${1}\"`"
   case "${style}" in
      rh)
         status "$base"
         ;;
      suse)
         checkproc $@
         ;;
      lsb)
         pids="`pidofproc \"${base}\" | sed 's/ *$//'`"
         test "${pids}" != ""
         ;;
      unix)
         test -f "${pid_file}" && test "`cat ${pid_file}`" != "" && kill -0 "`cat ${pid_file}`" 2>/dev/null
         ;;
   esac

   case "${style}" in
      lsb | suse | unix)
         getstatus -v
         ;;
   esac
}

# Check that avastrelay exists.
[ -f "${avastrelay}" ] || exit 1
# Check the command line
if test $# -eq 0
then
   printusage
   exit 2
fi


# Process the command line
case "${1}" in
   start)
      startproces "${avastrelay} ${switches}"
      ;;
   stop)
      killproces "${avastrelay}"
      ;;
   restart|force-reload)
      $0 stop
      $0 start $@
      ;;
   reload)
      echo usage: `basename $0` reload: not implemented >&2
      exit 3
      ;;
   status)
      checkprocess "${avastrelay}"
      ;;
   *)
      printusage
      exit 2
      ;;
esac

exit $?


Think's
Latifa.

Dublin

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #6 on: December 28, 2005, 06:58:19 PM »
switches="-ilocalhost:10025 -Ilocalhost:10026 -a/var/run/avast4mailscanner.sock -l/var/log/avast4/avastrelay -t60 --notify-sender --notify-admin latifa@RedHat.test.com"

latifa

  • Guest
Re: Avast and Postfix- Help!!!
« Reply #7 on: December 29, 2005, 09:35:52 AM »
Yes!!....I tested that, and it work without problem.
thank's a lot.

Latifa.