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            - $CONF_TYPE_DURATION a nonnegative time interval in seconds - a numeric value
49                                 (float or int), optionally suffixed by a time unit (s, m,
50                                 h, d, w), seconds are implied if unit is missing
51
52           If this is set, and a 'code' block does not already exist, a 'code'
53           block is assigned based on the type.
54
55           In addition, the SpamAssassin test suite will validate that the
56           settings do not 'leak' between users.
57
58           Note that $CONF_TYPE_HASH_KEY_VALUE-type settings require that the
59           value be non-empty, otherwise they'll produce a warning message.
60
61       code
62           A subroutine to deal with the setting.  ONE OF code OR type IS
63           REQUIRED.  The arguments passed to the function are "($self, $key,
64           $value, $line)", where $key is the setting (*not* the command),
65           $value is the value string, and $line is the entire line.
66
67           There are two special return values that the code subroutine may
68           return to signal that there is an error in the configuration:
69
70           $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE -- this setting
71           requires that a value be set, but one was not provided.
72
73           $Mail::SpamAssassin::Conf::INVALID_VALUE -- this setting requires a
74           value from a set of 'valid' values, but the user provided an
75           invalid one.
76
77           $Mail::SpamAssassin::Conf::INVALID_HEADER_FIELD_NAME -- this
78           setting requires a syntactically valid header field name, but the
79           user provided an invalid one.
80
81           Any other values -- including "undef" -- returned from the
82           subroutine are considered to mean 'success'.
83
84           It is good practice to set a 'type', if possible, describing how
85           your settings are stored on the Conf object; this allows the
86           SpamAssassin test suite to validate that the settings do not 'leak'
87           between users.
88
89       default
90           The default value for the setting.  may be omitted if the default
91           value is a non-scalar type, which should be set in the Conf ctor.
92           note for path types: using "__userstate__" is recommended for
93           defaults, as it allows Mail::SpamAssassin module users who set that
94           configuration setting, to receive the correct values.
95
96       is_priv
97           Set to 1 if this setting requires 'allow_user_rules' when run from
98           spamd.
99
100       is_admin
101           Set to 1 if this setting can only be set in the system-wide config
102           when run from spamd.  (All settings can be used by local programs
103           run directly by the user.)
104
105       is_frequent
106           Set to 1 if this value occurs frequently in the config. this means
107           it's looked up first for speed.
108
109
110
111perl v5.30.0                      2019-10-01Mail::SpamAssassin::Conf::Parser(3)
Impressum