[Dovecot] logging in POP3
I have begun testing dovecot as (primarly) a POP replacement.
So far the only lacking bit is the logging.
It would be great if pop3 could log a line at client exit with the following info: (wishlist follows :)
o nr deleted mails + total bytes deletes o nr mails left in spool + bytes left o time spent o indication if TLS was used or not
If you would lika generic logging API I have one you can use: (Only tested under Linux. It is GPL)
http://robur.slu.se/jensl/jellog.tar.gz
Excerpt from headerfile:
/* Functions for setting the destination of logger_facilities.
- filename is the file to append log entries to. If file does not exist it is created with umask 0666 (modified as usual by open() call).
- filestream is the FILE stream to use.
- fd is the filedescriptor to use.
- priority is the syslog priority to use as used in the syslog() call.
- timestamp is used as a boolean. True means begin line with a timestamp. */ int logger_set_file(logger_facility facility, char *filename, int timestamp); int logger_set_iostream(logger_facility facility, FILE *filestream, int timestamp); int logger_set_fd(logger_facility facility, int fd, int timestamp); int logger_set_syslog(logger_facility facility, int priority, int timestamp);
/* fmt = [sdt]+ s = string d = integer t = time-string
Example: logger( LOGGER_ERROR, "sds", "Errorcode: ", -1234, ". Aborting!"); See end of logger.c for more examples. */ int logger(logger_facility facility, char *fmt, ...);
Dovecot looks great! Just thought I'd send you this wishlist.
If you could point me to the right places in the code I am willing to help adding this myself.
Cheers, Jens Låås
'This mail automatically becomes portable when carried.'
Jens Låås Email: jens.laas@data.slu.se
Department of Computer Services, SLU Phone: +46 18 67 35 15
Vindbrovägen 1
P.O. Box 7079
S-750 07 Uppsala
SWEDEN
On Mon, 2003-05-26 at 11:46, Jens Laas wrote:
So far the only lacking bit is the logging.
It's kind of in TODO list.
It would be great if pop3 could log a line at client exit with the following info: (wishlist follows :)
o nr deleted mails + total bytes deletes o nr mails left in spool + bytes left o time spent
These could be done with small modifications to src/pop3/*.c. cmd_quit() deletes the mails so you could calculate the deleted/left mails there. For time spent you'd just add some variable which gets set to current time at startup.
Hmm. It would be nice if this all was possible with plugins. I'd rather not add all kinds of logging hooks all over.. Have to think about this.
o indication if TLS was used or not
This isn't known by pop3 process at all currently.. It could be transferred from pop3-login, but that'd require changes to quite a lot of places.
If you would lika generic logging API I have one you can use:
I think I have good enough logging API for now :)
participants (2)
-
Jens Laas
-
Timo Sirainen