# Classify / eXpurgate anti-spam
Version: 4.57-stable
Halon Classify / eXpurgate detects email-borne spam and malware in real-time,
with classification already in the first minutes after a new outbreak is launched.
It is designed to minimize the exposure of users to the high magnitude of email-borne threats
and to deliver nearly 100% protection against massive spam and virus attacks with a very low false positive rate.
Halon’s classification methodology identifies threat patterns in real-time as they are released to the Internet
within an outbreak. It can be used for incoming email filtering to protect customers or users from receiving spam.
It can also be used to enable service providers the ability to detect and block outbound spam messages,
thereby protecting their business reputation and avoid being blocklisted by other servers.
For more information, please see the [Features](#features) section.
This is the documentation for the Classify / eXpurgate anti-spam add-on option.
The package consists of one service called *expurgate-spamd* which can be used to scan messages for spam.
## Table of contents
* [Features](#features)
* [Anti-spam detection](#features:anti-spam-detection)
* [Virus outbreak detection](#features:virus-outbreak-detection)
* [Solution components](#features:solution-components)
* [Halon datacenters](#features:halon-datacenters)
* [eXcached deamon](#features:excached-deamon)
* [eXpurgate deamon](#features:expurgate-deamon)
* [Halon module](#features:halon-module)
* [Installation](#install)
* [Prerequisites](#install:prerequisites)
* [Distributions](#install:distributions)
* [Ubuntu](#install:ubuntu)
* [RHEL](#install:rhel)
* [Startup](#install:startup)
* [Docker & K8s](#install:docker-k8s)
* [Upgrade](#upgrade)
* [Configuration](#config)
* [General directives](#config:general-directives)
* [Spamd directives](#config:spamd-directives)
* [SpamEngine directives](#config:spamengine-directives)
* [Integration](#integration)
# Features
Halon eXpurgate detects email-borne spam and malware in real-time,
with classification already in the first minutes after a new outbreak is launched.
It is designed to minimize the exposure of users to the high magnitude of email-borne threats
and to deliver nearly 100% protection against massive spam and virus attacks with a very low false positive rate.
Halon’s classification methodology identifies threat patterns in real-time as they are released to the Internet
within an outbreak. It can be used for incoming email filtering to protect customers or users from receiving spam.
It can also be used to enable service providers the ability to detect and block outbound spam messages,
thereby protecting their business reputation and avoid being blocklisted by other servers.
## Anti-spam detection
While most anti-spam solutions rely on a form of lexical analysis, Halon offers detection services that are
content-agnostic and therefore able to detect spam in all languages, message formats and encoding
(single byte and double byte), even in messages containing only images.
It analyzes messages and returns accurate spam classifications to Halon Protect to apply an action
(such as reject with a notification to the sender, quarantine for second opinion or delayed decision, etc.).
Halon identifies message patterns (similarity codes) in spam attacks as they emerge on the Internet.
Any message containing one or more of these unique patterns can be assumed with a great deal of certainty to be
part of the same mass-mailing and Halon distinguishes solicited from unsolicited bulk emails patterns.
## Virus outbreak detection
In the case of email-borne malware outbreaks or new instances of already-known viruses, Halon delivers
zero-hour virus protection detecting if and when new unknown viruses and worms have infiltrated through
the defenses of existing signature-based or heuristics/sandboxing-based antivirus scanners.
It protects during the first critical hours of the outbreak before new signatures or heuristics rules
have been prepared and distributed by the anti-virus vendors to their customers.
## Solution components
The solution involves the following components:
* Halon datacenters
* eXcached deamon
* eXpurgate daemon
* Halon module
### Halon datacenters
The datacenter monitors global email traffic in real-time (24/7) from various sources on an ongoing
basis and maintains a vast database of classifications that are determined based on numerous
dynamically changing parameters. The datacenters are operated in Germany.
### eXcached deamon
The eXcached deamon is an optional component that runs at the client’s premises, and maintains a full
copy of the entire Halon spam outbreak signature database. It increases performance and resillience,
while minimizing the amount of communication to the central Halon datacenters.
### eXpurgate deamon
The eXpurgate daemon (expurgate-spamd) is the main component, scanning email to determining the
spam and/or virus outbreak detection classifications. Halon Protect connects to the eXpurgate deamon(s)
which in turn connects to eXcached daemon(s) or the Halon datacenter directly.
It is provided as a Linux package for Ubuntu or RHEL-compatible distributions (.deb or .rpm)
via a software repository provided to customers.
Halon also provides a Docker template and Kubernetes sample configurations.
Please see [https://github.com/halon/halon-docker](https://github.com/halon/halon-docker) for more information.
### Halon module
Halon provides an open-source module for integration with Halon eXpurgate to provide
anti-spam and virus outbreak detection by sending queries to those daemons.
They are available pre-compiled in Halon’s software repositories,
and installed using the Linux distributions’ package managers.
Please see [https://github.com/halon-extras/eleven](https://github.com/halon-extras/eleven) for more information.
# Installation
## Prerequisites
Make sure you have followed the [instructions](https://docs.halon.io/manual/comp_install.html#installation) in our manual to add our package repository.
## Distributions
### Ubuntu
To install the .deb package use the following commands.
```console
# apt-get update
# apt-get install expurgate-spamd
```
### RHEL
To install the .rpm package use the following commands.
```console
# yum install expurgate-spamd
```
## Startup
When the initial [configuration](#config) is in place, the program can be started with:
```console
# systemctl start expurgate-spamd
```
## Docker & K8s
For instructions on how to build a container image of the program as well as deploying it on K8s (Kubernetes),
see our [halon-docker](https://github.com/halon/halon-docker) GitHub repository.
# Upgrade
In order to upgrade the package, install the new package over the previous installed one (see the installation chapter).
After the upgrade the service needs to be manually restarted.
# Configuration
*expurgate-spamd* loads the non-reloadable configuration from `/etc/expurgate-spamd/expurgate-spamd.conf`.
Below are some of the most important settings that can be configured.
## General directives
### LicenseFile
The filename of the license key (provided by us). In the default configuration this is set to `/etc/expurgate-spamd/client.key`.
## Spamd directives
### ListenAddress
The IP address and port to listen on. In the default configuration this is set to `127.0.0.1:783`.
> **Warning**
>
> If you have installed SpamAssassin on the same server the default port of these two services will conflict with each other.
### DataTimeout
Indicates the number of seconds it will wait for its client before timing out. In the default configuration this is set to `300`.
### MaxConnections
The maximum number of concurrent clients. In the default configuration this is set to `1000`.
## SpamEngine directives
### Server
The hostname and port of an Exdb server. In the default configuration the default is:
```default
Server exa.expurgate.net:55555 prio 0
Server exb.expurgate.net:55555 prio 0
Server exa.expurgate.de:55555 prio 1
Server exb.expurgate.de:55555 prio 1
```
### ScanTimeout
Fail scan requests exceeding the specified limit. In the default configuration the default is `0` (unlimited).
### DangerousExtensions
The list of dangerous file extensions. In the default configuration the default is:
```default
ade, adp, app, asp, bas, bat, bhx, cab, ceo, chm, cmd,
com, cpl, crt, csr, der, dotm, exe, fxp, hlp, hta, inf,
ins, isp, its, js, jse, lnk, mad, maf, mag, mam, mar,
mas, mat, mde, mim, msc, msi, msp, mst, ole, pcd, pif,
potm, ppsm, pptm, reg, scr, sct, shb, shs, url, vb, vbe,
vbmacros, vbs, vsw, wmd, wmz, ws, wsc, wsf, wsh, xla,
xlam, xltm, xxe
```
# Integration
In order to integrate this program with our MTA, see our client library [here](https://github.com/halon-extras/eleven).