1Mail::SpamAssassin::ConUfs:e:rPaCrosnetrr(i3b)uted PerlMDaoiclu:m:eSnptaamtAisosnassin::Conf::Parser(3)
2
3
4
6 Mail::SpamAssassin::Conf::Parser - parse SpamAssassin configuration
7
9 (see Mail::SpamAssassin)
10
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 configura‐
16 tion files. Please refer to the "Mail::SpamAssassin" documentation for
17 public interfaces.
18
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 omit‐
31 ted.
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_STRING: string
40 - $CONF_TYPE_NUMERIC: numeric value (float or int)
41 - $CONF_TYPE_BOOL: boolean (0/no or 1/yes)
42 - $CONF_TYPE_TEMPLATE: template, like "report"
43 - $CONF_TYPE_ADDRLIST: address list, like "whitelist_from"
44 - $CONF_TYPE_HASH_KEY_VALUE: hash key/value pair,
45 like "describe" or tflags
46
47 If this is set, a 'code' block is assigned based on the type.
48
49 Note that $CONF_TYPE_HASH_KEY_VALUE-type settings require that the
50 value be non-empty, otherwise they'll produce a warning message.
51
52 code
53 A subroutine to deal with the setting. Only used if type is not
54 set. ONE OF code OR type IS REQUIRED. The arguments passed to the
55 function are "($self, $key, $value, $line)", where $key is the set‐
56 ting (*not* the command), $value is the value string, and $line is
57 the entire line.
58
59 There are two special return values that the code subroutine may
60 return to signal that there is an error in the configuration:
61
62 $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE -- this setting
63 requires that a value be set, but one was not provided.
64
65 $Mail::SpamAssassin::Conf::INVALID_VALUE -- this setting requires a
66 value from a set of 'valid' values, but the user provided an
67 invalid one.
68
69 Any other values -- including "undef" -- returned from the subrou‐
70 tine are considered to mean 'success'.
71
72 default
73 The default value for the setting. may be omitted if the default
74 value is a non-scalar type, which should be set in the Conf ctor.
75 note for path types: using "__userstate__" is recommended for
76 defaults, as it allows Mail::SpamAssassin module users who set that
77 configuration setting, to receive the correct values.
78
79 is_priv
80 Set to 1 if this setting requires 'allow_user_rules' when run from
81 spamd.
82
83 is_admin
84 Set to 1 if this setting can only be set in the system-wide config
85 when run from spamd. (All settings can be used by local programs
86 run directly by the user.)
87
88 is_frequent
89 Set to 1 if this value occurs frequently in the config. this means
90 it's looked up first for speed.
91
93perl v5.8.8 2008-01-05Mail::SpamAssassin::Conf::Parser(3)