How to enable anti-spam filtering in AXIGEN using the milter implementation of Avira MailGate

Article updated on 30 March, 2007

Description

How to enable anti-spam filtering in AXIGEN using the milter implementation of Avira MailGate

Resolution

1. Configuring the Avira MailGate product


Note that the Avira MailGate application must have enabled the support for the Spam filtering module. To verify that this prerequisite is fulfiled, issue the following command:
antivir --version Check the existence of the following line in the output:
product:          Avira AntiSpam and Outbreak DetectionIn the process of spam filtering, it is necessary for the Avira MailGate application to connect to an external spam database. The port address used for the destination server is 55555 and it must be enabled.

The location for the Avira MailGate configuration file is /etc/avmailgate.conf. All the parameters that affect the entire filtering process can be found here. The description of all these parameters is beyond the scope of this article, for this you should read the documentation that was delivered with the product.

As a default setting in the configuration file, the application will bind to all active interfaces on port 25. We want to change this behavior and set MailGate to run in milter mode.

In order to make the changes search for the line containing the ListenAddress parameter.

The format of this parameter can take two forms enabling you to choose between an unix socket and an inet socket. In our example we will use the implementation of an inet socket

- for the inet address, the ListenAddress address parameter takes the following format:
ListenAddress inet:port@{hostname|ip-address}
An example of an inet example which will set the MailGate application to bind on port 3333 on the localhost (127.0.0.1):

ListenAddress inet:3333@localhost
To activate the spam filtering module, at the Spam filter section found in the Avira MailGate configuration file set:

EnableSpamCheck YES
Other options such as the spam header name to be inserted in the processed e-mails detailing the status for each message, actions to be implemented for e-mails detected as spam, can be implemented as necessary.

Save the changes made to the configuration file.

Next, start the application by issuing:

avmailgate start
Details on the initialization process can be found in the systme log file. Also, to check if the application properly binds to the selected socket defined for the milter implementation:

netstat -tlpn | grep avmailgate
For the example:
tcp        0      0 127.0.0.1:3333          0.0.0.0:*               LISTEN     3340/avmailgate.bin

2. Configuring the AXIGEN Filtering Module


In the aximilter configuration file /etc/opt/axigen/aximilter.conf set the address for accessing avmailgate.

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"
Locate and modify the milterIp and milterPort parameters to match the ones defined for avmailgate

milterIp "127.0.0.1"
milterPort 3333

Save the configuration 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 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