User Guide

Chapter 6 95
The kas-exim module is used as an alternative solution. For a standard
installation, integration with Exim is implemented using the kas-pipe client
module. In contrast to kas-pipe, the kas-exim module does not require that the
second copy of the mail server be started for transmitting mail messages.
To use localscan API, you should recompile Exim. Therefore, the kas-exim
module is shipped as a source code written in C and it should be manually
installed.
To recompile the Exim mail server with the integrated kas-exim module,
do the following:
1. Save the kas_exim.c file located at /usr/local/ap-mailfilter3/src/ to
the Local directory in the tree of Exim source files.
2. Modify the Makefile file in the Local directory as follows:
CFLAGS= -I/usr/local/ap-mailfilter3/include
EXTRALIBS_EXIM=-L/usr/local/ap-mailfilter3/lib
-lspamtest
LOCAL_SCAN_SOURCE=Local/kas_exim.c
LOCAL_SCAN_HAS_OPTIONS=yes
3. Compile Exim.
All values required for the kas-exim operation are specified in the Exim
configuration file, not in filter.conf.
The example below is a fragment of the Exim configuration file that contains
options for the kas-exim module:
begin local_scan
kas_connect_to = tcp:127.0.0.1:2277
kas_connect_timeout = 40
kas_data_timeout = 30
kas_default_domain = localhost
kas_filtering_size_limit = 500
kas_on_error=accept
kas_log_level=3
This fragment contains the following options:
kas_connect_to – address of the socket for interacting with the filtering
server. The address format is tcp:<host>:<port>, where <host> is the
IP-address of the filtering server, <port> is a port specifying the network
socket; the record in the format unix:<path_to_file>, where
<path_to_file> is the path to the socket file (specifies a local socket).