Mercurial > masqmail
comparison man/masqmail.conf.5 @ 310:f10a56dc7481
reworked online_detect to the simpler online_query
Only pipe is supported now. Use
online_query="/bin/cat /path/to/file"
instead of
online_detect=file
online_file=/path/to/file
and
online_query="/path/to/some/script foo"
instead of
online_detect=pipe
online_pipe="/path/to/some/script foo"
See man page masqmail.conf(5) and admin/config-transition.
author | meillo@marmaro.de |
---|---|
date | Sun, 24 Apr 2011 19:14:38 +0200 |
parents | 382e4260435d |
children | 8bf7820a0e0e |
comparison
equal
deleted
inserted
replaced
309:273f6c9eb6a2 | 310:f10a56dc7481 |
---|---|
345 whenever a message is delivered to an mda. | 345 whenever a message is delivered to an mda. |
346 You probably want this if you have set \fBmda_fromline\fR above. | 346 You probably want this if you have set \fBmda_fromline\fR above. |
347 Default is false. | 347 Default is false. |
348 | 348 |
349 .TP | 349 .TP |
350 \fBonline_detect = \fIstring\fR | 350 \fBonline_query = \fIcommand line\fR |
351 | 351 |
352 Defines the method masqmail uses to detect whether there is currently an online connection. | 352 Defines the method masqmail uses to detect whether there exists an online connection currently. |
353 It can have the values \fIfile\fR or \fIpipe\fR. | 353 |
354 | 354 Masqmail executes the command given and reads from its standard output. |
355 When it is set to \fIfile\fR, masqmail first checks for the existence of \fBonline_file\fR | 355 The command should just print a route name, as defined |
356 (see below) and if it exists, it reads it. | 356 with \fBonline_routes.\fIname\fR, to standard output and return a zero status code. |
357 The content of the file should be the name of the current connection as defined | 357 Masqmail assumes it is offline if the script returns with a non-zero status. |
358 with \fBconnect_route.\fIname\fR (trailing whitespace is removed). | 358 Leading and trailing whitespace is removed from the output. |
359 | 359 |
360 When it is set to \fIpipe\fR, masqmail calls the executable given by the | 360 Simple example: |
361 \fBonline_pipe\fR option (see below) and reads the current online status from its standard output. | 361 |
362 .nf | |
363 #!/bin/sh | |
364 test \-e /var/run/masqmail/masqmail-route || exit 1 | |
365 cat /var/run/masqmail/masqmail-route | |
366 exit 0 | |
367 .fi | |
362 | 368 |
363 No matter how masqmail detects the online status, | 369 No matter how masqmail detects the online status, |
364 only messages that are accepted at online time will be delivered using the connection. | 370 only messages that are accepted at online time will be delivered using the connection. |
365 The spool still has to be emptied with masqmail \fB\-qo\fIconnection\fR. | 371 The mail spool still needs to be emptied manually |
366 | 372 (\fB\-qo\fIconnection\fR). |
367 .TP | 373 |
368 \fBonline_file = \fIfile\fR | 374 \fIcommand line\fR must start with an absolute path to an executable program. |
369 | |
370 This is the name of the file checked for when masqmail determines whether it is online. | |
371 The file should only exist when there is currently a connection. | |
372 Create it in your ip-up script with e.g. | |
373 | |
374 echo "connection-name" >/var/run/masqmail/masqmail-route | |
375 | |
376 chmod 0644 /var/run/masqmail/masqmail-route | |
377 | |
378 Do not forget to delete it in your ip-down script. | |
379 | |
380 .TP | |
381 \fBonline_pipe = \fIfile\fR | |
382 | |
383 This is the name of the executable which will be called to determine the online status. | |
384 This executable should just print the name of the current connection to | |
385 the standard output and return a zero status code. | |
386 masqmail assumes it is offline if the script returns with a non zero status. | |
387 Simple example: | |
388 | |
389 #!/bin/sh | |
390 | |
391 [ \-e /var/run/masqmail/masqmail-route ] || exit 1 | |
392 | |
393 cat /var/run/masqmail/masqmail-route | |
394 | |
395 exit 0 | |
396 | |
397 Of course, instead of the example above you could as well use \fIfile\fR as | |
398 the online detection method, but you can do something more sophisticated. | |
399 | |
400 \fIfile\fR must contain an absolute path to an executable program. | |
401 It can contain optional arguments. | 375 It can contain optional arguments. |
402 | 376 |
403 Example: \fI/bin/echo foo\fR | 377 To simulate the old online_method=file, use: |
404 (This tells masqmail to be always online with connection `foo'.) | 378 \fI/bin/cat /path/to/file\fP |
405 | 379 |
406 For querying a masqdialer server | 380 To be always online with connection `foo', use: |
407 (= asking it whether a connection exists and what its name is) | 381 \fI/bin/echo foo\fP |
382 | |
383 To query a masqdialer server | |
384 (i.e. asking it whether a connection exists and what its name is) | |
408 use: | 385 use: |
409 | 386 \fI/usr/bin/mservdetect localhost 224\fP |
410 online_method=pipe | |
411 | |
412 online_pipe="/usr/bin/mservdetect localhost 224" | |
413 | 387 |
414 | 388 |
415 .TP | 389 .TP |
416 \fBident_trusted_nets = \fIlist\fR | 390 \fBident_trusted_nets = \fIlist\fR |
417 | 391 |