Hello,

Is there a way to get the a user-level transfer log with cyrus ? The 
purpose is to see how much bandwidth each user consums.

We use cyrus imapd version 2.1.4. with sendmail 8.12.3, which provides 
its own logfiles for the tranfers through SMTP.

We'd like to have the same kind of info for tranfers through IMAP / POP3.

I've tried to create directories in /var/imap/log/, as specified in the 
doc. This gives me apparently one file per Imap/POP session.

I made several tests, and concluded to the following:

For a POP session, the whole session is copied to the logfile. I tried 
to download a mail with a 1-MB attachment, and the whole mail including 
attachment has been copied into the file.

So the amount of bandwidth used by a user through POP could be estimated 
by doing "du -s /var/imap/log/[user]". But this would be a very disk 
consuming way to log transfers as everything gets copied to the logfile !

When I retrive the same mail and the attachment through Imap, I don't 
get any info about the transfer size. Here is what I get in the logfile 
when I download my 1 MB test mail:

---------- toto Sat May 11 20:46:53 2002

 >1021142813>1 OK User logged in
<1021142813<2 lsub "" "*"
 >1021142813>* LSUB (\Noinferiors) "/" "INBOX"
* LSUB () "/" "&AMk-l&AOk-ments envoy&AOk-s"
* LSUB () "/" "Brouillons"
* LSUB () "/" "INBOX.Trash"
* LSUB () "/" "Trash"
* LSUB () "/" "glops"
2 OK Completed (0.000 secs 7 calls)
<1021142813<3 lsub "" "Other Users/*"
 >1021142813>3 OK Completed (0.000 secs 1 calls)
<1021142814<4 lsub "" "Shared Folders/*"
 >1021142814>4 OK Completed (0.000 secs 1 calls)
<1021142814<5 list "" "INBOX"
 >1021142814>* LIST (\Noinferiors) "/" "INBOX"
5 OK Completed (0.000 secs 2 calls)


Is there a way to customize what gets logged ?


The only info I could get from the doc is this:

<< If the directory log//user/ exists under the directory specified in 
the /configdirectory / configuration option, then /imapd/ will create 
protocol telemetry logs for sessions authenticating as / user/. The 
telemetry logs will be stored in the log// user/ directory with a 
filename of the / imapd/ process-id. >>

I would be very grateful if somebody has the solution to my problem...


Best regards and thanks in advance,

Alexandre Suter


Reply via email to