Live Chat
773 598 5800
Search Results
  • Search Results

How to enable anti-spam and anti-virus filtering in Axigen using the milter implementation of AVG for mail servers

Quick Link: http://www.axigen.com/kb/show/304
Last updated on October 21, 2009

Description

Using the AVG milter implementation for scanning messages.

Resolution

Configuring AVG for future use with Axigen via the Milter interface

NOTE: This article applies to AVG 8.5.

First of all please make sure that:
 Default.tcpd.avg.enabled
and
 Default.tcpd.smtp.enabled
are set to "false"
 # avgcfgctl -w Default.tcpd.avg.enabled="false"
 # avgcfgctl -w Default.tcpd.smtp.enabled="false"
and then enable and configure the milter interface:
 # avgcfgctl -w Default.tcpd.milter.enabled="true"
 # avgcfgctl -w Default.tcpd.milter.socket=inet:10024@localhost
which configures the milter interface to listen for connections on localhost, port 10024.

Restart AVG for the changes to take effect: # /etc/init.d/avgd restartand verify that AVG binds on the correct port:
 # netstat -ntpl | grep avg
 tcp        0      0 127.0.0.1:10024             0.0.0.0:*                   LISTEN      6305/avgtcpd

Basic operations upon AVG configuration

To check the AVG configuration run the "avgcfgctl" command with no arguments.
Check the milter configuration using the following command: # avgcfgctl | grep milterCheck some basic antispam configuration details using:
 # avgcfgctl | grep Default.tcpd.spamand basic antivirus configuration details using:
 # avgcfgctl | grep Default.tcpd.scanTo save your current configuration to a file named avg_configuration.txt run:
 # avgcfgctl -f avg_configuration.txtIn order to change a configuration variable you should use:
 # avgcfgctl -w <variable.name>="<value>"
Note: For changes to take effect you must restart AVG.

Axigen Configuration

To configure Axigen to use AVG as a filter, login as admin to the Webadmin interface and navigate to: Security & Filtering -> Acceptance & Routing -> Advanced Settings tab and define the following rules:
 
1. Rule Name: avg-define <or a suggestive name for the rule>
    Conditions:  Match any email message
    Actions: Filters - Add Filter:
                             Name: avg <or a suggestive name for the filter>
                             Address: inet://127.0.0.1:10024

 2. Rule Name: avg-execute <or a suggestive name for the rule>
    Conditions:  Match any email message
    Actions: Filters - Execute Filters - avg <or the name specified for the filter in the above rule>

Send a test message to yourself and view the Axigen log files for errors. The source of the message received should contain the following extra headers added by AVG:
 X-Antispam-Avg:
 X-Antivirus-Avg:


Enforce actions in Axigen based on the message spam status

By default if AVG identifies a message as spam or virus it will prefix the Subject header with the strings [SPAM] and [VIRUS], respectively. Based on these values you can trigger certain actions in Axigen.
For example, if you want spam messages to be delivered to Spam folder instead of Inbox you will need to define the following rule via Webadmin -> Security & Filtering -> Incoming Message Rules:
   Message rule name: <type a suggestive rule name>
   Conditions: Custom - ''X-Antispam-Avg'' - Contains - ''SPAM=YES''
   Actions: Move To - ''Spam''

You can test this rule using the GTUBE string in a message. The GTUBE string is:
   XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

In order to test the antivirus you can use EICAR test. More details regarding the EICAR, as well as test attachments are available at:
 http://www.eicar.org/anti_virus_test_file.htm

Applies to

Releases: Mail Server 7.2.X
OS: Linux, FreeBSD, OpenBSD, NetBSD, Solaris
Distros: RPM based distros, RPM based distros with gcc3, RPM based distros with gcc4, Slackware, Debian, Ubuntu, Gentoo, FreeBSD 5.4, NetBSD 3.0, OpenBSD 3.8, OpenBSD 3.9, Solaris 10 x86, FreeBSD 6.1, Mandriva Linux, DEB based distros with gcc4, Yellow Dog, Debian 3.1, FreeBSD 6.x, OpenBSD 4.1, OpenBSD 4.2, FreeBSD 7.x, FreeBSD 7.x, NetBSD, OpenBSD 4.3