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!
How to use MS Security Essentials as virus checker in HMS
- jimimaseye
- Moderator
- Posts: 10053
- Joined: 2011-09-08 17:48
Re: How to use MS Security Essentials as virus checker in HMS
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.
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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: How to use MS Security Essentials as virus checker in HMS
Well, it may not be the most trusted anti-virus solution I've seen so far
RC=2 -> "You may have a problem or a Virus!" ... It does NOT explicitly mean you have found a VIRUS.
RC=0 -> "File is CLEAN!"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=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.
Woke is Marxism advancing through Maoist cultural revolution.
Re: How to use MS Security Essentials as virus checker in HMS
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.SorenR wrote:Well, it may not be the most trusted anti-virus solution I've seen so far
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
Re: How to use MS Security Essentials as virus checker in HMS
**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.
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.
-
- New user
- Posts: 5
- Joined: 2016-05-17 07:10
- Contact:
Re: How to use MS Security Essentials as virus checker in HMS
CLAMAV is the best option for HmailServer as per my personal experience.