# An example YAML filters file

# comments start with a '#' (hash) sign and continue to the end of the
# line

# This YAML file consists of a recursive collection of YAML dictionaries
# and lists.

# Each member of a **YAML dictionary** MUST be a *key*, *value* pair
# separated by a ':' (colon). Keys MUST not contain spaces nor any
# non-alpha-numeric characters *other than* '.', '_', or '-'. Keys MUST
# also start with a alphabetical character. Values can be either a string,
# number, dictionary or list.

# Each member of a **YAML list** MUST begin with a '-' (dash) indented by
# two spaces from its enclosing YAML keyword. The contents of a list item
# can be either a string, number, dictionary or list.

###########################################################################

# The 'active' keyword allows you to turn this email filter on or off (yes
# or no | true or false | on or off | 1 or 0)
active: yes

# The 'name' keyword provides a name for this set of filters
name: any name you like

# The 'period' keyword indicates the frequency with which this filter will
# be run: 'daily', 'weekly', or 'monthly'.
period: daily

# The 'filters' keyword provides the base structure of a dictionary of
# filters to be run together. Each filter consists of its own collection
# of keywords which define the parts of a given filter. These filters will
# be run in alphabetical order.
filters:

  # An example filter which consists of a keyword and a dictionary
  # descrbing the filter.
  clear-inbox:

    # The 'mailbox' keyword indicates the mailbox to be filtered
    mailbox: INBOX

    # The 'select' keyword denotes a recursive collection of YAML
    # dictionaries and lists, which together determine which emails from
    # the given mailbox will be selected for the specified actions (see
    # below).
    select:

      # Each search term consists of a single (string) [RFC3501 search
      # command](https://datatracker.ietf.org/doc/html/rfc3501.html#section-6.4.4).
      # Note that sequences of text with spaces MUST be enclosed in '"'
      # (double quotes).

      # In addition, the 'anyof' or 'allof' keywords can be recursively
      # used to indicate *lists* of search comands for which, if ANY or
      # ALL (respectively) match a given eamil, this email will be acted
      # upon.

      anyof:
        - subject [FOM]
        - subject [LuaTeX]
        - from root

      allof:
        - 
        -

    # The 'actions' keyword provides an *ordered* list of actions to be
    # performed on each selected email.
    
    # Each action consists of one of the keywords:
    #  - 'sendTo'   -- to send this email to a different email address (user@domain)
    #  - 'copyTo'   -- to copy this email to a different mailbox
    #  - 'moveTo'   -- to move this email to a different mailbox
    #  - 'delete'   -- to **permanently** delete this email.
    #  - 'printId'  -- to print the email's ID, subject, to and from headers.
    
    actions:
      - sendTo user@domain
      - copyTo mailbox
      - moveTo mailbox
      - delete 
      - printID

