AMaViS


AMaViS is a mail virus scanner. It interfaces Exim with SpamAssassin and FSAV.

Additional Resources:

Note: This chapter only installs AMaViS. We will configure Exim, the MTA, to use AMaViS as a transport in a subsequent chapter.

Note: It would be preferable to use amavisd, but as of this writing the amavisd-new-milter package is broken.


  1. Login as the root user.
    [screenshot]

  2. Update the package list.

    # apt-get update

  3. Install packages that are suggested by the amavisd-new package.

    # apt-get install arj cpio lha lzop nomarch unrar zoo
    [screenshot]

  4. Install the amavis-ng package.

    # apt-get install --target-release testing amavis-ng

    The amavis-ng package depends on the libnet-perl package, which will ask several questions. Accept the defaults for all libnet-perl questions:

    1. [screenshot] Do you have any default SNPP hosts? [empty]
    2. [screenshot] Do you have any default POP3 hosts? pop
    3. [screenshot] Do you have any default SMTP hosts? mailhost
    4. [screenshot] Do you have any default PH hosts? [empty]
    5. [screenshot] Do you have any default daytime hosts? [empty]
    6. [screenshot] Do you have any default time hosts? [empty]
    7. [screenshot] What is your domain? [empty]
    8. [screenshot] What is the name of your FTP proxy firewall? [empty]
    9. [screenshot] Should all FTP connections outside your network be passive move? No
    10. [screenshot] Should all FTP connections regardless of destination be passive mode? No

  5. Create (or copy) the /etc/amavis-ng/amavis.conf file.

    The file reads as follows:
    [amavis.conf]

  6. Test amavis with a sample message.

    # zcat /usr/share/doc/spamassassin/sample-nonspam.txt.gz | amavis root@bfree.on.ca dajhorn@bfree.on.ca
    [screenshot]

    The first argument to amavis is the sender, and all subsequent arguments are recipients.

    Note: Perl may print a deprecation warning. This is safe to ignore.

  7. Verify that the sample message was scanned and delivered.

    # less /home/BFREE.ON.CA/dajhorn/Maildir/new/1060883164.718.vmwoody
    [screenshot]

    AMaViS is working properly if this line exists in the message headers:
    X-Scanned-By: AMaViS-ng

    (This is the 7th line in the screenshot.)

    Note: The actual file name will be different on your computer. Instead of reading the message with less, you can download it with your favorite mail reader.

    Note: AMaViS events are be recorded in the /var/log/mail.log file.