All the installation process must be performed while logged-in as the ‘root’ user.
1. Download and unpack amavis:
3. Modify the amavis configuration
Locate the following variables and modify them as below:
Note: the ‘D_BOUNCE’ option is not supported by Axigen.
Locate the following configuration variable and enable it by removing the leading hash (#):
Under the line:
In order to install the desired antivirus, the procedure described in the user’s manual should be followed.
For the Kaspersky Kav4Mailservers, the following additional steps should be taken:
A filter must be defined in order to instruct AXIGEN to send email messages to Amavis for scanning.
2. Activate the Amavis filter
3. Save configuration changes
Antivirus
Follow the procedure in the specific antivirus manual to start the service. Normally, the antivirus is automatically started after installation.
Amavis
Run the following command:
AXIGEN
The AXIGEN Mail Server is started with the command:
Testing the solution
1. Download and unpack amavis:
- Create temporary directory:
# mkdir /tmp/amavis/
- Go to the temporary directory
# cd /tmp/amavis/
- Download amavisd-new version 2.4.2:
# wget http://www.ijs.si/software/amavisd/amavisd-new-2.4.2.tar.gz
- Unpack the archive:
# tar -zxf amavisd-new-2.4.2.tar.gz
2. Set-up the Amavis environment
- Create a working dir for Amavis:
# mkdir /var/amavis /var/amavis/tmp /var/amavis/var /var/amavis/home
- Set permission for the Amavis working dirs:
# chown -R axigen:axigen /var/amavis
# chmod -R 750 /var/amavis
- Copy the amavisd binary to its new location:
# cp /tmp/amavis/amavisd-new-2.4.2/amavisd /usr/local/sbin/
- Set the ownership and permissions for /amavisd:
# chown root /usr/local/sbin/amavisd
# chmod 755 /usr/local/sbin/amavisd
- Copy the default config file to: /etc/amavisd.conf:
# cp /tmp/amavis/amavisd-new-2.4.2/amavisd.conf /etc/amavisd.conf
- Set the ownership and permissions for /etc/amavisd.conf:
# chown root /etc/amavisd.conf
# chmod 644 /etc/amavisd.conf
- Create the quarantine folder: /var/virusmails
# mkdir /var/virusmails
- Set the ownership and permissions for the quarantine directory:
# chown axigen:axigen /var/virusmails
# chmod 750 /var/virusmails
- Copy the amavis package contents to /usr/share/
# mkdir /usr/share/
# cp -Rp /tmp/amavis/amavisd-new-2.4.2 /usr/share/
3. Modify the amavis configuration
Locate the following variables and modify them as below:
$daemon_user = 'axigen';Please remember to uncomment (remove the leading hash ‘#’) the ‘final_*_destiny’ configuration variables before setting them to the values specified above.
$daemon_group = 'axigen';
$TEMPBASE = "/var/opt/axigen/queue";
$enable_db = 0;
$enable_global_cache = 0;
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_bad_header_destiny = D_PASS;
Note: the ‘D_BOUNCE’ option is not supported by Axigen.
Locate the following configuration variable and enable it by removing the leading hash (#):
@bypass_spam_checks_maps = (1);Locate the following configuration variable and enable it by removing the leading hash (#):
$myhostname = 'host.example.com';Replace ‘host.example.com’ with your specific hostname.
Under the line:
$policy_bank{'AM.PDP-SOCK'} = { protocol=>'AM.PDP' };
insert:$protocol='AM.PDP';Under the line:
$virus_admin = "virusalert@$mydomain";insert:
undef $virus_admin;
Antivirus configuration
In order to install the desired antivirus, the procedure described in the user’s manual should be followed.
For the Kaspersky Kav4Mailservers, the following additional steps should be taken:
- Change the ownership on the Kaspersky directory
# chown -R axigen:axigen /opt/kav/
- In the Amavis configuration file (/etc/amavisd.conf) modify the path to Kav4Mailservers
- Look for the ‘kav4mailservers’ section
- Change '/opt/kav/bin/aveclient' to '/opt/kav/5.5/kav4mailservers/bin/aveclient'
AXIGEN configuration
A filter must be defined in order to instruct AXIGEN to send email messages to Amavis for scanning.
- Log into Webadmin using the "admin" account;
- Go to the ‘Server’ section;
- Click on the "Filters" page.
- Select the "AV/AS Filters" sub-page.
- Click the "Add new filter" button.
- Fill-in the following filter parameters:
name: amavis
address: inet://127.0.0.1:10024
protocolFile: /var/opt/axigen/filters/amavis.afsl
idleTimeout: 60
actionOnMatch: reject
maxConnections: 10
- Click the "Add" button.
- Click the "Commit" button.
2. Activate the Amavis filter
- Select the "Filters" tab again and
- Click the "Add new filter"
- Fill-in the following parameters:
priority: 100 or below,
filter type: "Socket"
filter name: "Amavis"
apply on relay: "no".
- Click the "Add" button
- Click the "Commit" button
3. Save configuration changes
Go to the "Commands" section
Click the "Save config" button.
Starting-up
Antivirus
Follow the procedure in the specific antivirus manual to start the service. Normally, the antivirus is automatically started after installation.
Amavis
Run the following command:
# amavisd start
AXIGEN
The AXIGEN Mail Server is started with the command:
# /etc/init.d/axigen start
Testing the solution
- Create a test user (or use an existing one) and logon using the Webmail interface. Alternatively you can use an email client such as Outlook or Thunderbird.
- Compose an e-mail and send it to the inbox of the same user.
- Compose another email and attach the EICAR test file (download from here).
- You should not receive the second e-mail. The EICAR test file is a 'fake virus' created as a general test to see if your antivirus software is working correctly. This is NOT a live virus.











