Spam Filter Rules: DBQueryOne

Statement DBQueryOne
Version 6.16+
Purpose Queries the spam filter database for a single record/aggregate

The DBQueryOne statement performs a query on the spam filter database and returns a single value which is either the value of a record or an aggregate of several records.

The DBQueryOne statement requires a component name, key, operator and value, in the format

DBUpdate <component name> <type> <comparator> <keyvalue> <variable name>

Example

DBQueryOne subject last = ${Subject} dbval

This will query the database for the last record for the 'subject' component where the key equals the contents of the variable ${Subject}, and place the value into the ${dbval} variable

If the previous value was not numeric, it will be treated as if it was zero.