How to use MS Security Essentials as virus checker in HMS

This section contains user-submitted tutorials.
Post Reply
DART
New user
New user
Posts: 29
Joined: 2015-03-04 10:07

How to use MS Security Essentials as virus checker in HMS

Post by DART » 2015-03-18 13:37

My setup is
Windows 7 pro
Hmailserver 5.6.1
MS security essentials
Spammassassin for windows (jam software free build) with customised update script
Uniserver Zero XI for mysql (HMS) and web server
Roundcube for webmail
AWstats
SorenR bayes spamassassin vbs script from here (https://hmailserver.com/forum/viewtopic ... 20&t=26866) with customised learn command for spamd - as advice given to me, read the whole thread before implementing anything, the script changes alot by the end.
windows backup to an external NAS drive

Anyway ...

1. Install security essentials (free MS antivirus)
2. Install HMS and go to the antivirus settings
3. click on the external antivirus tab
4. tick the "use external scanner box"
5. Put this in the command line for scanner executable
"C:\Program Files\Microsoft Security Client\MpCmdRun.exe" -scan -scantype 3 -file "%FILE%" -disableremediation"
6. Return code = 2
7. click the save button
8. Press the test button and a popup from MS should tell you a virus has been found.

enjoy!

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

Re: How to use MS Security Essentials as virus checker in HMS

Post by jimimaseye » 2015-03-18 13:44

Good man.

Readers note: Microsoft Security Essentials is NOT supported (or allowed as per its EULA) for 'Server' edition OS's (2003, 2008, 2012 etc). Therefore even if you can get it to SEEMINGLY install correctly there are no guarantees that it will be PERFORMING correctly with guaranteed virus detection.
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

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: How to use MS Security Essentials as virus checker in HMS

Post by SorenR » 2015-03-18 14:01

Well, it may not be the most trusted anti-virus solution I've seen so far :wink:
Return code is
0 if no malware is found or malware is successfully remediated and no
additional user action is required
2 if malware is found and not remediated or additional user action is
required to complete remediation or there is error in scanning.
Please check History for more information.
RC=0 -> "File is CLEAN!"
RC=2 -> "You may have a problem or a Virus!" ... It does NOT explicitly mean you have found a VIRUS.
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

DART
New user
New user
Posts: 29
Joined: 2015-03-04 10:07

Re: How to use MS Security Essentials as virus checker in HMS

Post by DART » 2015-03-20 00:16

SorenR wrote:Well, it may not be the most trusted anti-virus solution I've seen so far :wink:
Yes, i agree the exit codes could do with a re-work but its a solid product for this purpose. I would rather throw away a few attachments if there is an error than let a virus though because I wasn't using any AV tool.

I realised the GUI does not check for AV signature updates as often as needed for a mailserver. Have added a batch file to be run from task manager hourly. It creates a log in the same dir (c:\hmtools) to see if any updates have been installed.

When creating the task, ensure you use the "start in" field (under the action tab) of where the batch file is located or the log will not appear in that folder.

@echo off
echo %DATE% - %TIME% >> .\avupdate.log
"C:\Program Files\Microsoft Security Client\MpCmdRun.exe" -SignatureUpdate >> .\avupdate.log
echo. >> .\avupdate.log

cheers

DART
New user
New user
Posts: 29
Joined: 2015-03-04 10:07

Re: How to use MS Security Essentials as virus checker in HMS

Post by DART » 2015-08-21 08:18

**UPDATE**

When I wrote this HOWTO, my mailserver was only getting a 1 - 2 thousand emails per day. Since then, I am now getting ~8000 emails per day and MS Security essentials is not keeping up.

I woke this morning to find lots of emails marked as viruses and a few calls from customers with the same issue. Conclusion is that MS AV is not happy with this number of emails and is just giving up.

In the 6 months I have been using MS as a virus checker, I have sometimes wondered about emails getting labelled as viruses when in all likely hood they are not. I let it go and hoped it would be fine.

After this mornings episode, I switched to clamd and using the free signatures as suggested by mikelim (viewtopic.php?f=7&t=28500&p=177815&hili ... us#p177910)

everything is running fine and we will see how this goes over time but I suspect this is a better solution in the long run for a higher volume server while providing the better protection through the use of updated signatures.

cheers.

askrahulsingh
New user
New user
Posts: 5
Joined: 2016-05-17 07:10
Contact:

Re: How to use MS Security Essentials as virus checker in HMS

Post by askrahulsingh » 2016-06-10 12:20

CLAMAV is the best option for HmailServer as per my personal experience.

Post Reply