Trafficaccounting in a mysql db ?

Christian Schulte cs at schulte.it
Mon Mar 24 13:07:11 EST 2003


Hello,

I wrote a patch which enables one to do traffic logging into a mysql 
database. (mainly lib/prot.c lib/prot.h) The table in which that happens 
could look something like:

  CREATE TABLE cyrus_accounting (
   id int(11) NOT NULL auto_increment,
   login varchar(128) NOT NULL default '',
   service 
enum('IMAP','POP','OTHER','FILESYSTEM','BACKEND','LMTP','DELIVER','LMTP_FILESYSTEM','LMTP_TEMP','LMTP_SHUTDOWN','SHUTDOWN') 
NOT NULL default 'OTHER',
   bytes double NOT NULL default '0',
   type enum('IN','OUT') NOT NULL default 'UNSPECIFIED',
   connect_time datetime default NULL,
   disconnect_time datetime NOT NULL default '0000-00-00 00:00:00',
   PRIMARY KEY  (id),
   KEY stamp (connect_time),
   KEY login (login)
) TYPE=InnoDB;

If anybody has interest in that I could post the patch. I would have to 
do some changes to make everything configurable in the imapd.conf file 
first so that I cannot post the patch unchanged for now and wanted to 
ask first.

--Christian--





More information about the Info-cyrus mailing list