#### 3.12.5 Scripting in `mda` ¶

`Mda` can use global or per-user mail filters to decide whether to deliver the message, and where to deliver it. As of Mailutils version 3.20, such mail filters may be written in the following languages:

- Sieve See Sieve Language.
- Scheme
- Python

Mail filters to use are specified using ‘`script`’ configuration statement. The following meta-symbols can be used in its argument:

~
%h

  Expands to the recipient home directory.

%u

  Expands to the recipient user name.

By default, the filename extension decides which scripting language will be used. User can alter the choice using ‘`language`’ configuration statement. For example:

    script {
      language python;
      pattern "~/.maidag-py-filter";
    }