Auto_Action

[As of version 0.9.4, this table is obsoleted by the new filtering system]

Contains the tests that are carried against each incoming message to apply automatic actions such as tagging, trashing, or discarding.

> Columns

> Examples

Discard any message whose X-Spam-Status header starts with 'Yes' (this header is added by SpamAssassin):

INSERT INTO auto_action(action_type,field,value,match_type,tag_id)
VALUES(1, 'header:X-Spam-Status', '^Yes', 2, null);

Assign the 'xfree86' tag to the incoming messages that have a 'Sender' header set to 'owner-xpert@XFree86.Org' (case insensitive)

INSERT INTO auto_action(action_type,field,value,match_type,tag_id)
 SELECT 3, 'header:Sender', 'owner-xpert@XFree86.Org', 3, tag_id
  FROM tags WHERE name='xfree86';

Assign the 'cvs' tag to the incoming messages whose subject contains the substring [cvs]. Note the double-quoting in the sql sentence: the [ character is preceded by a backslash to avoid being taken as a regular expression token, and the backslash itself is doubled for the psql interpreter.

INSERT INTO auto_action(action_type, field, value, match_type, tag_id)
 SELECT 2, 'header:Subject', '\\[cvs\\]', 3, tag_id
  FROM tags WHERE name='cvs';