For those first timers

or the ones that want to move from the outdated ClamAv/tbb version

to the Win32 version, here is what you need to do.
Prerequisits1. Download the latest release package of hmailserver from
http://www.hmailserver.com/index.php?page=download2. Download the latest package of ClamAv from
http://sourceforge.net/projects/clamav/ ... mav/win32/ Donwload the I386 package for 32 bit OS and the X86_64 for 64 bit OS
3. Download Windows server 2003 resource toolkit and install it with the default settings
http://www.microsoft.com/download/en/de ... x?id=176574. Download the ClamSup and rsync packages provided by our good friend Steve for use with sanesecurity signatures
http://hideout.ath.cx/clamav/Installation1. Install hmailserver. Manuals can be found on the site.
2. Extract the clamav package and copy the extracted clamav folder to the root of C:
3. Extract the rsync package
4. Extract the clamsup package
5. Copy the contents of the extracted rsync folder to the extracted clamsup folder
6. Copy the clamsup folder to the root of C:\clamav folder
7. Copy and paste the clamd.conf and freshclam.conf files from C:\ClamAV\conf_examples tp the root of C:\Clamav folder
8. Delete or comment out the word
Example found in both config files on line 8
9. Modify both files to meet your needs (usually default settings are well balanced). Be careful do not uncomment or modify the line of temporary folder in clamd.conf
10. Do not uncomment or modify the database path in both config files. Leave the default settings
11. Modify the LOCALFOLDER variable in C:\ClamSup\Clamsup.cfg file to point to C:\ClamAv\Database
12. Create two new folders on the root of C:\ClamAv. Name it database and Logs
13. Uncomment the LogFile variable in clamd.conf to point to C:/ClamAv/Logs/clamd.log
14. Uncomment the UpdateLogFile variable in freshclam.conf file to point to C:/ClamAv/logs/freshclam.log
15. Navigate through command prompt to C:\ClamAv directory and run Clamd.exe, as this will launch the clamd service
16. Run freshclam.exe and wait until it downloads the databases and notifies the clamd service about it
17. CD to ClamSup directory and run clamsup.bat. This will download all Sanesecurity signature databases (will take some time), once download is complete, restart the clamd (close the command prompt windows and repeat step 15). This step will help to load all the signatures
18. At this point you should check the clamd logs to see if there are any errors.
19. Now configure hmailserver to use clamav
20. Go to antivirus, external virus scanner, check the use external scanner button and enter the following for the executable
C:\clamav\clamdscan.exe --config-file=C:\clamav\clamd.conf "%FILE%"Return value should be 1, save and exit.
21. At this point your hmailserver is already using clamav to scan for viruses
Install ClamD service• Launch the command shell through Windows resource toolkit (start, programs, Windows Resource Kit Tools)
• Type the following command to create the ClamD service
instsrv.exe ClamD “C:\Program Files\Windows Resource Kits\Tools\srvany.exe"• At this point launch your services applet and check to see the newly created ClamD service
• Right click the service, properties,logon tab, enter the admin account and password
• Go to recovery tab and choose restart service for all three failures cases, click ok
• Do not start the service yet
• Now launch the registry editor (regedit)
• Navigate to HKEY local machine, system, current control set, services, clamD. Right click it and create a new key name it Parameters
• Right click Parameters and create new string value, name it Application, right click Application key, then modify and enter this
C:\ClamAv\Clamd.exe -c C:\ClamAv\Clamd.conf , click ok
• Launch taskmanager, find and end the process ClamD
• From the services start the CLamD Service.
PS: Restarting the server at this point if possible, is a good idea.
Happy Messaging
