[quote user="bmpan"]
Hello,
I have set up a policy to scan all incoming mail for viruses. The task type is "Run a program and examine return code"
My command line is "C:\scan\scan.bat ~A" which calls a batch file scan.bat. This batch calls my commandline scanner with its needed parameters, and returns 1 in case a virus was found, and 0 when no virus is found.
The specified action is "Save to file and notify user", with the parameter "C:\scan\badmail, myname@company.de"
Regardless of the return value, Mercury never takes the specified action. All mails are passed unaffected.
I checked the batchfile manually on the EICAR testfile and other files. The return values are correct.[/quote]
How are you checking the return code after your batch file completes? Have you tested it with different actions?
In the past I used a policy to run a commandline scanner from a batch file but chose the sentinal file option. Clamwall works best for me now.
[quote user="bmpan"]
<P>Hello,</P>
<P>I have set up a policy to scan all incoming mail for viruses. The task type is "Run a program and examine return code"</P>
<P>My command line is "C:\scan\scan.bat ~A" which calls a batch file scan.bat. This batch calls my commandline scanner with its needed parameters, and returns 1 in case a virus was found, and 0 when no virus is found.</P>
<P>The specified action is "Save to file and notify user", with the parameter "C:\scan\badmail, myname@company.de"</P>
<P>Regardless of the return value, Mercury never takes the specified action. All mails are passed unaffected.</P>
<P>I checked the batchfile manually on the EICAR testfile and other files. The return values are correct.[/quote]</P>
<P>How are you checking the return code after your batch file completes?&nbsp; Have you tested it with different actions?</P>
<P>In the past I&nbsp;used a policy to run a commandline scanner from a batch file but&nbsp;chose the sentinal file option.&nbsp; Clamwall works best for me now.</P>