User Tools

Site Tools


mdx_filters

This is an old revision of the document!


Overview

Filters are normally edited in the user interface, in the window that appears when the File→Filters command is run.

A filter can apply to incoming or outgoing mail or both. Applying a filter consists of evaluating is expression, and the result is true, doing the actions that are associated to it. If a filter has no action, it can be considered inactive.

Expressions syntax

The expressions can be arbitrarily complex, with subparts combined with NOT, OR, AND boolean operators, references to other expressions, calls to built-in functions and evaluation of built-in operators. An expression may be named and refered to by this name from another expression.

expr := expr op expr
expr := (expr)
expr := NOT expr
op := OR | AND | contain[s] | eq[uals] | regmatches | ne
expr:= function(expr)

Functions

As of 0.9.11, built-in functions are:

  • rawheader(string name): returns the non-decoded form of the first occurrence of the header line name
  • header(string name): returns the decoded form of the first occurrence of the header line name
  • headers(): returns the entire headers of the message
  • rawheaders(): returns the entire non-decoded headers of the message
  • recipients(): returns all recipients (To, Cc, Bcc) separated by commas
  • body(): returns the text body of the message
  • mailbox(): returns the name of the mailbox to which the message belongs

Examples

mdx_filters.1227796355.txt.gz · Last modified: 2008/11/27 14:32 by daniel