On 21.2.2012, at 16.33, Ed W wrote: > I'm also pleased to see that there is little negative cost in using a > proxy... I recently added imap-proxy to our webmail setup because I wanted to > log "last login + logout" times. I haven't quite figured out how to best log > "logout time" (Timo, any chance of a post logout script? Or perhaps it's > possible with the current login scripting?).
You could of course grep the logs, but other than that you'd need to write a Dovecot plugin. Luckily it's really simple to write a plugin. Basically: void postlogout_init(struct module *module) { } void postlogout_deinit(void) { system("/usr/local/bin/dovecot-postlogout.sh"); } Add a few missing #includes and compile and enable for imap/pop3 and that should be it.