On Tue, 2007-01-16 at 19:35 +0000, Michael A. Painter Jr. wrote:
Hello, I have searched but have not found any information on logging imap actions. I want to log when someone uses imap to delete, move, copy, etc. This would greatly help me when someone deletes an email and asks where it went. I get this fairly often from a few users. Any help would be greatly appreciated.
Well, since people have been asking this forever, I went and implemented a mail_log plugin which is now in CVS and in 1.0.rc18 also. I'm not sure what kinds of things everyone wants to log, but here's a start at least. Suggestions for how to improve it and what should be optional is welcome.
A typical move-to-trash + expunge is logged like this:
imap(tss): Info: copy -> Trash: uid=387094, msgid=1054290290.19156.426.camel@hurina imap(tss): Info: deleted: uid=387094, msgid=1054290290.19156.426.camel@hurina imap(tss): Info: expunged: uid=387094, msgid=1054290290.19156.426.camel@hurina
It also logs mailbox deletions:
imap(tss): Info: Mailbox deleted: blah
It doesn't log if mails are deleted by something else than Dovecot.