[tpop3d-discuss] traffic accounting in version 1.4.1

Chris Lightfoot chris at ex-parrot.com
Mon, 13 May 2002 10:35:40 +0100


On Sun, May 12, 2002 at 07:52:04PM +0200, Remus Lazar wrote:
> Hello!
> 
> we want to do some traffic accounting for our POP3-customers. Is there a 
> patch for logging the entire traffic / connection? Something like that:
> 
> May 12 19:27:37 tomate tpop3d[27777]: connections_post_select: client 
> [6]pop3user (80.131.206.90): disconnected (xxx bytes transfered)

OK, this is certainly feasible. Basically you need to
alter the connection structure to contain number of bytes
written and number of bytes read, and then alter
connection_sendline, connection_post_select and
write_file. It would probably be preferable to rewrite
write_file to use connection_sendline. No patch currently
exists, but it would be rather simple to implement.

-- 
``I am Ozymandias; look upon my toaster and despair!''
  (graffito on toaster, found in a student kitchen)