If you are having trouble with Avast for linux have a read of the memory access related bugs at the bottom if this page.
Currently the Windows and Linux procedures are slightly different:
On Windows (implemented as scanning libraries loaded directly by SurgeMail):
On Linux (implemented as av_avast vpipe scanner that interfaces to the Avast libraries):
Avast for linux requires the 32 bit compatibility libraries to be installed in order to be able to run on 64 bit servers. Also on some servers the default distribution will segfault as soon as any av_avast command is run. This is due to faults in the linux distributions that do not call the dynamic library initialisation functions correctly. To fix this, install this patch by following these instructions. You need to upgrade the avast binaries and make sure you have av_avast 1.4 and add the "64BITFIX_INIT true" av_avast.ini setting.
On windows the scanning engine is automatically updated with the virus database. On linux this must be done manually periodically. If you are getting errors in the log files along the lines of "vpipe failures 25 in a row av_avast" and / or "Avast initialisation failed, avworkInitialize returned 42000" then you must upgrade the avast engine as described here.
Here is a detailed example of this test and upgrade process.
Note: If the avast engine on linux continues to crash for you make sure you are running the 4.7 version of the scannign engine and not the 4.6 version.
To test which version of the scanning engine you are running against on linux, list the following file in your default libraries location:
eg: running against 4.7.0 version of scanning engine:
[root@linux surgemail]# ls -l /usr/lib/libavastengine.so
lrwxrwxrwx 1 root root 25 Jan 10 11:22 /usr/lib/libavastengine.so -> libavastengine-4.so.7.0.0
AVAST antivirus blocked 956 of 11723 messages (max concurrent=limited to 1)
Scanned message size: av=8.5kb peak=3.1mb scantime: av=0.0s peak=3.1s
av_avast version: 1.0
Avast engine version: unknown
Avast virus database version: 416-1 (15.04.2004)
Last update run 0.8 hrs ago SUCCESS(with upgrade)
Avast scanner uptime 2 days 00:06:42
Messages stored as: failed=0 slow=0 (see http://netwinsite.com/surgemail/help/avast.htm)
Authent module resets 0
Vpipe scanner restarts 0
Viruses blocked: g_virus_cmd=0 g_virus_fprot=0 g_vpipe=956
A bunch of statistics are displayed on the behaviour of Avast antivirus. The most important information displayed is the number of messages processed and blocked because they were classified as unwanted (infected, unmonitorable etc). eg: above "blocked 956 of 11723 messages"
In addition you should check that the database is getting regularly updated. The current virus database version is displayed "416-1 (15.04.2004)" and the last time this was updated with the result of the update. The result of the update can be:
Further information is available on the performance of your Avast virus scanner. This includes average and peak scan time and message size, the uptime of this vpipe instance of the running scanner. If any problems have been encountered scanning messages these are stored as surgemail/avast/avast_failure_n.msg and avast_slow_n.msg. If you are getting vpipe scanner restarts or any messages stored as failed or many messages stored as slow this should discussed with surgemail-support@netwinsite.com.
If you receive this warning on the advanced status page this means that you are running Avast antivirus and an error condition has been encountered that prevented the message from being scanned. The message will have been bounced and stored as avast_failureNN.msg for analysis.
You should first check that you do not have another realtime filesystem level virus scanner installed (such as Norton Antivirus). If you do, you need to prevent the avast temp directory ("_avast4_") from getting scanned. You will find this somewhere in a Windows temp folder like c:\windows\TEMP\_avast4_.
If you have checked the above and continue to receive this error, please report this to surgemail-support@netwinsite.com such that appropriate action can be taken (ie Netwin will report the problem to Alwil software).
Av_avast logs all information to av_avast.log file. This is a log file that allows different log levels and control of what is logged to this file. To change the av_avast logging behaviour change the av_avast.ini settings. The default av_avast.ini file has an explanation and an example of all configuration settings.
The avast.log and avast.stat are the log files used (for a similar purpose but less control over what was logged) by the version of Avast integrated with SurgeMail on windows.
Avast is a third party product developed and maintained by ALWIL Software, and is based on ALWIL antivirus technology. We endeavour to resolve any issues in short order by working closely with ALWIL Software but the maintenance of the virus database and actual scanning technology is not under NetWin control and as such NetWin does provide any guarantees on the ability for Avast Antivirus to catch all viruses.
Previously Avast was only available on Windows. Now Avast is available on Windows and Linux. The Linux version is implemented as a vpipe filter. The Windows version was previously run by loading all the Avast dlls into the SurgeMail process.
Recently some people have been experiencing that updates leave linux avast in a state where it will not run. It seems to be changing shared memory requirements mean that in some cases avast will segfault on startup and in other cases will return the error "avworkInitialize returned 22".
If this is happening for you, first try increasing the SHM segments using this command:
sysctl -w kernel.shmmax=128000000
Also you can try and install this build instead: recent avast engine build.
This build comes direct from Alwil software and has not been modified by Netwin to include the necessary av_avast surgemail interfacing executable (this is already in place in the surgemail directory if you installed the older 4.7 netwin modified avast installer). If you install the above Avast distribution it will install a newer version of the Avast engine, and supply you with a warning regarding memory limits and how to resolve them.
Also in some cases the calls to the avast library surgemail runs to execute the updates fail to be able to replace the installed virus database. If this is happening for you try running avastvpsupdate.pl instead and if necessary add this as a cron job. Let us know on surgemail-support@netwinsite.com if this is happening for you / you continue to have trouble with Avast.
If you are having trouble with updates on linux try the following steps to resolve: