Coder Social home page Coder Social logo

amavis-test's Introduction

docker-mailserver-amavis

This is a Docker image for an Amavisd-new mail scanner. The project is part of the docker-mailserver project but can run separately without the other components. The image listens at one port (10024) for mails to be scanned (using SMTP protocol) and forwards messages and results after the scan back to a SMTP server (usually the originating server on port 10025).

Related images:

Tags

The following versions are available from DockerHub. The image tag matches the Amavisd-new version.

Features

  • Virus detection using ClamAV v0.103
  • Spam detection using SpamAssassin v3.4.6
  • Seamless integration in any SMTP mail chain

License

docker-mailserver-amavis is licensed under GNU LGPL 3.0. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Prerequisites

None

Usage

Environment Variables

docker-mailserver-amavis requires various environment variables to be set. The container startup will fail when the setup is incomplete.

Variable Description Default Value
AV_MYDOMAIN The first and primary mail domain of your mailserver. Amavis uses this to add headers in a mail. localdomain
AV_POSTFIX_SERVICE_NAME The hostname or IP address of the SMTP server where Amavis will deliver scanned mails and results to. 127.0.0.1
AV_POSTFIX_SERVICE_PORT The port of the SMTP server for delivering scanned mails and results. 10025
AV_VIRUSADMIN_EMAIL The global administrator to be informed about virus detection and quarantines. postmaster@AV_MYDOMAIN
AV_NOTIFY_SENDER sender envelope address, from which notification reports are sent from postmaster@AV_MYDOMAIN
AV_NOTIFY_ADMIN sender envelope address, from which notification reports are sent from postmaster@AV_MYDOMAIN

Volumes

You shall provide a data volume in order to secure your quarantine data from data loss. Map the volume to /var/virusmails folder inside the container.

Ports

docker-mailserver-amavis exposes port 10024. This is an unprotected SMTP listener port to request AntiVirus and AntiSpam scans. Attention! You need to make sure that this port is not accessible by any other host than your SMTP mail service. Otherwise it can be used for SPAM attacks.

Running the Container

The main mailserver project has examples of container configurations:

Refreshing AV signatures and Spam detection rules

Every once in a while you will need to run sa-compile and freshclamin order to refresh you virus and spam detection rules. The current images does not do this yet (see #4)

Additional customization

You can further customize Amavis, ClamAV and SpamAssassin configuration files. Please follow these instructions:

  1. Check the /usr/local/amavis/templates folder for already existing customizations.
  2. If you configuration file is not present yet, take a copy of the file from /etc/amavis, /etc/clamav or /etc/spamassassin folders.
  3. Customize your configuration file.
  4. Provide your customized file(s) back into the appropriate template folder at /usr/local/amavis/templates by using volume mappings.
  5. (Re)Start the container. If you configuration was not copied correctly then log into the container (bash is available) and delete the changed files from the corresponding /etc folders. Then restart the container.

Issues

This Docker image is mature and provides scanning for my mailserver in production. However, several issues are still unresolved:

  • #2 - DKIM support is missing
  • #3 - SPF support is missing
  • #4 - Add automatic SA and ClamAV rules refresh

Contribution

Report a bug, request an enhancement or pull request at the GitHub Issue Tracker. Make sure you have checked out the Contribution Guideline

amavis-test's People

Contributors

alpha6 avatar technicalguru avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.