User Tools

Site Tools


reference:spamrules_statement_dbupdate

Spam Filter Rules: DBUpdate

Statement DBUpdate
Version 6.16+
Purpose Updates a record in the spam filter database

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

DBUpdate <component name> <key> <operator> <value>
  • If the record does not exist, then it will be created
  • <operator> may be =, +=, -=, .=, upper or lower
  • = sets the record value to the specified value
  • += adds the specified value to record value (assumed numeric)
  • -= subtracts the specified value from the record value (assumed numeric)
  • .= concatenates the specified value onto the record value
  • upper/lower sets the record value to the specified value after conversion to upper or lower case

Example

DBUpdate subject ${Subject} += 1

This will update a record for the 'subject' component with the key in the ${Subject} variable, by adding one to it. If the record does not exist, it will be created and set to '1'.

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

reference/spamrules_statement_dbupdate.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1