{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Message::Head::SpamGroup (perldoc)\n\n## NAME\n\nMail::Message::Head::SpamGroup - spam fighting related header fields\n\n## SYNOPSIS\n\nmy $sg = Mail::Message::Head::SpamGroup->new(head => $head, ...);\n$head->addSpamGroup($sg);\nmy $sg = $head->addSpamGroup( <options> );\n$sg->delete;\nmy @sgs = $head->spamGroups;\n\n## DESCRIPTION\n\nA *spam group* is a set of header fields which are added by spam detection and spam fighting\nsoftware. This class knows various details about that software.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (6 subsections)\n- **DETAILS** (1 subsections)\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Message::Head::SpamGroup",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Message::Head::SpamGroup - spam fighting related header fields",
        "synopsis": "my $sg = Mail::Message::Head::SpamGroup->new(head => $head, ...);\n$head->addSpamGroup($sg);\nmy $sg = $head->addSpamGroup( <options> );\n$sg->delete;\nmy @sgs = $head->spamGroups;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 108
                    },
                    {
                        "name": "The header",
                        "lines": 23
                    },
                    {
                        "name": "Access to the header",
                        "lines": 11
                    },
                    {
                        "name": "Internals",
                        "lines": 8
                    },
                    {
                        "name": "Error handling",
                        "lines": 48
                    },
                    {
                        "name": "Cleanup",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DETAILS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Spam fighting fields",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Message::Head::SpamGroup - spam fighting related header fields\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Message::Head::SpamGroup\nis a Mail::Message::Head::FieldGroup\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $sg = Mail::Message::Head::SpamGroup->new(head => $head, ...);\n$head->addSpamGroup($sg);\n\nmy $sg = $head->addSpamGroup( <options> );\n$sg->delete;\n\nmy @sgs = $head->spamGroups;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "A *spam group* is a set of header fields which are added by spam detection and spam fighting\nsoftware. This class knows various details about that software.\n\nExtends \"DESCRIPTION\" in Mail::Message::Head::FieldGroup.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Message::Head::FieldGroup.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in Mail::Message::Head::FieldGroup.\n\n$obj->clone()\nInherited, see \"Constructors\" in Mail::Message::Head::FieldGroup\n\n$obj->fighter( $name, [$settings] )\nMail::Message::Head::SpamGroup->fighter( $name, [$settings] )\nGet the $settings of a certain spam-fighter, optionally after setting them. The\nknownFighters() method returns the defined names. The names are case-sensitive.\n\n-Option --Default\nfields   <required>\nisspam   <required>\nversion  undef\n\nfields => REGEXP\nThe regular expression which indicates which of the header fields are added by the spam\nfighter software.\n\nisspam => CODE\nThe CODE must return true or false, to indicate whether the spam fighter thinks that the\nmessage contains spam. The CODE ref is called with the spamgroup object (under\nconstruction) and the header which is inspected.\n\nversion => CODE\nCan be called to collect the official name and the version of the software which is used\nto detect spam. The CODE ref is called with the spamgroup object (under construction) and\nthe header which is inspected.\n\nexample: adding your own spam-fighter definitions\n\nMail::Message::Head::SpamGroup->fighter( 'MY-OWN',\nfields => qw/^x-MY-SPAM-DETECTOR-/,\nisspam => sub { my ($sg, $head) = @; $head->fields > 100 }\n);\n\n$obj->from($head|$message, %options)\nReturns a list of \"Mail::Message::Head::SpamGroup\" objects, based on the specified $message\nor message $head.\n\n-Option--Default\ntypes   undef\n\ntypes => ARRAY-OF-NAMES\nOnly the specified types will be tried. If the ARRAY is empty, an empty list is returned.\nWithout this option, all sets are returned.\n\n$obj->habeasSweFieldsCorrect( [$message|$head] )\nMail::Message::Head::SpamGroup->habeasSweFieldsCorrect( [$message|$head] )\nReturns a true value if the $message or $head contains \"Habeas-SWE\" fields which are\ncorrect. Without argument, this is used as instance method on an existing Spam-Group.\n\nexample: checking Habeas-SWE fields\n\nif(Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($message))\n{   $message->label(spam => 0);\n}\n\nmy $sg = $message->head->spamGroups('Habeas-SWE');\nif($sg->habeasSweFieldsCorrect) { ... };\n\nuse List::Util 'first';\nif(first {$->habeasSweFieldsCorrect} $head->spamGroups)\n{   ...\n}\n\n$obj->implementedTypes()\nMail::Message::Head::SpamGroup->implementedTypes()\nInherited, see \"Constructors\" in Mail::Message::Head::FieldGroup\n\n$obj->isSpamGroupFieldName($name)\nMail::Message::Head::SpamGroup->isSpamGroupFieldName($name)\n$obj->knownFighters()\nMail::Message::Head::SpamGroup->knownFighters()\nReturns an unsorted list of all names representing pre-defined spam-fighter software. You\ncan ask details about them, and register more fighters with the fighter() method.\n\nMail::Message::Head::SpamGroup->new($fields, %options)\nConstruct an object which maintains one set of fields which were added by spam fighting\nsoftware.\n\n-Option  --Defined in                     --Default\nhead      Mail::Message::Head::FieldGroup  undef\nlog       Mail::Reporter                   'WARNINGS'\nsoftware  Mail::Message::Head::FieldGroup  undef\ntrace     Mail::Reporter                   'WARNINGS'\ntype      Mail::Message::Head::FieldGroup  undef\nversion   Mail::Message::Head::FieldGroup  undef\n\nhead => HEAD\nlog => LEVEL\nsoftware => STRING\ntrace => LEVEL\ntype => STRING\nversion => STRING\n\n$obj->spamDetected( [BOOLEAN] )\nReturns (after setting) whether this group of spam headers thinks that this is spam. See\nMail::Message::Head::Complete::spamDetected().\n\nexample:\n\ndie if $head->spamDetected;\n\nforeach my $sg ($head->spamGroups)\n{   print $sg->type.\" found spam\\n\" if $sg->spamDetected;\n}\n"
                    },
                    {
                        "name": "The header",
                        "content": "Extends \"The header\" in Mail::Message::Head::FieldGroup.\n\n$obj->add( <$field, $value> | $object )\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->addFields( [$fieldnames] )\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->attach($head)\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->delete()\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->fieldNames()\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->fields()\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n\n$obj->head()\nInherited, see \"The header\" in Mail::Message::Head::FieldGroup\n"
                    },
                    {
                        "name": "Access to the header",
                        "content": "Extends \"Access to the header\" in Mail::Message::Head::FieldGroup.\n\n$obj->software()\nInherited, see \"Access to the header\" in Mail::Message::Head::FieldGroup\n\n$obj->type()\nInherited, see \"Access to the header\" in Mail::Message::Head::FieldGroup\n\n$obj->version()\nInherited, see \"Access to the header\" in Mail::Message::Head::FieldGroup\n"
                    },
                    {
                        "name": "Internals",
                        "content": "Extends \"Internals\" in Mail::Message::Head::FieldGroup.\n\n$obj->collectFields( [$name] )\nInherited, see \"Internals\" in Mail::Message::Head::FieldGroup\n\n$obj->detected($type, $software, $version)\nInherited, see \"Internals\" in Mail::Message::Head::FieldGroup\n"
                    },
                    {
                        "name": "Error handling",
                        "content": "Extends \"Error handling\" in Mail::Message::Head::FieldGroup.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Message::Head::SpamGroup->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->details()\nInherited, see \"Error handling\" in Mail::Message::Head::FieldGroup\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::Head::SpamGroup->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Head::SpamGroup->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->print( [$fh] )\nInherited, see \"Error handling\" in Mail::Message::Head::FieldGroup\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                    },
                    {
                        "name": "Cleanup",
                        "content": "Extends \"Cleanup\" in Mail::Message::Head::FieldGroup.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                    }
                ]
            },
            "DETAILS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Spam fighting fields",
                        "content": "Detected spam fighting software\nThe Mail::Message::Head::SpamGroup class can be used to detect fields which were produced by\ndifferent spam fighting software.\n\n*   SpamAssassin\n\nThese fields are added by Mail::SpamAssassin, which is the central implementation of the\nspam-assassin package. The homepage of this GPL'ed project can be found at\n<http://spamassassin.org>.\n\n*   Habeas-SWE\n\nHabeas tries to fight spam via the standard copyright protection mechanism: Sender Warranted\nE-mail (SWE). Only when you have a contract with Habeas, you are permitted to add a few\ncopyrighted lines to your e-mail. Spam senders will be refused a contract. Mail clients\nwhich see these nine lines are (quite) sure that the message is sincere.\n\nSee <http://www.habeas.com> for all the details on this commercial product.\n\n*   MailScanner\n\nThe MailScanner filter is developed and maintained by transtec Computers. The software is\navailable for free download from <http://www.sng.ecs.soton.ac.uk/mailscanner/>. Commercial\nsupport is provided via <http://www.mailscanner.biz>.\n"
                    }
                ]
            },
            "DIAGNOSTICS": {
                "content": "Error: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
                "subsections": []
            }
        }
    }
}