Configuration
Prev | Chapter 22. Tigase SPAM Filter | Next

## Configuration

To enable default set of SPAM filters with default settings you need to enable SessionManager processor spam-filter:

Enabling default SPAM filters.

    'sess-man () {
        'spam-filter' () {}
    }

### Changing active SPAM filters

You can configure active SPAM filters by setting enabling and disabling SPAM filters (subbeans of spam-filter processor bean).

Enabling message-same-long-body filter.

    'sess-man' () {
        'spam-filter' () {
            'message-same-long-body' () {}
        }
    }

### Sending error when packet is dropped

By default, due to nature of SPAM, you do not want to send error packet when SPAM packet is dropped as sending error back will:

- increase traffic on a server (which in rare cases may lead to overload of a XMPP server)
- notify spammer that it was not possible to delivery message

It is possible to configure spam-filter to send error back, by setting true to spam-filter return-error property:

Allow sending error.

    'sess-man () {
        'spam-filter' () {
            return-error = true
        }
    }

### Enabling logging of dropped messages

It is possible to enable logging of dropped messages by adding `spam` to comma separate list of values for `--debug` property.

    --debug=spam

Prev | Up | Next
Chapter 22. Tigase SPAM Filter | Home | Filters