How to enable anti-spam filtering in AXIGEN using the milter implementation of Kaspersky Anti-Spam

Article updated on 30 March, 2007

Description

How to enable anti-spam filtering in AXIGEN using the milter implementation of Kaspersky Anti-Spam

Resolution

1. Configuring the Kaspersky Anti-Spam product


After the installation of Kaspersky Anti-Spam some modifications in the default configuration file might be necessary depending on the setup you wish to achieve. The location of this file is:
/usr/local/ap-mailfilter3/etc/filter.conf

 At the kas-milter specific configuration parameters section you can set the milter implementation to run as an unix or an inet socket.

The default setting for the kas-milter process is is to run as an unix socket and can be identified in the configuration file by the following line:

SendMailAddress unix:/var/run/kas-milter.socket

 It is recommended to run the milter implementation as an inet socket as this setup will avoid the permissions issues that may arise with the local socket implementation.

From the configuration file you should comment out the above line and add a TCP address in the following format:

#SendMailAddress unix:/var/run/kas-milter.socket
SendMailAddress tcp:127.0.0.1:2278

 In this example the filter will bind to the loopback IP address 127.0.0.1 on port 2278 instead of the predefined unix socket. These values can be changed to ones that are needed. You will have to ensure that the respective IP address is a valid one and that the port you wish to set is not already in use by another process. Save the current configuration file for the new settings to take effect when starting the application.

Starting the anti-spam application is done by issuing as root:

/etc/init.d/kas3 start
/etc/init.d/kas3-milter start

To check if the kas-milter process binds to the proper socket:

netstat -tlpn | grep kas-milter

In the case of the inet socket defined in our example, the output should be something along the lines:

tcp        0      0 127.0.0.1:2278          0.0.0.0:*               LISTEN     6061/kas-milter

2. Configuring the AXIGEN Filtering Module


Now it's time to modify the aximilter configuration file in order to reflect the address of this anti-spam filter.

In the aximilter configuration file /etc/opt/axigen/aximilter.conf it's needed to set the parameters that identify the milter socket address.

Make sure that in the aximilter configuration file the line milterSocket is commented as this will take precedence if both unix and inet sockets are defined:
# milterSocket "/var/opt/axigen/filters/milter.socket"
Next set the IP address and respective port for the kas-milter implementation.

In our example we would have the following to parameters:
milterIp "127.0.0.1"
milterPort 2278
Save the changes and start aximilter:
/etc/init.d/aximilter start

3. Activating the filter in AXIGEN



To activate the aximilter filter at the "Server" context  click the "Filters" tab. Go to the "Active Filters" tab and click the "Add new filter" button. Set the priority of the filter according to your particular needs (for more information about the priority consult the manual). Make sure you select "Socket" as filter type and then in the list above the "aximilter" you have created earlier.
Next click the "Add" button to activate the filter and "Commit" to make the new settings take effect. To make the new changes permanent you should click Commands -> Save config.

Note that there is no need to restart Axigen for the filter to load. It will be used direcly.

Applies to

Releases: Filtering Module 1.1.X, Mail Server 2.0.X, Mail Server 3.0.X
OS: Linux, Windows, FreeBSD, MAC, OpenBSD, NetBSD, Solaris
Distros: RPM based distros, RPM based distros with gcc4, Slackware, Debian, Ubuntu, Gentoo, FreeBSD 5.4, NetBSD 3.0, OpenBSD 3.8, MAC, Windows, OpenBSD 3.9, Solaris 10 x86, FreeBSD 6.1


Rate this article

1
2
3
4
5
(Best)

Comments

Enter your name: *
Your email address: *
Comments: *
Enter the code below:
  captcha
Fields marked with * are required