See METHODS in Mail::Reporter
Get the $settings of a certain spam-fighter, optionally after setting them. The manual knownFighters() method returns the defined names. The names are case-sensitive.
Option | Default |
---|---|
fields | <required> |
isspam | <required> |
version |
|
Mail::Message::Head::SpamGroup->fighter( 'MY-OWN', fields => qw/^x-MY-SPAM-DETECTOR-/, isspam => sub { my ($sg, $head) = @_; $head->fields > 100 } );
Returns a list of Mail::Message::Head::SpamGroup
objects, based on the
specified $message or message $head.
Option | Default |
---|---|
types |
|
Returns a true value if the $message or $head contains Habeas-SWE
fields
which are correct. Without argument, this is used as instance method on
an existing Spam-Group.
if(Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($message)) { $message->label(spam => 0); } my $sg = $message->head->spamGroups('Habeas-SWE'); if($sg->habeasSweFieldsCorrect) { ... }; use List::Util 'first'; if(first {$_->habeasSweFieldsCorrect} $head->spamGroups) { ... }
Returns an unsorted list of all names representing pre-defined spam-fighter software. You can ask details about them, and register more fighters with the fighter() method.
Construct an object which maintains one set of fields which were added by spam fighting software.
Option | Defined in | Default |
---|---|---|
head | Mail::Message::Head::FieldGroup |
|
log | Mail::Reporter |
|
software | Mail::Message::Head::FieldGroup |
|
trace | Mail::Reporter |
|
type | Mail::Message::Head::FieldGroup |
|
version | Mail::Message::Head::FieldGroup |
|
Returns (after setting) whether this group of spam headers thinks that this is spam. See Mail::Message::Head::Complete::spamDetected().
die if $head->spamDetected; foreach my $sg ($head->spamGroups) { print $sg->type." found spam\n" if $sg->spamDetected; }