Virus attacks are becoming more and more common these days and so we
have added anti virus functionality to DMail. This is quite resource intensive
as each attachment has to be extracted out then scanned. You can use any
virus scanner than can take command line arguments and be instructed to
delete the extracted files if they contain a virus. If DSMTP detects the
extracted file has been deleted then it will return a 500 error informing
the sender that the message contains a virus and not deliver the message
to the recipient.
external_viruschecker <path and filename of viruschecker> <arguments> $FILE$
This gives the location of the virus scanner and the arguments it needs to delete infected files, some examples are given below, The $FILE$ is the macro for the filename that DMail extracted to the directory.
extract_mime <path> [file extensions]
This is the path that DMail will use to extract files to for use with the virus scanning. By default it will extract any file to the directory but you can list extensions so that it only extracts certain types.
e.g.
extract_mime c:\mime\ exe zip com
As mentioned above you can use any anti virus software that will take a command line argument and that can be instructed to delete any infected file. Below is listed some examples of some of the anti-virus products available.
A very well known and respected virus checker that is available for a wide variety of platforms, is well suited for DMail with its on demand scanning utility - SWEEP.
Platforms: Windows 95/98/NT/2000, AIX PPC, Digital Unix - Alpha, FreeBSD 2 & 3 Intel, HP-UX, Linux libc5 & libc6, Linux Alpha, Solaris Sparc, Solaris Intel
Example
extract_mime /mimextract
external_viruschecker /usr/local/bin/sweep -s -nc -remove -archive $FILE$
Options for command line:
-s (silent)
-nc (no cofirmation)
-remove (delete file, compulsary)
-zip (search through zip files)
-tar (search through tar files)
-gzip (search through gzip files)
-cab (search through cab files)
-rar (search through rar files)
-arj (search through arj files)
-archive (serch through all the above types of archives)
A very well known anti virus solution for home users, can be setup for use with DMail also
but other anti virus soltuions that have been designed especially for command line driven use
are probably better to use on serious systems.
Example:
extract_mime d:\mimeextract
external_viruschecker c:\program files\navnt\navwnt.exe /noresults $FILE$
You must also set in the Norton Anti Virus GUI for Norton to delete any affected files, otherwise
it will not work.
A well regarded virus checker that will satisfy most organizations
anti-malware needs. Free downloads are available for evaluation purposes.
Supported platforms: Windows, Linux, FreeBSD, BSDi
Example of use with DMail:
After installing the AVP server product add the following lines to your dmail.conf file:extract_mime /usr/local/dmail/extractActivate these changes with the command:
external_viruschecker /opt/AVP/kavscanner -E -Y $FILE$tellsmtp reloadAll traffic through the SMTP server will now be scanned. Mail containing potentially malicious code will be returned to the sender
This is available for Windows, Linux, FreeBSD and OpenBSD
Example of use with DMail:
Install RAV anti-virus and add the following lines to you dmail.conf file:extract_mime /usr/local/dmail/extractActivate these changes with the command:
external_viruschecker /usr/bin/ravlin8 -DEL -UNZIP -HEUR ON $FILE$tellsmtp reloadAll traffic through the SMTP server will now be scanned. Mail containing potentially malicious code will be returned to the sender