masqmail-0.2

view docs/xml/masqmail.conf.5.xml @ 0:08114f7dcc23

this is masqmail-0.2.21 from oliver kurth
author meillo@marmaro.de
date Fri, 26 Sep 2008 17:05:23 +0200
parents
children
line source
1 <?xml version="1.0" standalone='no'?>
2 <!DOCTYPE spec SYSTEM "man.dtd">
4 <manpage name="masqmail.conf" section="5" desc="masqmail configuration file">
6 <description>
7 <p>This man page describes the syntax of the main configuration file
8 of masqmail. Its usual location is <file>/etc/masqmail/masqmail.conf</file></p>
10 <p>The configuration consists of lines of the form</p>
12 <p><opt>val</opt> = <arg>expression</arg></p>
14 <p>Where <opt>val</opt> is a variable name and <arg>expression</arg> a string,
15 which can be quoted with '"'. If the expression is on multiple lines
16 or contains characters other than letters, digits or the characters
17 '.', '-', '_', '/', it <em>must</em> be quoted. You can use quotes inside quotes
18 by escaping them with a backslash.</p>
20 <p>Each val has a <i>type</i>, which can be boolean, numeric, string
21 or list. A boolean variable can be set with one of the values 'on',
22 'yes', and 'true' or 'off', 'no' and 'false'. List items are separated
23 with ';'. For some values patterns (like '*','?') can be used. The
24 spaces before and after the '=' are optional.</p>
26 <p>Most lists (exceptions: <opt>local_hosts</opt>,
27 <opt>local_nets</opt>, <opt>listen_addresses</opt>, <opt>online_routes</opt> and <opt>online_gets</opt>) accept
28 files. These will be recognized by a leading slash '/'. The contents
29 of these files will be included at the position of the file name,
30 there can be items or other files before and after the file entry. The
31 format of the files is different though, within these files each entry
32 is on another line. (And not separated by semicolons). This makes it
33 easy to include large lists which are common in different
34 configuration files, so they do not have to appear in every
35 configuration file.</p>
37 <p>Blank lines and lines starting with '#' are ignored.</p>
39 </description>
41 <options>
42 <option>
43 <p><opt>run_as_user = <arg>boolean</arg></opt></p>
44 <optdesc>
45 <p>If this is set, masqmail runs with the user id of the user who
46 invoked it and never changes it. This is for debugging purposes
47 <em>only</em>. If the user is not root, masqmail will not be able to
48 listen on a port &lt; 1024 and will not be able to deliver local mail
49 to others than the user.</p>
50 </optdesc>
51 </option>
53 <option>
54 <p><opt>use_syslog = <arg>boolean</arg></opt></p>
55 <optdesc>
56 <p>If this is set, masqmail uses syslogd for logging. It uses facility
57 MAIL. You still have to set <opt>log_dir</opt> for debug files.</p>
58 </optdesc>
59 </option>
61 <option>
62 <p><opt>debug_level = <arg>n</arg></opt></p>
63 <optdesc>
64 <p>Set the debug level. Valid values are 0 to 6, increasing it further
65 makes no difference. Be careful if you set this as high as 5 or higher,
66 the logs may very soon fill your hard drive.</p>
67 </optdesc>
68 </option>
70 <option>
71 <p><opt>mail_dir = <arg>file</arg></opt></p>
72 <optdesc>
73 <p>The directory where local mail is stored,
74 usually <file>/var/spool/mail</file> or <file>/var/mail</file>.</p>
75 </optdesc>
76 </option>
78 <option>
79 <p><opt>spool_dir = <arg>file</arg></opt></p>
80 <optdesc>
81 <p>The directory where masqmail stores its spool files (and later also
82 other stuff). It <em>must</em> have a subdirectory <file>input</file>.
83 Masqmail needs read and write permissions for this
84 directory. I suggest to use <file>/var/spool/masqmail</file>.</p>
85 </optdesc>
86 </option>
88 <option>
89 <p><opt>host_name = <arg>string</arg></opt></p>
90 <optdesc>
91 <p>This is used in different places: Masqmail identifies itself in the
92 greeting banner on incoming connections and in the HELO/EHLO command
93 for outgoing connections with this name, it is used in the Received:
94 header and to qualify the sender of a locally originating message.</p>
96 <p>If the string begins with a slash '/', it it assumed that it is a
97 filename, and the first line of this file will be used. Usually this will
98 be '/etc/mailname' to make masqmail conform to Debian policies.</p>
100 <p>It is <em>not</em> used to find whether an address is local.
101 Use <opt>local_hosts</opt> for that.</p>
102 </optdesc>
103 </option>
105 <option>
106 <p><opt>remote_port = <arg>n</arg></opt></p>
107 <optdesc>
108 <p>The remote port number to be used. This defaults to port 25.</p>
109 <p>This option is deprecated. Use <opt>host_name</opt> in the route
110 configuration instead. See <manref name="masqmail.route" section="5"
111 href="masqmail.route.5.html"/>.</p>
112 </optdesc>
113 </option>
115 <option>
116 <p><opt>local_hosts = <arg>list</arg></opt></p>
117 <optdesc>
118 <p>A semicolon ';' separated list of hostnames which are considered
119 local. Normally you set it to "localhost;foo;foo.bar.com" if your host
120 has the fully qualified domain name 'foo.bar.com'.</p>
121 </optdesc>
122 </option>
124 <option>
125 <p><opt>local_nets = <arg>list</arg></opt></p>
126 <optdesc>
127 <p>A semicolon ';' separated list of hostnames which are on the
128 'local' net. Delivery to these hosts is attempted immediately. You can
129 use patterns with '*', eg. "*.bar.com".</p>
130 </optdesc>
131 </option>
133 <option>
134 <p><opt>local_addresses = <arg>list</arg></opt></p>
135 <optdesc>
136 <p>A semicolon ';' separated list of fully qualified email-addresses
137 which are considered local although their domain name part is not in
138 the list of <opt>local_hosts</opt>. </p>
139 <p>For example: There are two people working at your
140 LAN: person1@yourdomain and person2@yourdomain. But there are
141 other persons @yourdomain which are NOT local. So you can not put
142 yourdomain to the list of local_hosts. If person1 now wants
143 to write to person2@yourdomain and this mail should not leave the LAN
144 then you can put</p>
145 <p>local_addresses = "person1@yourdomain;person2@yourdomain"</p>
146 <p>to your masqmail.conf.</p>
147 </optdesc>
148 </option>
150 <option>
151 <p><opt>not_local_addresses = <arg>list</arg></opt></p>
152 <optdesc>
153 <p>A semicolon ';' separated list of fully qualified email-addresses
154 which are considered not local although their domain name part is in
155 the list of <opt>local_hosts</opt>. </p>
156 <p>This ist the opposite of the previous case. The majority of addresses
157 of a specific domain are local. But some users are not. With this
158 option you can easily exclude these users.</p>
159 <p>Example:</p>
160 <p>local_hosts = "localhost;myhost;mydomain.net"</p>
161 <p>not_local_addresses = "eric@mydomain.net"</p>
162 </optdesc>
163 </option>
165 <option>
166 <p><opt>listen_addresses = <arg>list</arg></opt></p>
167 <optdesc>
168 <p>A semicolon ';' separated list of interfaces on which connections
169 will be accepted. An interface ist defined by a hostname, optionally
170 followed by a colon ':' and a number for the port. If this is left out,
171 port 25 will be used.</p>
172 <p>You can set this to "localhost:25;foo:25" if your hostname is 'foo'.</p>
173 <p>Note that the names are resolved to IP addreses. If your host has
174 different names which resolve to the same IP, use only one of them,
175 otherwise you will get an error message.
176 </p>
177 </optdesc>
178 </option>
180 <option>
181 <p><opt>do_save_envelope_to = <arg>boolean</arg></opt></p>
182 <optdesc>
183 <p>If this is set to true, a possibly existing Envelope-to: header in an
184 incoming mail which is received via either pop3 or smtp will be saved as
185 an X-Orig-Envelope-to: header.</p>
186 <p>This is useful if you retrieve mail from a pop3 server with either masqmail
187 or fetchmail, and the server supports Envelope-to: headers, and you want to make use
188 of those with a mail filtering tool, eg. procmail. It cannot be preserved because
189 masqmail sets such a header by itself.</p>
190 <p>Default is false.</p>
191 </optdesc>
192 </option>
194 <option>
195 <p><opt>do_relay = <arg>boolean</arg></opt></p>
196 <optdesc>
197 <p>If this is set to false, mail with a return path that is not local and a
198 destination that is also not local will not be accepted via smtp and a 550
199 reply will be given. Default is true.</p>
200 <p>Note that this will not protect you from spammers using open relays, but from
201 users unable to set their address in their mail clients.</p>
202 </optdesc>
203 </option>
205 <option>
206 <p><opt>do_queue = <arg>boolean</arg></opt></p>
207 <optdesc>
208 <p>If this is set, mail will not be delivered immediately when
209 accepted. Same as calling masqmail with the <opt>-odq</opt> option.</p>
210 </optdesc>
211 </option>
213 <option>
214 <p><opt>online_routes.<arg>name</arg> = <arg>list</arg></opt></p>
215 <optdesc>
217 <p>Replace <arg>name</arg> with a name to identify a connection. Set this
218 to a filename (or a list of filenames) for the special route configuration for that
219 connection. You will use that name to call masqmail with the
220 <opt>-qo</opt> option every time a connection to your ISP is set
221 up.</p>
223 <p>Example: Your ISP has the name <i>FastNet</i>. Then you write the
224 following line in the main configuration:</p>
226 <p><opt>online_routes.FastNet</opt> = <arg>"/etc/masqmail/fastnet.route"</arg></p>
228 <p><file>/etc/masqmail/fastnet.route</file> is the route configuration
229 file, see <manref name="masqmail.route" section="5" href="masqmail.route.5.html"/>. As soon as a link to FastNet has been set up, you
230 call masqmail <opt>-qo</opt> <arg>FastNet</arg>. Masqmail will then
231 read the specified file and send the mails.</p>
233 </optdesc>
234 </option>
236 <option>
237 <p><opt>connect_route.<arg>name</arg> = <arg>list</arg></opt></p>
238 <optdesc>
239 <p>Old name for <opt>online_routes</opt>.</p>
240 </optdesc>
241 </option>
244 <option>
245 <p><opt>local_net_route = <arg>file</arg></opt></p>
246 <optdesc>
247 <p>This is similar to <opt>online_routes.<arg>name</arg></opt> but for the
248 local net. Recipient addresses that are in <b>local_nets</b> will be
249 routed using this route configuration. Main purpose is to define a
250 mail server with <b>mail_host</b> in your local network. In simple
251 environments this can be left unset. If unset, a default route
252 configuration will be used.</p>
253 </optdesc>
254 </option>
256 <option>
257 <p><opt>alias_file = <arg>file</arg></opt></p>
258 <optdesc>
259 <p>Set this to the location of your alias file. If unset, no aliasing
260 will be done.</p>
261 </optdesc>
262 </option>
264 <option>
265 <p><opt>alias_local_caseless = <arg>boolean</arg></opt></p>
266 <optdesc>
267 <p>If this is set, local parts in the alias file will be matched
268 disregarding upper/lower case.</p>
269 </optdesc>
270 </option>
272 <option>
273 <p><opt>pipe_fromline = <arg>boolean</arg></opt></p>
274 <optdesc>
275 <p>If this is set, a from line will be prepended to the output stream whenever
276 a pipe command is called after an alias expansion. Default is false.</p>
277 </optdesc>
278 </option>
280 <option>
281 <p><opt>pipe_fromhack = <arg>boolean</arg></opt></p>
282 <optdesc>
283 <p>If this is set, each line beginning with 'From ' is replaced with '>From ' whenever
284 a pipe command is called after an alias expansion. You probably want this if you have
285 set <opt>pipe_fromline</opt> above. Default is false.</p>
286 </optdesc>
287 </option>
289 <option>
290 <p><opt>mbox_default = <arg>string</arg></opt></p>
291 <optdesc>
292 <p>The default local delivery method. Can be one of mbox, mda or
293 maildir (the latter only if maildir support is enabled at compile
294 time). Default is mbox. You can override this for each user by using
295 the <opt>mbox_users</opt>, <opt>mda_users</opt> or <opt>maildir_users</opt> options
296 (see below).
297 </p>
298 </optdesc>
299 </option>
301 <option>
302 <p><opt>mbox_users = <arg>list</arg></opt></p>
303 <optdesc>
304 <p>A list of users which wish delivery to an mbox style mail folder.</p>
305 </optdesc>
306 </option>
308 <option>
309 <p><opt>mda_users = <arg>list</arg></opt></p>
310 <optdesc>
311 <p>A list of users which wish local delivery to an mda. You have to
312 set <opt>mda</opt> (see below) as well.</p>
313 </optdesc>
314 </option>
316 <option>
317 <p><opt>maildir_users = <arg>list</arg></opt></p>
318 <optdesc>
319 <p>A list of users which wish delivery to a qmail style maildir. The
320 path to maildir is ~/Maildir/. The maildir will be created if it
321 does not exist.</p>
322 </optdesc>
323 </option>
325 <option>
326 <p><opt>mda = <arg>expand string</arg></opt></p>
327 <optdesc>
328 <p>If you want local delivery to be transferred to an mda (Mail
329 Delivery Agent), set this to a command. The argument will be expanded
330 on delivery time, you can use variables beginning with a '$' sign,
331 optionally enclosed in curly braces. Variables you can use are:</p>
332 <p>uid - the unique message id. This is not necessarily identical with
333 the Message ID as given in the Message ID: header.</p>
334 <p>received_host - the host the mail was received from</p>
335 <p>ident - the ident, this is either the ident delivered by the ident
336 protocol or the user id of the sender if the message was received locally.</p>
337 <p>return_path_local - the local part of the return path (sender).</p>
338 <p>return_path_domain - the domain part of the return path (sender).</p>
339 <p>return_path - the complete return path (sender).</p>
340 <p>rcpt_local - the local part of the recipient.</p>
341 <p>rcpt_domain - the domain part of the recipient.</p>
342 <p>rcpt - the complete recipient address.</p>
343 <p>Example:</p><p>mda="/usr/bin/procmail -Y -d ${rcpt_local}"</p>
344 <p>For the mda, as for pipe commands, a few environment variables will
345 be set as well. See <manref name="masqmail" section="8"
346 href="masqmail.8.html"/>. To use environment variables for the mda,
347 the '$' sign has to be escaped with a backslash, otherwise they will
348 be tried to be expanded with the internal variables.</p>
350 </optdesc>
351 </option>
353 <option>
354 <p><opt>mda_fromline = <arg>boolean</arg></opt></p>
355 <optdesc>
356 <p>If this is set, a from line will be prepended to the output stream whenever
357 a message is delivered to an mda. Default is false.</p>
358 </optdesc>
359 </option>
361 <option>
362 <p><opt>mda_fromhack = <arg>boolean</arg></opt></p>
363 <optdesc>
364 <p>If this is set, each line beginning with 'From ' is replaced with '>From ' whenever
365 a message is delivered to an mda. You probably want this if you have
366 set <opt>mda_fromline</opt> above. Default is false.</p>
367 </optdesc>
368 </option>
370 <option>
371 <p><opt>online_detect = <arg>string</arg></opt></p>
372 <optdesc>
373 <p>Defines the method MasqMail uses to detect whether there is
374 currently an online connection. It can have the
375 values <opt>file</opt>, <opt>pipe</opt> or <opt>mserver</opt>.</p>
377 <p>When it is set to <opt>file</opt>, MasqMail first checks for the
378 existence of <opt>online_file</opt> (see below) and if it exists, it reads
379 it. The content of the file should be the name of the current
380 connection as defined with <opt>connect_route.<arg>name</arg></opt> (without
381 a trailing newline character).</p>
383 <p>When it is set to <opt>pipe</opt>, MasqMail calls the executable given by
384 the <opt>online_pipe</opt> option (see below) and reads the current online
385 status from its standard output.</p>
387 <p>When it is set to <opt>mserver</opt>, MasqMail connects to the
388 masqdialer server using the value of <opt>mserver_iface</opt> and asks it
389 whether a connection exists and for the name, which should be the name
390 of the current connection as defined with <opt>connect_route.<arg>name</arg></opt>.</p>
392 <p>No matter how MasqMail detects the online status, only messages
393 that are accepted at online time will be delivered using the
394 connection. The spool still has to be emptied with masqmail <opt>-qo</opt>
395 <arg>connection</arg>.</p>
396 </optdesc>
397 </option>
399 <option>
400 <p><opt>online_file = <arg>file</arg></opt></p>
401 <optdesc>
402 <p>This is the name of the file checked for when MasqMail determines
403 whether it is online. The file should only exist when there is
404 currently a connection. Create it in your ip-up script with eg.</p>
406 <p>echo -n &lt;name&gt; &gt; /tmp/connect_route</p>
407 <p>chmod 0644 /tmp/connect_route</p>
409 <p>Do not forget to delete it in your ip-down script.</p>
410 </optdesc>
411 </option>
413 <option>
414 <p><opt>online_pipe = <arg>file</arg></opt></p>
415 <optdesc>
416 <p>This is the name of the executable which will be called to determine
417 the online status. This executable should just print the name oif the current
418 connection to the standard output and return a zero status code. masqmail assumes
419 it is offline if the script returns with a non zero status. Simple example:</p>
421 <p>#!/bin/sh</p>
422 <p></p>
423 <p>[ -e /tmp/connect_route ] || exit 1</p>
424 <p>cat /tmp/connect_route</p>
425 <p>exit 0</p>
427 <p>Of course, instead of the example above you could as well use <opt>file</opt> as
428 the online detection method, but you can do something more sophisticated.</p>
429 </optdesc>
430 </option>
432 <option>
433 <p><opt>mserver_iface = <arg>interface</arg></opt></p>
434 <optdesc>
435 <p>The interface the masqdialer server is listening to. Usually this
436 will be "localhost:224" if mserver is running on the same host as
437 masqmail. But using this option, you can also let masqmail run on
438 another host by setting <opt>mserver_iface</opt> to another hostname,
439 eg. "foo:224".</p>
440 </optdesc>
441 </option>
443 <option>
444 <p><opt>get.<arg>name</arg> = <arg>file</arg></opt></p>
445 <optdesc>
446 <p>Replace <arg>name</arg> with a name to identify a get
447 configuration. Set this to a filename for the get configuration. These
448 files will be used to retrieve mail when called with the -g option.</p>
449 </optdesc>
450 </option>
452 <option>
453 <p><opt>online_gets.<arg>name</arg> = <arg>list</arg></opt></p>
454 <optdesc>
455 <p>Replace <arg>name</arg> with a name to identify an online
456 configuration. Set this to a filename (or a list of filenames) for the get configuration. These
457 files will be used to retrieve mail when called with the -go option.</p>
458 </optdesc>
459 </option>
461 <option>
462 <p><opt>ident_trusted_nets = <arg>list</arg></opt></p>
463 <optdesc>
464 <p><arg>list</arg> is a list of networks of the form a.b.c.d/e
465 (eg. 192.168.1.0/24), from which the ident given by the ident protocol
466 will be trusted, so a user can delete his mail from the queue if the
467 ident is identical to his login name.</p>
468 </optdesc>
469 </option>
471 <option>
472 <p><opt>errmsg_file = <arg>file</arg></opt></p>
473 <optdesc>
474 <p>Set this to a template which will be used to generate delivery failure
475 reports. Variable parts within the template begin with a dollar sign and
476 are identical to those which can be used as arguments for the mda command,
477 see <opt>mda</opt> above. Additional information can be included with
478 @failed_rcpts, @msg_headers and @msg_body, these <b>must</b> be at the
479 beginning of a line and will be replaced with the list of the failed recipients,
480 the message headers and the message body of the failed message.</p>
481 <p>Default is /usr/share/masqmail/tpl/failmsg.tpl.</p>
482 </optdesc>
483 </option>
485 <option>
486 <p><opt>warnmsg_file = <arg>file</arg></opt></p>
487 <optdesc>
488 <p>Set this to a template which will be used to generate delivery warning
489 reports. It uses the same mechanisms for variables as <opt>errmsg_file</opt>,
490 see above.
491 </p>
492 <p>Default is /usr/share/masqmail/tpl/warnmsg.tpl.</p>
493 </optdesc>
494 </option>
496 <option>
497 <p><opt>warn_intervals</opt> = <arg>list</arg></p>
498 <optdesc>
499 <p>Set this to a list of time intervals, at which delivery warnings (starting
500 with the receiving time of the message) shall be generated.</p>
501 <p>A warning will only be generated just after an attempt to deliver the
502 mail and if that attempt failed temporarily. So a warning may be generated after
503 a longer time, if there was no attempt before.</p>
504 <p>Default is "1h;4h;8h;1d;2d;3d"</p>
505 </optdesc>
506 </option>
508 <option>
509 <p><opt>max_defer_time</opt> = <arg>time</arg></p>
510 <optdesc>
511 <p>This is the maximum time, in which a temporarily failed mail will be kept
512 in the spool. When this time is exceeded, it will be handled as a delivery failure,
513 and the message will be bounced.</p>
514 <p>The excedence of this time will only be noticed if the message was actually
515 tried to be delivered. If, for example, the message can only be delivered when
516 online, but you have not been online for that time, no bounce will be generated.</p>
517 <p>Default is 4d (4 days)</p>
518 </optdesc>
519 </option>
521 <option>
522 <p><opt>log_user = <arg>name</arg></opt></p>
523 <optdesc>
524 <p>Replace <arg>name</arg> with a valid local or remote mail address.</p>
525 <p>If this option is not empty, then a copy of every mail,
526 that passes trough the masqmail system will also be sent to the
527 given mail address.</p>
528 <p>For example you can feed your mails into a program like <i>hypermail</i> for
529 archiving purpose by placing an appropriate pipe command in masqmail.alias</p>
530 </optdesc>
531 </option>
533 </options>
535 <section name = "Author">
536 <p>masqmail was written by Oliver Kurth
537 &lt;oku@masqmail.cx&gt;</p><p>You will find the newest version of
538 masqmail at <url href="http://masqmail.cx/masqmail/"/> or search for it
539 in freshmeat (<url href="http://www.freshmeat.net"/>). There is also a mailing list,
540 you will find information about it at masqmails main site.</p>
541 </section>
543 <section name = "Bugs">
544 <p>You should report them to the mailing list.</p>
545 </section>
547 <section name = "See also">
548 <p>
549 <manref name="masqmail" section="8" href="masqmail.8.html"/>, <manref name="masqmail.route" section="5" href="masqmail.route.5.html"/>, <manref name="masqmail.get" section="5" href="masqmail.get.5.html"/>
550 </p>
551 </section>
554 <section name = "Comments">
555 <p>This man page was written using <manref name="xml2man" section="1"
556 href="http://masqmail.cx/xml2man/"/> by the same
557 author.</p>
558 </section>
560 </manpage>