<?xml version="1.0"?>
<filterdescription>
<ruleset type="match">
<rule name="from-address">
  <code>
   (match-all (header-contains "From" ${sender}))
  </code>
  <description lang="en">The From address matches <source type="address" name="sender">sender(s)</source>.</description>
</rule>

<rule name="to-address">
  <code>
   (match-all (header-contains "To" ${receipient}))
  </code>
  <description lang="en">The To address matches <source type="address" name="receipient">receipients</source>.</description>
</rule>

<rule name="cc-address">
  <code>
    (match-all (header-contains "CC" ${self-email}))
  </code>
  <description lang="en">I am in the cc list.</description>
</rule>

<rule name="msg-size">
  <code>
   (&amp; (&gt; message-size (size-lower size-range))
      (&lt; message-size (size-uppwer size-range)))
  </code>
  <description lang="en">The message is a <source type="size-range" name="size">certain size</source>.</description>
</rule>
</ruleset>

<ruleset type="action">
<rule name="copy-me">
  <code>
    (copy-to ${folder})
  </code>
  <description language="en">Send a copy to <source type="folder" name="folder">folder</source>.</description>
</rule>
<rule name="forward">
  <code>
    (forward-to ${address})
  </code>
  <description language="en">Forward the message to <source type="address" name="address">people</source>.</description>
</rule>
<rule name="delete">
  <code>
    (delete)
  </code>
  <description language="en">Delete message.</description>
</rule>
<rule name="stop">
  <code>
    (stop)
  </code>
  <description language="en">Stop processing further rules for this message.</description>
</rule>
</ruleset>

<ruleset type="except">
<rule name="except-me">
  <code>
    (match-all (not (header-contains "To" "zucchi@zedzone")))
  </code>
  <description language="en">When I am the receipient.</description>
</rule>
</ruleset>

<optionset>
  <option type="receive">
    <description language="en">When a message arrives.</description>
  </option>
  <option type="send">
    <description language="en">When a message is sent.</description>
  </option>
  <option type="receive">
    <description language="en">Copy incoming messages from a certain address to specific folder.</description>
    <optionrule type="match" rule="from-address"/>
    <optionrule type="action" rule="copy-me"/>
  </option>
  <option type="send">
    <description language="en">Copy sent messages to a specific folder.</description>
    <optionrule type="action" rule="copy-me"/>
  </option>
  <option type="send">
    <description language="en">Copy messages to me and others to a specific folder.</description>
    <optionrule type="match" rule="from-address">
      <optionvalue name="sender">
        <address name="zucchi" email="zucchi@zedzone"/>
        <address name="foo" email="bar"/>
      </optionvalue>
    </optionrule>
    <optionrule type="match" rule="to-address"/>
    <optionrule type="match" rule="cc-address"/>
    <optionrule type="action" rule="copy-me"/>
  </option>
</optionset>
</filterdescription>
