Current time: 12-23-2024, 12:57 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Patch] Pop3 statistics with dovecot not created
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #1
[Patch] Pop3 statistics with dovecot not created
Recently I realized that no POP3 statistics were being generated in case you use dovecot.
Since most of the traffic is POP3 I just fixed that for my server.
Basically I tweaked some values from dovecot output to match the pattern that ispcp needs:

user=user@example.com top=0 retr=size

I know it won't be in next rc, but if someone could have a look at it, I'd be glad to add the patch to the documentation ...

Cheers
11-24-2008 11:43 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #2
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
Find all posts by this user Quote this message in a reply
UncleSam Offline
Junior Member
*

Posts: 28
Joined: Apr 2010
Reputation: 0
Post: #3
RE: [Patch] Pop3 statistics with dovecot not created
sorry to ask, but how to use this diff?
04-15-2010 06:37 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #4
RE: [Patch] Pop3 statistics with dovecot not created
(04-15-2010 06:37 PM)UncleSam Wrote:  sorry to ask, but how to use this diff?
Don't worry, this is quite old, and has been fixed a long ago.
For the current issues, you can follow the thread in
http://www.isp-control.net/forum/thread-8721.html
04-15-2010 07:10 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)