Windows Server 2012 (x64) ClamAV and Hmailserver

Forum for things that doesn't really have anything to do with hMailServer. Such as php.ini, beer, etc etc.
Post Reply
cremefraiche
New user
New user
Posts: 1
Joined: 2013-09-02 15:19

Windows Server 2012 (x64) ClamAV and Hmailserver

Post by cremefraiche » 2013-09-02 15:28

Hello all,

I apologize in advance if this has been asked;

I am having dificulty getting ClamAV service to run on Windows server 2012. I followed the steps outlined in this document https://www.google.com.au/url?sa=t&rct= ... 5398,d.aGc as good as could, I have been reading 100s of hMail forum posts and everything refers to a link that does not work.

So I downloaded http://sourceforge.net/projects/clamav/ ... i/download and ran it; I installed it in c:\ClamAV\ then followed the document to create the service and apply the registry changes.

I even went as far as to create my own version of scvtimeout.bat

Code: Select all

@echo off
if \{%1\}==\{\} @echo Syntax: SvcTimeOut TimeOutMilliseconds&goto :EOF
@echo REG ADD "HKLM\SYSTEM\CurrentControlSet\Control" /V ServicesPipeTimeout /T REG_DWORD /F /D %1
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control" /V ServicesPipeTimeout /T REG_DWORD /F /D %1
ok so that is enough waffling to my error:

when I attempt to start the ClamAV and FreshClam services i get the following message:

"Windows could not start the ClamAV service on Local Computer.

Error 1053: The service did not respond to the start or control request in a timely fashion."


does anyone have any idea as to what the problem is?

ActionHosting
New user
New user
Posts: 2
Joined: 2013-08-08 15:34

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by ActionHosting » 2013-09-25 15:26

Hi,

I went via a slightly different route for installing.
  1. I installed ClamWin (Using clamwin-0.97.8-setup.exe from http://downloads.sourceforge.net/clamwi ... -setup.exe)
  2. I extracted ClamAV into c:\ClamAV (Using clamav-amd64-0.97.8.7z from http://oss.netfarm.it/clamav/)
  3. I configured ClamD in c:\ClamAV as below:

    c:\ClamAV\clamd.conf

    Code: Select all

    TCPSocket 3310
    MaxThreads 2
    LogFile c:\Clamav\clamd.log
    DatabaseDirectory C:\ProgramData\.clamwin\db
    
  4. I used RunAsSvc.exe (Available here: http://www.pirmasoft.de/downloads/runassvc.zip) to install the ClamD application as a service.
    Install using the parameters "-c c:\clamav\clamd.conf" and the working directory of "c:\clamav"
The advantages of doing it this way are as follows:
  • ClamWin deals with the automatic update of definitions
  • ClamD is faster at scanning than using ClamScan
  • RunAsSvc is much easier to setup than SC.exe etc

AuZee
New user
New user
Posts: 6
Joined: 2014-03-04 02:18
Location: Australia

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by AuZee » 2014-03-04 02:55

ActionHosting wrote:Hi,
  1. I installed ClamWin (Using clamwin-0.97.8-setup.exe from http://downloads.sourceforge.net/clamwi ... -setup.exe)
  2. I extracted ClamAV into c:\ClamAV (Using clamav-amd64-0.97.8.7z from http://oss.netfarm.it/clamav/)
  3. I configured ClamD in c:\ClamAV as below:
+1

Thought I'd just sign up and write in regarding this method. I'm on (x32) but still applied.
ActionHosting wrote: c:\ClamAV\clamd.conf

Code: Select all

TCPSocket 3310
MaxThreads 2
LogFile c:\Clamav\clamd.log
DatabaseDirectory C:\ProgramData\.clamwin\db
Yep... this worked... mine is a littler different (db directory) .
ActionHosting wrote: [*]I used RunAsSvc.exe (Available here: http://www.pirmasoft.de/downloads/runassvc.zip) to install the ClamD application as a service.
Install using the parameters "-c c:\clamav\clamd.conf" and the working directory of "c:\clamav"[/list]

The advantages of doing it this way are as follows:
  • ClamWin deals with the automatic update of definitions
  • ClamD is faster at scanning than using ClamScan
  • RunAsSvc is much easier to setup than SC.exe etc
Funnily enough... I downloaded and used the RunAsSvc.exe just to test and see if it would work. It did. However, for some reason it logged itself as another user (it appeared), and took control of Sygate Firewall (first active logon sees SF only).

So I removed it... fiddled some more, and now for some reason the service starts within XP home.

Image

Anyway... the main advantages of installing ClamWin on the system per-Se is that your PC has a virus app on it.

Secondly, you can path to the database of the definition files for ClamAV to use when you ONLY use ClamAV in hM (and not the ClamWin tab). You only need to setup your .conf file with the patch to the virus defs.

Example: DatabaseDirectory C:\Documents and Settings\All Users\.clamwin\db

Guess I'm just reiterating what he wrote above.

Think that's all I have to say on the matter :)

Cheers!

AuZee
New user
New user
Posts: 6
Joined: 2014-03-04 02:18
Location: Australia

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by AuZee » 2014-03-05 13:47

Just adding to the above....

I'm also using Spam Daemon (JAM factory). I have created a Service using NSSM (ie: NSSM -install) so it runs upon boot up. It will also close upon reboot and restart with no user intervention.

Cheers!

BMAK
New user
New user
Posts: 1
Joined: 2014-12-16 16:05

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by BMAK » 2014-12-16 16:10

Hello.

I am a little late to this post, but have found it very useful for setting up ClamAV on our Server 2012 machine. One issue is that I can not get the service to start even though it appears in the Services list.

Is there any typical list of things I should check in my search for a solution.

Thanks.

User avatar
mattg
Moderator
Moderator
Posts: 21529
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by mattg » 2014-12-16 22:48

First I'd check windows permissions where Clam is installed, and compare the user that the clam service is set to run uder, and check that user's permissions over that directory (and sub directories)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
jimimaseye
Moderator
Moderator
Posts: 9176
Joined: 2011-09-08 17:48

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by jimimaseye » 2015-01-03 00:47

I have my simplified version to run ClamAV as a service (integrated to HMS) here with no registry or extra service running programs required: viewtopic.php?f=21&t=26829

In case it helps.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Please note
Normal user
Normal user
Posts: 37
Joined: 2014-12-17 22:49

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by Please note » 2015-02-03 14:13

I used RunAsSvc.exe (Available here: http://www.pirmasoft.de/downloads/runassvc.zip) to install the ClamD application as a service.
Install using the parameters "-c c:\clamav\clamd.conf" and the working directory of "c:\clamav"
which file do you use? The are many .exr files there. :roll:

User avatar
mattg
Moderator
Moderator
Posts: 21529
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by mattg » 2015-02-04 03:09

no there wasn't; only the one .exe in that zip

try that download again
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

thangfozika
New user
New user
Posts: 2
Joined: 2015-01-18 11:10
Contact:

Re: Windows Server 2012 (x64) ClamAV and Hmailserver

Post by thangfozika » 2015-02-04 11:11

Thank you for sharing

Post Reply