Changeset 278
- Timestamp:
- 04/30/08 18:46:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r271 r278 2284 2284 $msg = $header . $body; 2285 2285 $email = $_SESSION['phpgw_info']['expressomail']['user']['email']; 2286 //$tmp_file = $tmp_dir . "msg." . $email . '.'. $msg_number . time(); 2287 // maybe we can get it faster with regex, don't know how :'( 2288 $signature = trim(substr($header, strpos($header, 'X-DSPAM-Signature:') + 18)); 2286 $username = $this->username; 2289 2287 strtok($email, '@'); 2290 2288 $domain = strtok('@'); 2291 2289 2290 //Encontrar a assinatura do dspam no cabecalho 2291 $v = explode("\r\n", $header); 2292 foreach ($v as $linha){ 2293 if (eregi("^X-DSPAM-Signature", $linha)) { 2294 2295 $args = explode(" ",$linha); 2296 $signature = $args[1]; 2297 } 2298 } 2299 2292 2300 // feed dspam 2293 if ($is_spam) 2294 $cmd = str_replace( 2295 array('##EMAIL##', '##USERNAME##', '##DOMAIN##', '##SIGNATURE##'), 2296 array($email, $this->username, $domain, $signature), $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] 2297 ); 2298 else 2299 $cmd = str_replace( 2300 array('##EMAIL##', '##USERNAME##', '##DOMAIN##', '##SIGNATURE##'), 2301 array($email, $this->username, $domain, $signature), $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] 2302 ); 2303 2301 switch($is_spam){ 2302 case 'true': $cmd = $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam']; break; 2303 case 'false': $cmd = $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham']; break; 2304 } 2305 $tags = array('##EMAIL##', '##USERNAME##', '##DOMAIN##', '##SIGNATURE##'); 2306 $cmd = str_replace($tags,array($email,$username,$domain,$signature),$cmd); 2304 2307 system($cmd); 2305 2306 2308 } 2307 2309 imap_close($mbox_stream);
Note: See TracChangeset
for help on using the changeset viewer.