Exported Functions

The anti-spam engine library contains the following externally visible entry points:

pmx_load()
pmx_load() must be called to initialize the library. The reserved parameter is only used on UNIX and must be NULL on Windows.
pmx_unload()
pmx_unload() should be called after all PMX_ENGINE objects have been destroyed to free up any remaining resources the library may be using.
pmx_create_engine()
The pmx_create_engine() function creates an instance of the PMX_ENGINE object. It takes a PMX_ERROR_CB callback that will be invoked whenever the engine runs into problems. The level parameter should be one of the following strings: DEBUG, INFO, NOTICE, WARNING, ERR, CRIT, ALERT or EMERG. The error parameter is a freeform text description of the error condition. It is not terminated by a newline character.

Whenever the engine throws an exception, the error callback is invoked with an ALERT entry containing the exception message. The engine function then returns with an error (normally PMX_ERR_SYS).

pmx_append_to_message()
The pmx_append_to_message() function adds data to the default implementation of the PMX_MESSAGE object. It will not work with any other implementation of the PMX_MESSAGE object.

This function is not part of the pmx_message_vtbl because the engine does not modify the message object, and there is no specific paradigm that governs how the message objects should be created or updated.

pmx_append_to_message() should not be called after any member functions have been invoked on the PMX_MESSAGE object.