NAME

Email::VirusScan::Engine - Engine class for Email::VirusScan backends

SYNOPSIS

use Email::VirusScan::Engine;
@ISA = qw( Email::VirusScan::Engine );

DESCRIPTION

Email::VirusScan::Engine provides a base class and utility methods for implementing Email::VirusScan support for various virus scanners.

INSTANCE METHODS

scan ( $email )

Generic scan() method. Takes an Email::Abstract object, finds its path location or saves the contents to a file, and calls scan_path() on that path.

May be overridden by subclass.

UTILITY METHODS FOR SUBCLASSES

list_files ( $path )

Returns a list of all files below $path, recursing into directories.

Some scanners can only scan individual files, rather than understanding directories themselves. This gives us a lightweight way to find all files for scanning.

Will die with "Could not open directory $path: $!" if directory cannot be opened.

CONFIGURATION AND ENVIRONMENT

  • Uses File::Temp to generate tempfiles in $ENV{TMPDIR}, or /tmp if no TMPDIR environment variable set.

DEPENDENCIES

Email::Abstract, Scalar::Util, Cwd, File::Temp

AUTHOR

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.