masqmail
diff 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 |
line diff
1.1 --- a/man/masqmail.conf.5 Sun Apr 24 19:02:09 2011 +0200 1.2 +++ b/man/masqmail.conf.5 Sun Apr 24 19:14:38 2011 +0200 1.3 @@ -347,69 +347,43 @@ 1.4 Default is false. 1.5 1.6 .TP 1.7 -\fBonline_detect = \fIstring\fR 1.8 +\fBonline_query = \fIcommand line\fR 1.9 1.10 -Defines the method masqmail uses to detect whether there is currently an online connection. 1.11 -It can have the values \fIfile\fR or \fIpipe\fR. 1.12 +Defines the method masqmail uses to detect whether there exists an online connection currently. 1.13 1.14 -When it is set to \fIfile\fR, masqmail first checks for the existence of \fBonline_file\fR 1.15 -(see below) and if it exists, it reads it. 1.16 -The content of the file should be the name of the current connection as defined 1.17 -with \fBconnect_route.\fIname\fR (trailing whitespace is removed). 1.18 +Masqmail executes the command given and reads from its standard output. 1.19 +The command should just print a route name, as defined 1.20 +with \fBonline_routes.\fIname\fR, to standard output and return a zero status code. 1.21 +Masqmail assumes it is offline if the script returns with a non-zero status. 1.22 +Leading and trailing whitespace is removed from the output. 1.23 1.24 -When it is set to \fIpipe\fR, masqmail calls the executable given by the 1.25 -\fBonline_pipe\fR option (see below) and reads the current online status from its standard output. 1.26 +Simple example: 1.27 + 1.28 +.nf 1.29 +#!/bin/sh 1.30 +test \-e /var/run/masqmail/masqmail-route || exit 1 1.31 +cat /var/run/masqmail/masqmail-route 1.32 +exit 0 1.33 +.fi 1.34 1.35 No matter how masqmail detects the online status, 1.36 only messages that are accepted at online time will be delivered using the connection. 1.37 -The spool still has to be emptied with masqmail \fB\-qo\fIconnection\fR. 1.38 +The mail spool still needs to be emptied manually 1.39 +(\fB\-qo\fIconnection\fR). 1.40 1.41 -.TP 1.42 -\fBonline_file = \fIfile\fR 1.43 - 1.44 -This is the name of the file checked for when masqmail determines whether it is online. 1.45 -The file should only exist when there is currently a connection. 1.46 -Create it in your ip-up script with e.g. 1.47 - 1.48 -echo "connection-name" >/var/run/masqmail/masqmail-route 1.49 - 1.50 -chmod 0644 /var/run/masqmail/masqmail-route 1.51 - 1.52 -Do not forget to delete it in your ip-down script. 1.53 - 1.54 -.TP 1.55 -\fBonline_pipe = \fIfile\fR 1.56 - 1.57 -This is the name of the executable which will be called to determine the online status. 1.58 -This executable should just print the name of the current connection to 1.59 -the standard output and return a zero status code. 1.60 -masqmail assumes it is offline if the script returns with a non zero status. 1.61 -Simple example: 1.62 - 1.63 -#!/bin/sh 1.64 - 1.65 -[ \-e /var/run/masqmail/masqmail-route ] || exit 1 1.66 - 1.67 -cat /var/run/masqmail/masqmail-route 1.68 - 1.69 -exit 0 1.70 - 1.71 -Of course, instead of the example above you could as well use \fIfile\fR as 1.72 -the online detection method, but you can do something more sophisticated. 1.73 - 1.74 -\fIfile\fR must contain an absolute path to an executable program. 1.75 +\fIcommand line\fR must start with an absolute path to an executable program. 1.76 It can contain optional arguments. 1.77 1.78 -Example: \fI/bin/echo foo\fR 1.79 -(This tells masqmail to be always online with connection `foo'.) 1.80 +To simulate the old online_method=file, use: 1.81 +\fI/bin/cat /path/to/file\fP 1.82 1.83 -For querying a masqdialer server 1.84 -(= asking it whether a connection exists and what its name is) 1.85 +To be always online with connection `foo', use: 1.86 +\fI/bin/echo foo\fP 1.87 + 1.88 +To query a masqdialer server 1.89 +(i.e. asking it whether a connection exists and what its name is) 1.90 use: 1.91 - 1.92 -online_method=pipe 1.93 - 1.94 -online_pipe="/usr/bin/mservdetect localhost 224" 1.95 +\fI/usr/bin/mservdetect localhost 224\fP 1.96 1.97 1.98 .TP