Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    Mail::ClamAV 0.21

    Download button

    No screenshots available
    Downloads: 554  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.5/5)
    15 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Scott Beck | More programs
    Perl Artistic License / FREE
    April 5th, 2008, 07:31 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Mail::ClamAV description

    Mail::ClamAV is a Perl extension for the clamav virus scanner.

    Mail::ClamAV is a Perl extension for the clamav virus scanner.

    SYNOPSIS

    use Mail::ClamAV qw/:all/;


    # $Mail::ClamAV::Error in numeric context return clamav's
    # error status code which corresponds to the constants which
    # can be exported
    my $c = new Mail::ClamAV("/path/to/directory/or/file")
    or die "Failed to load db: $Mail::ClamAV::Error (", 0+$Mail::;

    # You can get retdbdir() to get the database dir in
    # clamav's conf
    my $c = new Mail::ClamAV(retdbdir())
    or die "Failed to load db: $Mail::ClamAV::Error";

    # When database is loaded, you must create the proper trie with:
    $c->build or die "Failed to build engine: $Mail::ClamAV::Error";

    # check to see if we need to reload
    if ($c->statchkdir) {
    $c = new Mail::ClamAV(retdbdir());
    $c->build or die "Failed to build engine: $Mail::ClamAV::Error";
    }

    # Set some limits (only applies to scan())
    $c->maxreclevel(4);
    $c->maxmailrec(4);
    $c->maxfiles(20);
    $c->maxfilesize(1024 * 1024 * 20); # 20 megs
    $c->archivememlim(0); # limit memory usage for bzip2 (0/1)
    $c->maxratio(0);

    # Scan a filehandle (scandesc in clamav)
    # scan(FileHandle or path, Bitfield of options)
    my $status = $c->scan(FH, CL_SCAN_ARCHIVE|CL_SCAN_MAIL);

    # Scan a file (scanfile in clamav)
    my $status = $c->scan("/path/to/file.eml", CL_SCAN_MAIL);

    # $status is an overloaded object
    die "Failed to scan: $status" unless $status;
    if ($status->virus) {
    print "Message is a virus: $statusn";
    }
    else {
    print "No virus found!n";
    }

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    clamav extension | virus scanner | Perl module | clamav | virus | scanner



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM