NAME

Mail::Box::Search::SpamAssassin - select messages with Mail::SpamAssassin

CLASS INHERITANCE

Mail::Box::Search::SpamAssassin is a Mail::Box::Search is a Mail::Reporter

SYNOPSIS

use Mail::Box::Manager;
my $mgr    = Mail::Box::Manager->new;
my $folder = $mgr->open('Inbox');

my $filter = Mail::Box::Search::SpamAssassin->new
   ( label => 'spam'
   , in    => 'BODY'
   );

my @msgs   = $filter->search($folder);
if($filter->search($message)) {...}

DESCRIPTION

METHODS

Initiation

new OPTIONS

Create a spam filter.

OPTION               DEFAULT
binaries             <false>
decode               <true>
delayed              <true>
deleted              <false>
deliver              undef
in                   MESSAGE
label                undef
limit                0
log                  'WARNINGS'
logical              'REPLACE'
multiparts           <true>
trace                'WARNINGS'
binaries => BOOLEAN

See Mail::Box::Search::new(binaries)

decode => BOOLEAN

See Mail::Box::Search::new(decode)

delayed => BOOLEAN

See Mail::Box::Search::new(delayed)

deleted => BOOLEAN

See Mail::Box::Search::new(deleted)

deliver => undef|CODE|'DELETE'|LABEL

See Mail::Box::Search::new(deliver)

in => 'HEAD'|'BODY'|'MESSAGE'

See Mail::Box::Search::new(in)

label => STRING

See Mail::Box::Search::new(label)

limit => NUMBER

See Mail::Box::Search::new(limit)

log => LEVEL

See Mail::Reporter::new(log)

logical => 'REPLACE'|'AND'|'OR'|'NOT'|'AND NOT'|'OR NOT'

See Mail::Box::Search::new(logical)

multiparts => BOOLEAN

See Mail::Box::Search::new(multiparts)

trace => LEVEL

See Mail::Reporter::new(trace)

Examples:

my $filter = Mail::Box::Search::SpamAssassin->new
 ( in    => 'HEAD'
 , found => 'DELETE'
 );

Searching

inBody PART, BODY

See Mail::Box::Search::inBody()

inHead PART, HEAD

See Mail::Box::Search::inHead()

search FOLDER|THREAD|MESSAGE|ARRAY-OF-MESSAGES

See Mail::Box::Search::search()

searchPart PART

See Mail::Box::Search::searchPart()

The Results

printMatch [FILEHANDLE], HASH

See Mail::Box::Search::printMatch()

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

AUTOLOAD

See Mail::Reporter::AUTOLOAD()

DESTROY

See Mail::Reporter::DESTROY()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.

AUTHOR

Mark Overmeer (mark@overmeer.net) with the help of many.

VERSION

This code is beta, version 2.025.

Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.