Changeset 1304
- Timestamp:
- 08/11/09 14:40:40 (15 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.ScriptS.inc.php
r1059 r1304 177 177 // Escreve a nova regra; 178 178 $this->reply = $this->SieveS->getscript(); 179 179 /* 180 180 if($this->reply){ 181 181 $this->errstr = $this->SieveS->deletescript($this->scriptfile); 182 182 } 183 183 */ 184 185 $error_log_file="/home/expressolivre/sieve_error.log"; 184 186 //Escreve a(s) nova(s) regra(s); 185 $this->errstr = $this->SieveS->putscript($this->scriptfile,$this->write_rule()); 187 $newrule = $this->write_rule(); 188 if (strlen($newrule) > 0) 189 $this->errstr = $this->SieveS->putscript($this->scriptfile,$newrule); 190 else 191 { 192 if($_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] == "True") 193 error_log(date("D M j G:i:s T Y").": SieveError, Invalid rule for " 194 .$_SESSION['phpgw_info']['expressomail']['user']['userid']."=>" 195 .$this->teste."\nRule:" 196 .$var_decode."\n", 3, $error_log_file); 197 return "Invalid rule\n" . $this->teste; 198 } 186 199 187 200 //Ativa o script; … … 191 204 $this->SieveS->close(); 192 205 193 if($this->errstr){ 206 if($this->errstr) 207 { 194 208 return "Ok"; 195 }else{ 209 } 210 else 211 { 212 if($_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] == "True") 213 error_log(date("D M j G:i:s T Y") 214 .": SieveError, Problem for " 215 .$_SESSION['phpgw_info']['expressomail']['user']['userid']."=>" 216 .$this->teste."\nRule:" 217 .$var_decode."\n", 3, $error_log_file); 196 218 return "Problemas na criação do arquivo!\n" . $this->teste; 197 219 } … … 203 225 for ( $i = 0; $i < strlen($input); $i++ ) 204 226 { 205 if ( preg_match('/[ÁáÉéÍíÓóÚúÀàÈèÌìÒòÙùüÇçÃãÕõÂâÊêÔô®©§ªºÐ¹²³°¢¿Æ£µøæß«»Ø÷±¬]/', $input[$i]) )227 if ( preg_match('/[^a-z0-9.@~_+=&\'*^"-]/i', $input[$i]) ) 206 228 { 207 229 $special_char = true; 208 $input = preg_replace('/ '.$input[$i].'/', '=' . bin2hex($input[$i]), $input);230 $input = preg_replace('/\\'.$input[$i].'/', '=' . bin2hex($input[$i]), $input); 209 231 } 210 232 } … … 227 249 } 228 250 229 // Grava a nova regra;251 // build the rule 230 252 function write_rule(){ 231 253 … … 346 368 347 369 } 348 349 // Ações 370 // Don't write half rule! 371 if (strlen($newruletext) == 0) 372 return false; 373 // Actions 350 374 if (!$rule['unconditional']) $newruletext .= ") {\n\t"; 351 375 -
trunk/expressoMail1_2/templates/default/config.tpl
r1290 r1304 23 23 </tr> 24 24 <tr bgcolor="{row_off}"> 25 <td>{lang_Do_you_want_to_ log_the_sent_messages?}</td>25 <td>{lang_Do_you_want_to_enable_expressoMail_log?}</td> 26 26 <td> 27 27 <select name="newsettings[expressoMail_enable_log_messages]"> 28 28 <option value=""{selected_expressoMail_enable_log_messages_False}>{lang_No}</option> 29 29 <option value="True"{selected_expressoMail_enable_log_messages_True}>{lang_Yes}</option> 30 </select> path: /home/expresso /mail_senders.log30 </select> path: /home/expressolivre/ 31 31 </td> 32 32 </tr>
Note: See TracChangeset
for help on using the changeset viewer.