METHODS

See METHODS in Mail::Reporter

Constructors

$class->new( OPTIONS )

Create a spam filter. Internally, a Mail::SpamAssassin object is maintained.

Only the whole message can be searched; this is a limitation of the Mail::SpamAssassin module.

Option Defined in Default

binaries

Mail::Box::Search

<false>

decode

Mail::Box::Search

<true>

delayed

Mail::Box::Search

<true>

deleted

Mail::Box::Search

<false>

deliver

Mail::Box::Search

undef

in

Mail::Box::Search

'MESSAGE'

label

c<'spam'>

limit

Mail::Box::Search

0

log

Mail::Reporter

'WARNINGS'

logical

Mail::Box::Search

'REPLACE'

multiparts

Mail::Box::Search

<true>

rewrite_mail

<true>

sa_options

{ }

spam_assassin

undef

trace

Mail::Reporter

'WARNINGS'

binaries => BOOLEAN
decode => BOOLEAN
delayed => BOOLEAN
deleted => BOOLEAN
deliver => undef|CODE|'DELETE'
in => 'HEAD'|'BODY'|'MESSAGE'
label => STRING|undef
Mark all selected message with the specified STRING. If this option is explicitly set to undef, the label will not be set.
limit => NUMBER
log => LEVEL
logical => 'REPLACE'|'AND'|'OR'|'NOT'|'AND NOT'|'OR NOT'
multiparts => BOOLEAN
rewrite_mail => BOOLEAN
Add lines to the message header describing the results of the spam scan. See Mail::SpamAssassin::PerMsgStatus subroutine rewrite_mail.
sa_options => HASH
Options to create the internal Mail::SpamAssassin object; see its manual page for the available options. Other setting may be provided via SpamAssassins configuration file mechanism, which is explained in manual Mail::SpamAssassin::Conf.
spam_assassin => OBJECT
Provide a Mail::SpamAssassin object to be used for searching spam. If none is specified, one is created internally. The object can be retreived with assassinator().
trace => LEVEL
» Example:
 my $filter = Mail::Box::Search::SpamAssassin
               ->new( found => 'DELETE' );

Searching

$obj->assassinator

Returns the internally maintained assassinator object. You may want to reach this object for complex configuration.

$obj->inBody( PART, BODY )
See inBody in Mail::Box::Search.
$obj->inHead( PART, HEAD )
See inHead in Mail::Box::Search.
$obj->searchPart( PART )
See searchPart in Mail::Box::Search.

The Results

$obj->printMatch( [FILEHANDLE], HASH )
See printMatch in Mail::Box::Search.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Reporter.
$obj->addReport( OBJECT )
See addReport in Mail::Reporter.
$obj->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
$class->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
See defaultTrace in Mail::Reporter.
$obj->errors
See errors in Mail::Reporter.
$obj->log( [LEVEL [,STRINGS]] )
$class->log( [LEVEL [,STRINGS]] )
See log in Mail::Reporter.
$obj->logPriority( LEVEL )
$class->logPriority( LEVEL )
See logPriority in Mail::Reporter.
$obj->logSettings
See logSettings in Mail::Reporter.
$obj->notImplemented
See notImplemented in Mail::Reporter.
$obj->report( [LEVEL] )
See report in Mail::Reporter.
$obj->reportAll( [LEVEL] )
See reportAll in Mail::Reporter.
$obj->trace( [LEVEL] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Reporter.
$obj->inGlobalDestruction
See inGlobalDestruction in Mail::Reporter.