Exec'ing a script from Cyrus when imapd has a client
brong at fastmail.fm
Tue Oct 20 19:34:47 EDT 2009
On Tue, Oct 20, 2009 at 10:56:42PM +0200, Xavier Bestel wrote:
> Le mardi 20 octobre 2009 à 22:22 +0200, steffo76 at gmx.de a écrit :
> > maybe logsurfer (or something similar) would be of help, you could
> > monitor your cyrus logs with it and run fetchmail accordingly:
> > http://www.crypt.gen.nz/logsurfer/
> > http://sourceforge.net/projects/logsurfer/
> That may be an answer, yes. However I'd have preferred if the signal
> came from Cyrus directly (I think it'sa more robust solution).
Log watching is actually pretty good - but another option is to monitor
the $conf/proc/ directory. When someone is connected there will be a
file in there with their username and what folder they currently have
Your cron job could just grep that folder and run if there was a file
with the required username present.
[brong at imap1 proc]$ grep brong *
31327:web6.internal [10.202.2.215] brong user.brong
Getting Cyrus to actually trigger something is much more complex - but
you could easily do something with an inotify on the directory if you
want smaller than a minute resolution.
More information about the Info-cyrus