NAME

Email::VirusScan::Engine::ClamAV::Daemon - Email::VirusScan backend for scanning with clamd

SYNOPSIS

    use Email::VirusScanner;
    my $s = Email::VirusScanner->new({
	engines => {
		'-ClamAV::Daemon' => {
			socket_name => '/path/to/clamd.ctl',
		},
		...
	},
	...
}

DESCRIPTION

Email::VirusScan backend for scanning using ClamAV's clamd daemon.

Email::VirusScan::Engine::ClamAV::Daemon inherits from, and follows the conventions of, Email::VirusScan::Engine. See the documentation of that module for more information.

CLASS METHODS

new ( $conf )

Creates a new scanner object. $conf is a hashref containing:

socket_name

Required.

This must be a fully-qualified path to the clamd socket. Currently, only local clamd connections over a UNIX socket are supported.

ping_timeout

Optional. Defaults to 5 seconds.

Timeout in seconds waiting for a clamd 'PING' command to return.

read_timeout

Optional. Defaults to 60 seconds.

Timeout in seconds for waiting on clamd socket reads.

write_timeout

Optional. Defaults to 30 seconds.

Timeout in seconds for waiting for clamd socket to be writeable.

zip_fallback

Optional. Default is undef.

This config option can be a reference to an instance of Email::VirusScan::Engine object that will be used as a fallback in the event that clamd returns a 'zip module failure' error.

INSTANCE METHODS

scan_path ( $pathname )

Scan the path provided using clamd on a the configured local UNIX socket.

Returns an Email::VirusScan::Result object.

DEPENDENCIES

IO::Socket::UNIX, IO::Select, Scalar::Util, Cwd, Email::VirusScan::Result,

SEE ALSO

http://www.clamav.net/

AUTHOR

David Skoll (dfs@roaringpenguin.com)

Dave O'Neill (dmo@roaringpenguin.com)

LICENCE AND COPYRIGHT

Copyright (c) 2007 Roaring Penguin Software, Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.