On 2007-08-20, at 0427, Metin KAYA wrote:
I have written a patch that create log file for qmailadmin-1.2.9. When auser's password or quota changed, a user deleted from the system or a user created this patch logs the events.
better suggestion for you. i've written a patch to qmailadmin which makes it trigger the "onchange" functionality which is part of the later versions of vpopmail. instead of explicitly creating your log entries within qmailadmin (and hard-coding a filename into the binaries, ugh) why not use the "onchange" code, send the data which needs to be logged as "onchange" events?
this way, the "onchange" script can easily be written or changed to send the log entries wherever the system admin wants them (instead of hard-coding "/var/log/qmailadmin.log" into the binaries).
you also gain the benefit that any external scripts which may need to be called (i.e. building new auth.cdb or validrcptto.cdb files for qmail-smtpd, making final backups of mailboxes before they are deleted, etc.) are called at the appropriate times, no matter whether the event originated in qmailadmin, vpopmaild, the command line programs, or any other program which uses the vpopmail API.
this web page has information on the original "onchange" patch, as well as the "onchange" patch for qmailadmin (which hasn't been added to a release version of qmailadmin yet, but is working just fine on my own server, my clients' servers, and several friends' servers.)
http://qmail.jms1.net/vpopmail/
----------------------------------------------------------------
| John M. Simpson --- KG4ZOW --- Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |
----------------------------------------------------------------
| http://video.google.com/videoplay?docid=-1656880303867390173 |
----------------------------------------------------------------
PGP.sig
Description: This is a digitally signed message part
