Index: branches/2.2.0.1/expressoMail1_2/inc/class.ScriptS.inc.php
===================================================================
--- branches/2.2.0.1/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4551)
+++ branches/2.2.0.1/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4576)
@@ -35,11 +35,11 @@
         $this->username = $this->scriptfile;
 
-        $this->reply = "";
-        $this->rules = "";
-        $this->errstr = "";
-        $this->size = "";
+        $this->reply    = "";
+        $this->rules    = "";
+        $this->errstr   = "";
+        $this->size     = "";
 
         $this->continuebit  = 1;
-        $this->sizebit      = 1;
+        $this->sizebit      = 2;
         $this->anyofbit     = 4;
         $this->keepbit      = 8;
@@ -254,4 +254,7 @@
         $continue = 1;
         $tmpSubject = "";
+
+        $a = 0;
+
 
         // Recebe os valores das regras;
@@ -278,4 +281,14 @@
             $rule['unconditional'] = 0;
 
+            if( $a < 2 )
+            {
+                error_log( print_r($tmp, true), 3, "/tmp/log" );
+
+                error_log( print_r($rule, true), 3, "/tmp/log" );
+
+                $a++;
+            }
+
+
             if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && empty($rule['size']) && $rule['action']) {
                 $rule['unconditional'] = 1;
@@ -370,5 +383,5 @@
                     if ($rule['size'] != '')
                     {
-                        if ($rule['size'] == 0 && $rule['gthan'])
+                        if ( $rule['size'] == 0 && $rule['gthan'] )
                         {
                             $xthan = " :over ";
@@ -381,6 +394,8 @@
                         }
 
-                        if ($rule['size'] > 0) {
+                        if ( $rule['size'] > 0 )
+                        {
                             $xthan = " :under ";
+
                             if ($rule['gthan'])
                                 $xthan = " :over ";
@@ -427,9 +442,14 @@
                     $newruletext .= "discard;";
                 }
-                if ($rule['keep'])
+
+                if ($rule['keep'] )
+                {
                     $newruletext .= "\n\tfileinto \"INBOX\";";
-                //if ($rule['keep']) $newruletext .= "\n\tkeep;";	        
+                }
+
                 if (!$rule['unconditional'])
+                {
                     $newruletext .= "\n}";
+                }
 
                 $continue = 0;
Index: branches/2.2.0.1/expressoMail1_2/js/filters.js
===================================================================
--- branches/2.2.0.1/expressoMail1_2/js/filters.js	(revision 4531)
+++ branches/2.2.0.1/expressoMail1_2/js/filters.js	(revision 4576)
@@ -149,6 +149,9 @@
 	var fields = rule.split("&&");
 	if(type == 'voip')
+        {
 		return " <a href='javascript:void(0)' onclick=filter.form_r('"+pos+"','voip')><b>" + get_lang("Status") + " : </b>" + "<font color='red'>" + get_lang(fields[2]) + "</font>" + " - " + fields[3] + " <b>" + get_lang("Subject") + ":</b> " + fields[5] + "</a>";
-	else{ 
+        }
+	else
+        {
 		var _criteria = " "; 
 		if (fields[3].length > 0) 
@@ -158,11 +161,13 @@
 		if (fields[5].length > 0) 
 			_criteria += "<b>&nbsp;"+get_lang("subject is")+"</b>:"+fields[5]; 
-		if (parseInt(fields[11]) >= 0)
-		{ 
-			if(fields[8] == "1")
-				_criteria += "<b>&nbsp;"+get_lang("size is over than")+"</b>:"+fields[11]; 
-			else if(fields[8] != "0")
-				_criteria += "<b>&nbsp;"+get_lang("size is under than")+"</b>:"+fields[11]; 
-		} 
+		if ( parseInt( fields[11] ) > 0 )
+                {
+                    if( fields[8] == "2" || fields[8] == "10" )
+                        _criteria += "<b>&nbsp;"+get_lang("size is over than")+"</b>:"+fields[11];
+
+                    if( fields[8] == "0" || fields[8] == "8" )
+                        _criteria += "<b>&nbsp;"+get_lang("size is under than")+"</b>:"+fields[11];
+                }
+
 		var _action = " "; 
 		if (fields[6] == 'folder') 
@@ -179,5 +184,6 @@
 }
 	
-	cfilterSh.prototype.vl_outOffice = function(outOffice){		
+	cfilterSh.prototype.vl_outOffice = function(outOffice)
+        {
 		var aux = outOffice.split("&&");
 		return get_lang("Rule") + " - <a href='javascript:void(0)' onclick=filter.form_out()> " + "<b>" + get_lang("Status") + " : </b><font color='red'>" + (aux[4] == "off" ? get_lang("Disabled") : get_lang("Enabled")) + "</font></a>";
