|
The mail filter does not have to be run by the root user, but the user who runs the filter must have sufficient rights to the relevant files in /usr/local/bin, /usr/local/etc/mail-filter and the filter's working directory. See the Installation page for details. (See also the remarks about sockets in the table of known bugs.) A set of shell scripts are provided, which provide a convenient set of commands for stopping and starting the filter, and making a running filter re-read its configuration files. (Alternative ways of performing these actions are described in the notes at the end of this page.) If the /usr/local/bin directory is not included in the user's PATH, then /usr/local/bin/ must be prefixed to the following commands. Starting the FilterTo start the filter, type the command:% mail-filter startThis runs the mf-start script with the appropriate command-line arguments. The mf-start script checks for the existence of an old socket file (left over from a previous crash or re-boot) and deletes it if found. The script then runs the rays-filter binary (note 1). If rays-filter crashes, mf-start will re-start it after a few seconds. If rays-filter crashes more than 10 times, after running for less than 30 seconds each time, mf-start will exit. mf-start records all its actions in mail-filter.log, e.g.: 29-Jun-2000 11:19:46 : Starting rays-filter; FAIL_COUNT = 0 The following messages should appear in the system log file: rays-filter[999]: Program starting rays-filter[999]: Read 3 header names from /usr/local/src/mail-filters/header_list.conf rays-filter[999]: Read 48 strings from /usr/local/src/mail-filters/string_list.conf The Unix ps command can also be used to verify that the two processes, mf-start and rays-filter, are running: % ps -ef | grep mf-start Re-reading the Configuration FilesIf the configuration files are changed while the filter is running, the filter must be instructed to re-read the files for the changes to take effect. To do this, type the following command:% mail-filter resetThis runs the mf-reset script with the appropriate command-line argument, which determines the filter's process ID and sends it a USR1 signal (note 2). It also makes an entry in mail-filter.log as follows: 03-Jul-2000 12:35:45 : Signalling rays-filter to read configuration files The following messages should appear in the system log file: rays-filter[999]: Received SIGUSR1; reading configuration files rays-filter[999]: Read 3 header names from /usr/local/src/mail-filters/header_list.conf rays-filter[999]: Read 48 strings from /usr/local/src/mail-filters/string_list.conf Stopping the FilterTo stop the filter, type the command:% mail-filter stopThis runs the mf-stop script with the appropriate command-line arguments (note 3). This in turn carries out the following:-
The Unix ps command can be used to verify that the two processes, mf-start and rays-filter, have stopped: % ps -ef | grep mf-start
Notes
butlerra@sbu.ac.uk 08 March 2001 |