Ray's Mail Filter - InstallationVersion 1.04/1.14 |
![]() |
|||
On this page:- Requirements Installing the Filter |
Other pages:- Home Page Configuration Operation Utilities |
Sendmail version |
Download file | Approximate size (kB) |
8.10.* 8.11.0.Beta1 |
rays-filter-1.04.tar rays-filter-1.04.tar.gz |
150 37 |
8.11.0 |
rays-filter-1.14.tar rays-filter-1.14.tar.gz |
150 37 |
% gunzip rays-filter-1.NN.tar.gzThis should create a subdirectory called rays-filter-1.NN which contains the following files. The ones marked with "*" are required to produce a working filter:
% tar xvf rays-filter-1.NN.tar
Shell scripts * |
build mail-filter mf-reset mf-start mf-stop |
C source files * |
rays-filter.c rays-filter.h |
Configuration files * |
header_list.conf mail-filter.conf string_list.conf |
Utilities |
mf-archive mf-analyze mf-memory |
Documentation (HTML) |
rays-filter.html install.html configure.html operate.html utilities.html |
Licence & Copyright |
README GNU-public-licence.txt copyright.txt |
build |
This is just a handy script to save having to type out the whole
command line when you want to compile rays-filter.c.
Edit the following values as required:-
SRCDIR should equal the absolute path to your sendmail source directory, e.g. SRCDIR=/usr/local/src/sendmail/sendmail-8.11.0 OBJDIR should be the location, relative to SRCDIR, of the platform-specific object directory which is created when you build sendmail, e.g. OBJDIR=obj.OSF1.V4.0.alpha Depending on your operating system and/or C compiler, you may also have to modify the compiler command (e.g. gcc instead of cc) and/or some of the compiler options. See the file libmilter/README (distributed with Sendmail) for more information. |
mail-filter.conf |
The WORK_DIR variable specifies the directory that you
wish the filter to use as its working directory. This directory
must be created before the filter program is started. It will
contain the log files produced by the scripts and utilities, and
the rejects subdirectory, where the rejected messages
will be saved. E.g.:
WORK_DIR="/users/mf-user/mail-filter" The SOCKET variable specifies the socket that you want the mail filter to create and use to communicate with Sendmail. The socket can be a local file or an internet port. The way that sockets are specified varies between different versions of Sendmail. Refer to the file libmilter/README, distributed with Sendmail, for the various socket options. (See also the table of known bugs). If a local file socket is specified,the user who will run the filter must have read, write and execute access to the directory where it will reside. E.g.: SOCKET="local:/users/mf-user/mail-filter/mf-socket"
|
header-list.conf string-list.conf |
These configuration files specify the criteria by which the filter will accept or reject messages. These files can be edited at any time, even while the filter is running. See the Configuration Page for details. |
rays-filter.h |
The text part of the SMTP reply can be specified in this file if you don't want to use the default message. Other parameters can also be changed. See the comments in the file for details. |
% ./build rays-filterIf successful, this will produce a binary file, rays-filter.
rays-filterIf you wish to use the utilities, then also copy the following files:-
mail-filter
mf-reset
mf-start
mf-stop
mf-analyzeEnsure that the user who will run the filter has read and execute rights to these files. (The filter does not have to be run by root - however, see the remarks about sockets in the table of known bugs.)
mf-archive
mf-memory
header-list.confEnsure that the user who will run the filter has read and write privileges to these files.
mail-filter.conf
string-list.conf
% mkdir WORK_DIRwhere WORK_DIR is the value of the WORK_DIR variable specified in mail-filter.conf. Ensure that the user who will run the filter has read, write and execute privileges in all of these directories.
% mkdir WORK_DIR/rejects
% mkdir WORK_DIR/analysis
Xrays-filter, S=local:/users/mf-user/mail-filter/mf-socket, F=R, T=S:60s;R:60s;E:5m O InputMailFilters=rays-filterNote that the socket specification, "S=...", must match the SOCKET specified in mail-filter.conf. Please see the file distributed with Sendmail, libmilter/README, for information about the "F=..." and "T=..." parameters.
% /usr/local/bin/mail-filter start
Ray's Mail Filter Home Page
Filter Configuration
Running the Filter
Utilities