Amavis:: Custom "How To" ?

Mark Martinec Mark.Martinec+amavis at ijs.si
Fri Mar 25 21:07:05 CET 2011


Sergey,

> Where I can to find info about Amavis::Custom, and any tutorials on this
> theme?

The bare-essentials documentation on Amavis::Custom is in release notes
file, search for: "custom hooks allow custom code to be called"...

A sample is provided as a file amavisd-custom.conf .

To find out what data is available about a message, some
browsing through source code is necessary, start by modules:

  Amavis::In::Connection
  Amavis::In::Message::PerRecip
  Amavis::In::Message


> For example I need to develope some module that makes additional
> spam checks,

One possibility is to do this in a checks() method of custom hooks.

If these tests are nontrivial, it may be better to add additional
antries to the @spam_scanners list. Results from all checks
listed in @spam_scanners are then added/merged by amavisd.
This is the way for example I chose to add support for CRM114
and DSPAM scanners.

> and uses additional arbitrary fields from mysql table.

Some browsing through the source would be required.
To access additional fields in users/policy tables pair,
a call to lookup_sql_field may suffice.

  Mark


More information about the amavis-users mailing list