Can more than one return value be entered when configuring external AV?

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
myHiddenID
New user
New user
Posts: 3
Joined: 2019-04-09 01:19

Can more than one return value be entered when configuring external AV?

Post by myHiddenID » 2019-04-09 01:33

Hello, I found a few articles for McAfee, all from 2008, so new topic. McAfee returns 12 when "The scanner tried to clean a file, the attempt failed, and the file is still infected." and 13 for " The scanner found one or more viruses or hostile objects - such as a Trojan-horse program, joke
program, or test file." I would like to trap for both return codes so hMail with apply rules for both events. Thank you in advance for your assistance.

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

Re: Can more than one return value be entered when configuring external AV?

Post by mattg » 2019-04-09 04:39

The admin GUI only allows numeric characters, and so the answer is no, you can't check for multiple values

Can you get around this by not getting McA FEE to not clean or repair, and just quarantine
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

myHiddenID
New user
New user
Posts: 3
Joined: 2019-04-09 01:19

Re: Can more than one return value be entered when configuring external AV?

Post by myHiddenID » 2019-04-10 20:13

Since it returns 12 when a clean fails, and 13 when a threat is found, I hope it always returns 13 even when a clean attempt fails. It's logical, but then what does logic have to do with programming! :D

mikedibella
Normal user
Normal user
Posts: 177
Joined: 2016-12-08 02:21

Re: Can more than one return value be entered when configuring external AV?

Post by mikedibella » 2019-04-10 20:50

Wrap the .exe in a .cmd script and use if errorlevel and exit exitCode to merge 12 and 13 into a single return value. The line

if errorlevel 12 exit 13

with exit the script and set the exitCode to 13 if the previous command exits with 12 or greater.

myHiddenID
New user
New user
Posts: 3
Joined: 2019-04-09 01:19

Re: Can more than one return value be entered when configuring external AV?

Post by myHiddenID » 2019-04-17 17:50

@mikedibella, Thanks, nice hack.

Post Reply