<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="mail-filters-not-working" xml:lang="gl">

  <info>
    <desc>Fix problems with mail filters that do not sort and organize mail as expected.</desc>
    
    <link type="guide" xref="index#common-mail-problems"/>
    <link type="seealso" xref="mail-filters"/>

    <revision pkgversion="3.9.3" version="0.5" date="2013-06-24" status="draft"/>
    <credit type="author">
      <name its:translate="no">April Gonzales</name>
      <email its:translate="no">loonycookie@gmail.com</email>
    </credit>
    <credit type="author">
      <name its:translate="no">Andre Klapper</name>
      <email its:translate="no">ak-47@gmx.net</email>
    </credit>
    
    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>


  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Fran Dieguez</mal:name>
      <mal:email>frandieguez@gnome.org</mal:email>
      <mal:years>2009-2013.</mal:years>
    </mal:credit>
  </info>

<title>Mail filters are not working</title>

<section id="order">
<title>Order of Filters</title>
<p>The order of filters is very important. They are applied to the original message in sequence, like a recipe.</p>
<p>If your first filter has a <gui>Stop Processing</gui> rule, then all messages that match this filter will ignore all succeeding filters.</p>
<p>When you move a message to another folder, "moving" actually means appending a copy of the message to the destination folder and marking the original message for deletion. So any subsequent filter rules will be applied to the original message that is now marked for deletion. Therefore moving a message should usually appear last in a sequence of filter rules.</p>
<p>To check the rules and their order of an existing filter, review its actions in the <gui>Then</gui> section by <link xref="mail-filters#editing">editing the filter</link>.</p>
</section>

<section id="several-clients">
<title>Using Several Mail Clients</title>
<p>Another thing you have to keep in mind is that filters depend on the "new" flag that is set on the server when a particular email message is initially fetched from the server. If you use another email client aside from <app>Evolution</app>, your filters may not work automatically.</p>
</section>

<section id="filter-log">
<title>Logging Filter Actions</title>
<p>If it is still unclear why filters do not work as expected, you can enable logging filter actions.</p>
<list>
<item><p>Close <app>Evolution</app>.</p></item>
<item><p>Open the <app>Terminal</app> application.</p></item>
<item><p>Run the command <cmd>gsettings set org.gnome.evolution.mail filters-log-actions true</cmd></p></item>
<item><p>Run the command <cmd>gsettings set org.gnome.evolution.mail filters-log-file "/home/myusername/my-filter-log"</cmd> and replace <cmd>myusername</cmd> by your username. This will create a text file named <file>my-filter-log</file> in your home directory. Note that the absolute path to the file name must be entered; a syntax like <sys>~</sys> or <sys>$HOME</sys> will not work.</p></item><!-- this is explained in https://bugzilla.gnome.org/show_bug.cgi?id=669471 -->
<item><p>Start <app>Evolution</app>.</p></item>
<item><p>Fetch mail to apply filters.</p></item>
<item><p>Open the file <file>my-filter-log</file> with a text editor to see which filter actions have been applied.</p></item>
</list>

<p>Note that you can disable filter logging again by using the command <cmd>gsettings set org.gnome.evolution.mail filters-log-actions false</cmd></p>

<p>You can also use the <app>dconf-editor</app> application to do this.</p>
</section>

</page>
