hMailServer has built-in support for the Open Source antivirus software, ClamWin
. To use a different
virus scanner, apply the External virus scanner
It enables you to run any anti virus scanner that supports command
line scanning. In the Scanner executable
- field, you specify the
command line that should be used when scanning. In the Return value
you specify the value that the virus scanner will return when
a virus is found. This value varies depending on the virus scanner. See the
bottom of this page for a list of virus scanners and their command lines.
A useful tip. If you use the macro %FILE% in the command line, hMailServer will replace
%FILE% with the full path to the file that needs to be scanned.
This example shows how to set up hMailServer to use AVG Free
in hMailServer 4.0 build 85 and later versions.
It assumes you have AVG Free
C:\Program Files\Grisoft\AVG Free
- Start hMailAdmin and navigate to Settings -> Protocols -> SMTP -> AntiVirus
- Select the External virus scanner page.
- Select Use external scanner
"C:\Program Files\Grisoft\AVG Free\avgscan.exe" /EXT=* /NOBOOT /NOMEM /SCAN /NOSELF /NOHIMEM /ARC "%FILE%" as the command line. The quotation marks (") should be included.
6 as the return value. (
Avgscan.exe will return a value of 6 if a virus is found.)
- The %FILE%-macro functionality only applies to hMailServer 4.0 build 85 and later.
Scanner command lines
"C:\Program Files\Grisoft\AVG Free\avgscan.exe"
/EXT=* /NOBOOT /NOMEM /SCAN /NOSELF /NOHIMEM /ARC "%FILE%"
Since testing with real viruses is risky, you can use the Eicar anti-virus test file. It is treated as a virus by anti-virus scanners, but is safe to use since it is not a real virus.
These sites enable you to send out email containing the Eicar anti-virus test file: