ClamAV Plugin

Summary

Description

Grails ClamAV Plugin

This is a plugin to simply use the open source antivirus ClamAVâ„¢ from Grails.

Latest plugin version is 0.2.

Install & configure ClamAVâ„¢

The plugin relies on a running daemon of ClamAVâ„¢ listening on a TCP port.

Installation

See on ClamAVâ„¢ website for installation instructions for your system (packages exists for different Linux versions).

Configuration

Configure the TCPSocket option (normally in clamd.conf). This is the port on which ClamAV will be listening for commands from the plugin. If you set it to the default value of 9321, you won't need to configure the plugin.

# The port on which ClamAV listens for commands
TCPSocket 9321

Install & configure the plugin

Installation

Type this command in your Grail application directory

$> grails install-plugin clamav

or if you have a plugin archive locally.

$> grails install-plugin /path/to/grails-clamav-0.1.zip

Configuration

In grails-app/conf/Config.groovy you can add following entries:

clamav.host=xxx (the host on which the ClamAV daemon runs. Default is localhost)

clamav.port=xxx (the port on which ClamAV daemon is listening. Must match the TCPSocket configuration option of ClamAV daemon. Default is 9321)

Status page

The plugin contains a controller that displays a status page and allows to quickly test an uploaded file. The default location is "/clamAv" within your app (adapt if you use url mappings).

!Grails-ClamAv-Plugin status.png!

Usage

Validator

The plugin registers a new validato{}r named freeOfVirus that you can use in validation like any other constraint. For example like: