Hi, Is it possible with dovecot to run a script on user logoff event - something like post-login script? What I want to achieve is updating a SQL table with online/offline status. Thanks in advance, Aaron
On 6.1.2010, at 11.51, Aaron Roberts wrote:> Hi, > Is it possible with dovecot to run a script on user logoff event - something like post-login script?You could do a post-login script that does: #!/bin/sh # post-login stuff /usr/local/libexec/dovecot/imap ex=$? # post-logout stuff exit $ex Of course that means some annoying extra shell processes. An alternative would be for you to create a plugin that does the post-logout stuff in its deinit() function.
> > Hi, > > Is it possible with dovecot to run a script on user logoff > event - something like post-login script? > > You could do a post-login script that does: > > #!/bin/sh > > # post-login stuff > /usr/local/libexec/dovecot/imap > ex=$? > # post-logout stuff > exit $ex > > Of course that means some annoying extra shell processes. An > alternative would be for you to create a plugin that does the post- > logout stuff in its deinit() function.Thanks for the suggestion. I think I can do what I need using swatch to catch logon/logoff events from the logfile. Thanks, Aaron