How to Install AMAVIS-NEW on CentOS7


Amavis-new on Postfix MTA

AMaViS stands for A MAil Virus Scanner and is a server-side open-source content filter for e-mails, decoding and checking e-mails and can be considered as an interface between external content filters such as SpamAssassin, to provide protection against spam, viruses and other vulnerable malware e-mails. Amavis-new is implementet on Unixoid mail servers such as Mail Transfer Agent like Postfix.

  AMaViS was written in the Unix-Shell programming language. With the further development in 2000 it was converted to Perl, from then on as amavis-new the standard interface between Mail Transfer Agents (MTA) and content filters, compatible to Postfix and interacts with the Antivirus program ClamAV and some other virus scanner. The current amavisd-new is under the GPLv2 and BSD license and also offers the possibility of integrating SpamAssassin and other filters they call Milter.


In this post are describes the installation and configuration of amavis-new, the integration of Postfix on CentOS7 should already done. It is assumed that Postfix is ​​already setting up and basic skills for Postfix is ​​well.

First step is add EPEL repository in order to install components.

Now install the amavis-new and ClamAV utilities.

We modify the following lines in the amavisd configuration, with opening in the editor of your choice, here I use vim. if you’r not familiar with vim you can of course use nano.

If use SELinux Enforced then add the policy.

The Clamd virus scanner can be modified by using the sed stream editor, insert and run the following command lines in a terminal:

Configure the Clamd configuration file /etc/clamd.d/scan.conf as follows:

Create the log file for Clamd and assign the UserID:

Now download and update the antivirus detection database.

Now amavis-new configuration has been completed, let’s go ahead with the integration of Postfix. The content filter can be added at any place in the Postfix file by use vi /etc/postfix/

To do this, with add the interface for amavis-new at the end of the file /etc/postfix/

Now restart Postfix so that the configuration takes effect.

Start amavis-new and let it start automatically at the next boot.

Just now testing Amavisd

Finally you can test amavisd. Note. that during download and installing amavis-new, with the use of an UTM firewall able to detect and blocking them, the conclusion arise the download are prevented because of contains the virus test signature, because the EICAR test signature should not by capsulated.

To do this, will go to the path /usr/share/doc/amavisd-new-*/test-messages and execute the following line in terminal shell, so that the EICAR test files are decapsulated and unpacked:

Now send the EICAR test signature to yourself by using sendmail in a terminal shell.

The following entry should then be shown in the log file /var/log/maillog.

  If get error: reject: header To: undisclosed-recipients when trying to send the test mail with sendmail, the file sample-virus-simple.txt must be modify with a valid email entered at From: and To :.


To checking the functionality of amavis-new can provide along with the following procedure, first check the status of the daemon, with the parameter -l displaying the last lines of the log:

It should also be ensured that ports 10024 and 10025 are active LISTEN:

telnet must first be installed, the function of the amavisd and Postfix daemon can be checked interactively:

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *