AntispamState

Encapsulates a multi-stage filter state.

This class is the typical entry point for users of the library.

Members

Aliases

FilterFactory
alias FilterFactory = SpamFilter function() @(safe)
Undocumented in source.

Functions

addFilter
void addFilter(string filter, Json settings)

Appends a filter to the filter chain.

classify
void classify(AntispamMessage message, bool is_spam)

Feeds a message to all self-learning filters to adjust the classification criteria.

declassify
void declassify(AntispamMessage message, bool is_spam)

Removes the effects of a previously classified message from all left-learning filters.

determineAsyncStatus
SpamAction determineAsyncStatus(AntispamMessage message, SpamAction immediate_status)

Determines the asynchronous spam status of a message.

determineImmediateStatus
SpamAction determineImmediateStatus(AntispamMessage message)

Determines the immediate spam status of a message.

getConfig
Json getConfig()

Returns a JSON configuration object encapsulating the full filter chain.

loadConfig
void loadConfig(Json config)

Loads a JSON configuration object as output by getConfig.

resetClassification
void resetClassification()

Resets the learned classficitaion criteria for all self-learning filters in the chain.

Static functions

registerFilter
void registerFilter(string filter, FilterFactory factory)

Registers a new filter type.

Meta