meillo@0: Different methods for online detection meillo@0: -------------------------------------- meillo@0: meillo@0: /etc/ppp/peers/ meillo@0: ------------------------- meillo@0: meillo@0: The scripts /etc/ppp/ip-{up,down}.d/{1,99}masqmail make use of the variable meillo@8: $IPPARAM, which you can define in your /etc/ppp/peers/ meillo@0: configuration with the ippparam option, eg: meillo@0: meillo@0: ippparam arcor meillo@0: meillo@0: If this is set, $IPPARAM will be written to a 'route' file. Using some meillo@0: awk magic, the scripts finds out which file you have defined for meillo@0: online detection (if online_detect=file) and writes the value of meillo@25: $IPPARAM to this file. Masqmail then uses this file to determine its meillo@0: online status. meillo@0: meillo@0: meillo@0: /etc/network/interfaces meillo@0: ----------------------- meillo@0: meillo@25: You can use the /etc/network/interfaces script to tell Masqmail meillo@25: when a link goes up, and Masqmail shall flush its queue and/or fetch mail. meillo@0: meillo@0: This is an example for a static interface: meillo@0: meillo@0: iface eth0 inet static meillo@0: # mroute/name used by ip-up.d/masqmail BDL May02 meillo@0: name SNRC meillo@0: address 130.130.10.233 meillo@0: netmask 255.255.255.0 meillo@0: gateway 130.130.10.254 meillo@0: meillo@0: (This example is from Ben Low. Thanks, Ben :-)) meillo@0: meillo@25: If you use Masqmail on a notebook, you can define several interfaces, meillo@0: depending on the network you are in. Read meillo@0: /usr/share/doc/ifupdown/examples/interfaces.gz meillo@0: for examples. meillo@0: meillo@0: The scripts /etc/network/if-{up,down}.d/1masqmail make use of the NAME meillo@0: in the same way as the /etc/ppp/ip-{up,down}.d/ scripts. See above. meillo@0: meillo@0: meillo@0: guessnet and /etc/network/interfaces meillo@0: ------------------------------------ meillo@0: meillo@0: Another nice tool is guessnet. See /usr/share/doc/guessnet/README.gz, meillo@0: if you have guessnet installed. You can use it in combination with the meillo@0: method described above for /etc/network/interfaces. meillo@0: meillo@0: meillo@0: guessnet and the 'online_pipe' option meillo@0: ------------------------------------- meillo@0: meillo@0: Alternatively you can also use guessnet directly to check the online meillo@0: status. To do this, set in meillo@0: /etc/masqmail/masqmail.conf meillo@0: meillo@0: # meillo@0: online_detect=pipe meillo@0: online_pipe="/usr/bin/guessnet < /etc/masqmail/guessnet.conf" meillo@0: # meillo@0: meillo@0: and create a file meillo@0: /etc/masqmail/guessnet.conf meillo@0: meillo@0: Example: meillo@0: 192.168.0.35 00:10:5A:24:C5:B6 192.168.0.1 default meillo@0: 192.168.2.1 00:80:AD:97:D5:2D 192.168.0.1 home meillo@0: meillo@0: meillo@0: masqdialer and the 'online_pipe' option meillo@0: --------------------------------------- meillo@0: meillo@0: Yet another possibility for ppp dialups is masqdialer: meillo@0: meillo@0: Example: meillo@0: # meillo@0: online_detect=pipe meillo@0: online_pipe="/usr/bin/mservdetect 192.168.1.2 224" meillo@0: # meillo@0: meillo@0: This is useful if you have a gateway with masqdialer running meillo@25: and Masqmail on another host behind ('behind' as seen from the internet) meillo@0: meillo@0: Note: meillo@0: The online detect method 'mserver' is deprecated, and this debian meillo@0: package comes with that option disabled. You can still recompile the meillo@0: package with the ./configure option --enable-mserver, but this may be meillo@25: removed in future version of Masqmail.