1Mail::SpamAssassin::ConUfs:e:rPaCrosnetrr(i3b)uted PerlMDaoiclu:m:eSnptaamtAisosnassin::Conf::Parser(3)
2
3
4

NAME

6       Mail::SpamAssassin::Conf::Parser - parse SpamAssassin configuration
7

SYNOPSIS

9         (see Mail::SpamAssassin)
10

DESCRIPTION

12       Mail::SpamAssassin is a module to identify spam using text analysis and
13       several internet-based realtime blacklists.
14
15       This class is used internally by SpamAssassin to parse its
16       configuration files.  Please refer to the "Mail::SpamAssassin"
17       documentation for public interfaces.
18

STRUCTURE OF A CONFIG BLOCK

20       This is the structure of a config-setting block.  Each is a hashref
21       which may contain these keys:
22
23       setting
24           the name of the setting it modifies, e.g. "required_score". this
25           also doubles as the default for 'command' (below). THIS IS
26           REQUIRED.
27
28       command
29           The command string used in the config file for this setting.
30           Optional; 'setting' will be used for the command if this is
31           omitted.
32
33       aliases
34           An [aryref] of other aliases for the same command.  optional.
35
36       type
37           The type of this setting:
38
39            - $CONF_TYPE_NOARGS: must not have any argument, like "clear_headers"
40            - $CONF_TYPE_STRING: string
41            - $CONF_TYPE_NUMERIC: numeric value (float or int)
42            - $CONF_TYPE_BOOL: boolean (0/no or 1/yes)
43            - $CONF_TYPE_TEMPLATE: template, like "report"
44            - $CONF_TYPE_ADDRLIST: list of mail addresses, like "whitelist_from"
45            - $CONF_TYPE_HASH_KEY_VALUE: hash key/value pair, like "describe" or tflags
46            - $CONF_TYPE_STRINGLIST list of strings, stored as an array
47            - $CONF_TYPE_IPADDRLIST list of IP addresses, stored as an array of SA::NetSet
48
49           If this is set, and a 'code' block does not already exist, a 'code'
50           block is assigned based on the type.
51
52           In addition, the SpamAssassin test suite will validate that the
53           settings do not 'leak' between users.
54
55           Note that $CONF_TYPE_HASH_KEY_VALUE-type settings require that the
56           value be non-empty, otherwise they'll produce a warning message.
57
58       code
59           A subroutine to deal with the setting.  Only used if type is not
60           set.  ONE OF code OR type IS REQUIRED.  The arguments passed to the
61           function are "($self, $key, $value, $line)", where $key is the
62           setting (*not* the command), $value is the value string, and $line
63           is the entire line.
64
65           There are two special return values that the code subroutine may
66           return to signal that there is an error in the configuration:
67
68           $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE -- this setting
69           requires that a value be set, but one was not provided.
70
71           $Mail::SpamAssassin::Conf::INVALID_VALUE -- this setting requires a
72           value from a set of 'valid' values, but the user provided an
73           invalid one.
74
75           Any other values -- including "undef" -- returned from the
76           subroutine are considered to mean 'success'.
77
78           It is good practice to set a 'type', if possible, describing how
79           your settings are stored on the Conf object; this allows the
80           SpamAssassin test suite to validate that the settings do not 'leak'
81           between users.
82
83       default
84           The default value for the setting.  may be omitted if the default
85           value is a non-scalar type, which should be set in the Conf ctor.
86           note for path types: using "__userstate__" is recommended for
87           defaults, as it allows Mail::SpamAssassin module users who set that
88           configuration setting, to receive the correct values.
89
90       is_priv
91           Set to 1 if this setting requires 'allow_user_rules' when run from
92           spamd.
93
94       is_admin
95           Set to 1 if this setting can only be set in the system-wide config
96           when run from spamd.  (All settings can be used by local programs
97           run directly by the user.)
98
99       is_frequent
100           Set to 1 if this value occurs frequently in the config. this means
101           it's looked up first for speed.
102
103
104
105perl v5.12.4                      2011-06-06Mail::SpamAssassin::Conf::Parser(3)
Impressum