I have searched in the forum for activating the external scanner procedure in hMailServer for windows with avira free antivirus. But unfortunately I did not found a how to that works.
But I found a procedure that works by myself und I will tell you how to do.
First I use Avira Free Antivirus 2018 for windows and hMailServer 5.6.6-B2383, both downloaded at dec 2017. I use windows seven ultimate 64 bit with actual updates.
You have also to download scancl from avira web page. I download a zip-file with the version 220.127.116.11 at time. First I copied the unziped files to the directory C:\Program Files (x86)\Avira\Antivirus. I manually created this directoy. Later Avira Free Antivirus 2018 will install its files in this directory, too. If you first will install Free Antivirus 2018, you must boot in protected mode of windows to copy the files of scancl in that directory, cause avira antivirus 2018 will prevent you to do that. You must know that scancl needs the antivirus data bases of Free Antivir to work.
Next I write the following line under Settings Anti-virus in the external virus scanner option:
."C:\Program Files (x86)\Avira\Antivirus\scancl.exe" "%FILE%" -z -n --nombr --heurlevel=2 -q --renameext=vir
If you will test this routine you have to know the following:
The return code of finding a virus is 1. But the activated antivirus 2018 procedures will produce an errorcode of 204. In my case the first test returnes a value 1 code, but in the following tests always the return code 204 will produced which means invalid (nonexistent) directory given in the command line. However if you exclude the data directory of hMailServer in Avira Antivir 2018 exceptional configuration the return code will perform always 1!
Another possibility is to write the return code 204 in the hMailServer return value field to indicate a virus for the hMailServer routines and not to exclude the data directory of hMailServer in Free Antivir 2018 exceptions.
I decide for me to exclude the data directory in Free Antivir 2018 exceptions. This means only the application scancl must detect a virus. I do not know exactly wether scancl will rename the virus file by the option reanameext=vir, but I hope it. Also scancl may have a weeker scan detection algorithm. I must make my experience in future times.
The other way means that Free Antivirus 2018 will handle the virus which may be a better solution. I suggest it will move it to quarantine directory and so the email is free of a virus! But I don't know the behavior of code 204 procedure.
Ok, that is it. I think other qualified people will test my descriptions and optimize the rules and procedures for Free Antivirus 2018.
Many thanks to hMailServer team. I have found this wonderfull software as late as yesterday.
Greetings to all people from Germany.