| aseques   Member
 
      
   
 Posts: 330
 Joined: May 2008
 Reputation: 4
 | 
			| RE: [Patch] Pop3 statistics with dovecot not created 
 
				Since the forums ate my patch. I post it in plain ... Quote:--- /root/ispcp-vrl-traff       2008-11-24 12:12:25.000000000 +0100+++ /var/www/ispcp/engine/traffic/ispcp-vrl-traff       2008-11-24 14:38:22.000000000 +0100
 @@ -498,10 +498,15 @@
 
 # POP3
 # courierpop3login is for Debian. pop3d for Fedora.
 -               $rs = sys_command("$cat $rlog|$grep -E '(courierpop3login|pop3d).+user=.+top='|$grep -v 'ip=\\[::ffff:127.0.0.1\\]'|"
 -                       ."$awk '/courierpop3login/ {print \$7,\$9,substr(\$10,1,length(\$10)-1);} "
 -                       ."/pop3d/ {print \$7,\$10,substr(\$11,1,length(\$11)-1);}'"
 -                       ." 1>$pop3_log");
 +               #$rs = sys_command("$cat $rlog|$grep -E '(courierpop3login|pop3d).+user=.+top='|$grep -v 'ip=\\[::ffff:127.0.0.1\\]'|"
 +               #       ."$awk '/courierpop3login/ {print \$7,\$9,substr(\$10,1,length(\$10)-1);} "
 +               #       ."/pop3d/ {print \$7,\$10,substr(\$11,1,length(\$11)-1);}'"
 +               #       ." 1>$pop3_log");
 +               # POP3 accounting fixed for Dovecot
 +                $rs = sys_command("$cat $rlog|$grep 'POP3'| $grep 'Disconnected: Logged out' |"
 +                       ."$awk '/POP3/ {split(\$10,array,\"\/\"); print \"user=\"substr(\$6,6,length(\$6)-7) "
 +                       ."\", top=\"substr(array[2],0,length(array[2])) \", retr=\"substr(\$13,6,length(\$13)) ;}'"
 +                       ." 1>$pop3_log");
 return $rs if ($rs != 0);
 
 $res = open(F, '<', $pop3_log);
 |  | 
	| 11-29-2008 02:06 AM |  |