<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Filters with no conditions</title> 
  <pubDate>Fri, 10 Apr 2026 09:50:11 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8103</link> 
  <atom:link rel="self" type="application/rss+xml" title="Filters with no conditions" href="https://bugs.horde.org/ticket/8103/rss" /> 
  <description>Filters with no conditions</description> 
 
   
   
  <item> 
   <title>Hi,



Now it is possible to create filters without any cond</title> 
   <description>Hi,



Now it is possible to create filters without any condition. With maildrop backend, it generates filters like:



##### New Rule #####

if( \

)

exception {

   to &quot;${DEFAULT}&quot;

}



And that generates a maildrop error beause of a mailfilter parsing error.



I think it makes sense to deny any rule without conditions. I attach a patch to do it.

</description> 
   <pubDate>Fri, 20 Mar 2009 11:47:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53195</link> 
  </item> 
   
  <item> 
   <title>Hasn&#039;t this been fixed with bug #5641 already?</title> 
   <description>Hasn&#039;t this been fixed with bug #5641 already?</description> 
   <pubDate>Mon, 23 Mar 2009 11:07:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53223</link> 
  </item> 
   
  <item> 
   <title>Not exactly. Update made in #5641 ensures that a defined con</title> 
   <description>Not exactly. Update made in #5641 ensures that a defined condition is not empty, but doesn&#039;t ensures that the rule has at least one condition.





</description> 
   <pubDate>Mon, 23 Mar 2009 11:14:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53227</link> 
  </item> 
   
  <item> 
   <title>It is perfectly valid having no conditions. The rule should </title> 
   <description>It is perfectly valid having no conditions. The rule should be executed unconditionally then. If this doesn&#039;t work in maildrop, then the maildrop driver has to fixed instead.</description> 
   <pubDate>Mon, 23 Mar 2009 11:30:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53229</link> 
  </item> 
   
  <item> 
   <title>

You are right, an unconditional rule should be valid. Let </title> 
   <description>

You are right, an unconditional rule should be valid. Let me try another patch for maildrop driver



</description> 
   <pubDate>Mon, 23 Mar 2009 12:31:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53231</link> 
  </item> 
   
  <item> 
   <title>This breaks all rules *with* conditions.</title> 
   <description>This breaks all rules *with* conditions.</description> 
   <pubDate>Mon, 23 Mar 2009 13:36:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53232</link> 
  </item> 
   
  <item> 
   <title>I don&#039;t think so.



The patch checks if any condition exist</title> 
   <description>I don&#039;t think so.



The patch checks if any condition exists:



 if (count($this-&gt;_conditions) &gt; 0) { 



In that case, it add &#039;if&#039; statments and the conditions.



I don&#039;t know if i&#039;m missing something, but the patch is working for me.



In fact, i think that actual condition looks weird:



if (count($this-&gt;_conditions &gt; 1)) { 



Comparing an array with a number before count?</description> 
   <pubDate>Mon, 23 Mar 2009 15:18:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53243</link> 
  </item> 
   
  <item> 
   <title>Did you actually test the patch? This is how maildrop script</title> 
   <description>Did you actually test the patch? This is how maildrop scripts look like now:



430: ##### Horde Bugs #####

431: if( \

432:    /^From:\s*bugs@horde\.org$/:h \

433: if( \

434: exception {

435:    to INBOX.horde.bugs

436: }

</description> 
   <pubDate>Mon, 23 Mar 2009 16:29:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53245</link> 
  </item> 
   
  <item> 
   <title>I&#039;m so sorry Jan. 



I tested the modification in our curre</title> 
   <description>I&#039;m so sorry Jan. 



I tested the modification in our current version, and later i generated the patch making modifications in CVS HEAD version, but actually i did not test the patch because it was very simple. But i made a stupid mistake.



I attach the correct and tested patch.

</description> 
   <pubDate>Mon, 23 Mar 2009 21:03:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53250</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/ingo/docs/CHANGES?rt=horde&amp;r1=1.55.2.119&amp;r2=1.55.2.120&amp;ty=u
http://cvs.horde.org/diff.php/ingo/lib/Script/maildrop.php?rt=horde&amp;r1=1.7.2.13&amp;r2=1.7.2.14&amp;ty=u</description> 
   <pubDate>Mon, 23 Mar 2009 21:38:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53252</link> 
  </item> 
   
  <item> 
   <title>Committed, thanks.



If you have a chance, can you take a l</title> 
   <description>Committed, thanks.



If you have a chance, can you take a look at the other open bugs of the maildrop driver?</description> 
   <pubDate>Mon, 23 Mar 2009 21:39:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t53253</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Fix maildrop</title> 
   <description>Changes have been made in Git for this ticket:

Fix maildrop rules without conditions (almarin@um.es, Bug #8103).

http://git.horde.org/diff.php/ingo/docs/CHANGES?rt=horde-git&amp;r1=82c209c8e71b9473af38085588bda376ab370f98&amp;r2=14e76278f3f4a3f9ce9ff2c56f12c899c74386a4
http://git.horde.org/diff.php/ingo/lib/Script/maildrop.php?rt=horde-git&amp;r1=82c209c8e71b9473af38085588bda376ab370f98&amp;r2=14e76278f3f4a3f9ce9ff2c56f12c899c74386a4</description> 
   <pubDate>Wed, 13 Jan 2010 00:00:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8103#t57538</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
