ProFTPD module mod_clamav



The mod_clamav module is designed to scan files immediately upon upload through FTP for viruses. If the file is found to be infected, it is immediately removed from the system, and a message is logged. If the file is found to be free of viruses, the FTP client is sent an optional message stating the file was scanned.

This module is best employed in scenarios where many users are using a system that is maintained by another entity. In this scenario, the administrator of the machine is helping to ensure that no viruses are spread to other users.

Warning: If you are using a newer version of ClamAV, such as 0.88, then there was a newly introduced timeout for sessions, which causes this module to experience problems. See: http://lists.clamav.net/message/20060128.173434.bce66f06.en.html

This module was compiled and tested against ProFTPD 1.2.10. Installation instructions are discussed here.

The most current version of mod_clamav can be found at:

  http://www.UglyBoxIndustries.com/

Author

Please contact Joseph Benden <joe at thrallingpenguin.com> with any questions, concerns, or suggestions regarding this module.

Directives


ClamWarn

Syntax:ClamWarn boolean
Default: Off
Context: server config, <VirtualHost>, <Global>, <Anonymous>
Module: mod_clamav
Compatibility: 1.2.10

The ClamWarn directive will configure if the mod_clamav's virus scanning results are displayed to the remote FTP client. This is desirable if your FTP clients are having troubles with the returned results of mod_clamav. If no ClamWarn directive is configured, then the module will return no results.


ClamAV

Syntax: ClamAV boolean
Default: Off
Context: server config, <VirtualHost>, <Global>, <Anonymous>
Module: mod_clamav
Compatibility: 1.2.10

The ClamAV directive will configure if the mod_clamav's virus scanning and virus removal features are active. If no ClamAV directive is configured, then the module will do no virus scanning.

Example:

  <IfModule mod_clamav.c>
    # Enable virus scanning and removal
    ClamAV on
    # Specify the UNIX Local Socket
    ClamLocalSocket /tmp/clamd    
  </IfModule>

See also:


ClamLocalSocket

Syntax:ClamLocalSocket string
Default: None
Context: server config, <Global>
Module: mod_clamav
Compatibility: 1.2.10

The ClamLocalSocket directive will configure the UNIX socket used to connect to the Clamd daemon process. If no ClamLocalSocket directive is configured, then the module will do no scanning.

Example:

  <IfModule mod_clamav.c>
    # Enable virus scanning and removal
    ClamAV on
    # Specify the UNIX Local Socket
    ClamLocalSocket /tmp/clamd
  </IfModule>


Installation

To install mod_clamav, copy the mod_clamav.c file into
  proftpd-dir/contrib/
Unpack the latest proftpd-1.2.x source code, then follow the usual steps for using third-party modules in proftpd:
  ./configure --with-modules=mod_clamav
  make
  make install



Author: Joseph Benden, Sr.
Last Updated: 01/27/2006 2:43 PM


© Copyright 2005-2006 Thralling Penguin LLC.
All Rights Reserved