Debian Codegraph @

docs/config.pod

raw
1
2 =head1 Qpsmtpd configuration
3
4 The default way of setting config values is placing files with the
5 name of the config variable in the config directory F<config/>, like
6 qmail's F</var/qmail/control/> directory. NB: F</var/qmail/control> (or
7 F<$ENV{QMAIL}/control>) is used if a file does not exist in C<config/>.
8 The location of the C<config/> directory can be set via the
9 I<QPSMTPD_CONFIG> environment variable and defaults to the current
10 working directory.
11
12 Any empty line or lines starting with C<#> are ignored. You may use a
13 plugin which hooks the C<config> hook to store the settings in some other
14 way. See L<docs/plugins.pod> and L<docs/hooks.pod> for more info on this.
15 Some settings still have to go in files, because they are loaded before
16 any plugin can return something via the C<config> hook: C<me>, C<logging>,
17 C<plugin_dirs> and of course C<plugins>. B<FIXME: more?>
18
19 =head2 Core settings
20
21 These settings are used by the qpsmtpd core. Any other setting is (hopefully)
22 documented by the corresponding plugin. Some settings of important plugins
23 are shown below in L</Plugin settings>.
24
25 =over 4
26
27 =item plugins
28
29 The main config file, where all used plugins and their arguments are listed.
30
31 =item me
32
33 Sets the hostname which is used all over the place: in the greeting message,
34 the I<Received: >header, ...
35 Default is whatever Sys::Hostname's hostname() returns.
36
37 =item plugin_dirs
38
39 Where to search for plugins (one directory per line), defaults to F<./plugins>.
40
41 =item logging
42
43 Sets the primary logging destination, see F<plugins/logging/*>. Format
44 is the same as it's used for the F<plugins> config file. B<NOTE:> only
45 the first non empty line is used (lines starting with C<#> are counted
46 as empty).
47
48 =item loglevel
49
50 This is not used anymore, I<only> if no F<logging/> plugin is in use. Use a
51 logging plugin.
52
53 =item databytes
54
55 Maximum size a message may be. Without this setting, there is no limit on the
56 size. Should be something less than the backend MTA has set as it's maximum
57 message size (if there is one).
58
59 =item size_threshold
60
61 When a message is greater than the size given in this config file, it will be
62 spooled to disk. You probably want to enable spooling to disk for most virus
63 scanner plugins and F<spamassassin>.
64
65 =item smtpgreeting
66
67 Override the default SMTP greeting with this string.
68
69 =item spool_dir
70
71 Where temporary files are stored, defaults to F<~/tmp/>.
72
73 =item spool_perms
74
75 Permissions of the I<spool_dir>, default is C<0700>. You probably have to
76 change the defaults for some scanners (e.g. the F<clamdscan> plugin).
77
78 =item timeout
79
80 =item timeoutsmtpd
81
82 Set the timeout for the clients, C<timeoutsmtpd> is the qmail smtpd control
83 file, C<timeout> the qpsmtpd file. Default is 1200 seconds.
84
85 =item tls_before_auth
86
87 If set to a true value, clients will have to initiate an SSL secured
88 connection before any auth succeeds, defaults to C<0>.
89
90 =back
91
92 =head2 Plugin settings files
93
94 =over 4
95
96 =item rcpthosts, morercpthosts
97
98 Plugin: I<rcpt_ok>
99
100 Domains listed in these files will be accepted as valid local domains,
101 anything else is rejected with a C<Relaying denied> message. If an entry
102 in the C<rcpthosts> file starts with a C<.>, mails to anything ending with
103 this string will be accepted, e.g.:
104
105 example.com
106 .example.com
107
108 will accept mails for C<[email protected]> and C<[email protected]>.
109 The C<morercpthosts> file is just checked for exact (case insensitive)
110 matches.
111
112 =item hosts_allow
113
114 Plugin: F<hosts_allow>.
115
116 Don't use this config file. The plugin itself is required to set the
117 maximum number of concurrent connections. This config setting should
118 only be used for some extremly rude clients: if list is too big it will
119 slow down accepting new connections.
120
121 =item relayclients
122 =item morerelayclients
123
124 Plugin: F<check_relay>
125
126 Allow relaying for hosts listed in this file. The C<relayclients> file accepts
127 IPs and CIDR entries. The C<morercpthosts> file accepts IPs and C<prefixes>
128 like C<192.168.2.> (note the trailing dot!). With the given example any host
129 which IP starts with C<192.168.2.> may relay via us.
130
131 =item dnsbl_zones
132
133 Plugin: F<dnsbl>
134
135 This file specifies the RBL zones list, used by the dnsbl plugin. Ihe IP
136 address of each connecting host will be checked against each zone given.
137 A few sample DNSBLs are listed in the sample config file, but you should
138 evaluate the efficacy and listing policies of a DNSBL before using it.
139
140 See also C<dnsbl_allow> and C<dnsbl_rejectmsg> in the documentation of the
141 C<dnsbl> plugin
142
143 =item resolvable_fromhost
144
145 Plugin: F<resolvable_fromhost>
146
147 Reject sender addresses where the MX is unresolvable, i.e. a boolean value
148 is the only value in this file. If the MX resolves to something, reject the
149 sender address if it resolves to something listed in the
150 F<invalid_resolvable_fromhost> config file. The I<invalid_resolvable_fromhost>
151 expects IP addresses or CIDR (i.e. C<network/mask> values) one per line, IPv4
152 only currenlty.
153
154 =back
155
156 =head2 Plugin settings arguments
157
158 These are arguments that can be set on the config/plugins line, after the name
159 of the plugin. These config options are available to all plugins.
160
161 =over 4
162
163 =item loglevel
164
165 Adjust the quantity of logging for the plugin. See docs/logging.pod
166
167 =item reject
168
169 plugin reject [ 0 | 1 | naughty ]
170
171 Should the plugin reject mail?
172
173 The special 'naughty' case will mark the connection as a naughty. Most plugins
174 skip processing naughty connections. Filtering plugins can learn from them.
175 Naughty connections are terminated up by the B<naughty> plugin.
176
177 Plugins that use $self->get_reject() or $self->get_reject_type() will
178 automatically honor this setting.
179
180 =item reject_type
181
182 plugin reject_type [ perm | temp | disconnect | temp_disconnect ]
183
184 Default: perm
185
186 Values with temp in the name return a 4xx code and the others return a 5xx
187 code.
188
189 The I<reject_type> argument and the corresponding get_reject_type() method
190 provides a standard way for plugins to automatically return the selected
191 rejection type, as chosen by the config setting, the plugin author, or the
192 get_reject_type() method.
193
194 Plugins that are updated to use the $self->get_reject() or
195 $self->get_reject_type() methods will automatically honor this setting.
196
197 =back
198
199 =cut
200