Feature #71
pre/post sync hooks
| Status : | Closed | Start : | 05/24/2008 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | - | % Done : | 100% |
|
| Category : | Other | |||
| Target version : | - | |||
| Resolution : |
Description
It would be great if offlineimap could run arbitrary commands before and after sync.
For example, I'm using a pre-sync hook to run 'imapfilter'.
One could also use a post-sync hook to run a spam detector.
Anyway, here is a patch that implements it.
Let me know if you would suggest any improvements.
If this patch was accepted the doc would need to be updated accordingly.
Cheers -- SF
Associated revisions
Revision 936fe1f43e9ded5ae66b59cb39e6c8d188e637a4
Added docs for hooks
Patch from Sias Mey
fixes #71
Revision ab43d7454962e3fae5264b19402bbd7ef75464dc
Applied pre/post sync hooks
Patch from Sylvain FORET in refs #71
History
10/01/2008 08:51 AM - Sias Mey
Thank you,
This is an awesome addition. and it seems to be working quite well for me.
Even without the docs I managed to figure it out easily enough, Please implement this officially ASAP as I think the whole offlineimap + imapfilter combo is fairly common but rather more anoying to set up in a cron.
This also assures that imapfilter doesent mess with mailboxes while offlineimap is busy syncing.
I suppose the postsync hook could also be used to send sync summaries if the offlineimap process is mainly headless.
10/01/2008 09:00 AM - John Goerzen
Would you be willing to send me a documentation patch? It should, at minimum, be documented via comments and examples in the sample offlineimap.conf.
I really don't like applying patches that don't update the documentation as well. It forces me to spend quite a bit of time merging them, which I don't have as a general rule. If one of you could supply the docs, I'd be happy to look at this ASAP.
10/01/2008 11:12 AM - Sias Mey
- File offlineimap_hooks.diff added
OK ... there you go. Some basic documentation and the patch provided by SF
I added the explanation in the Account section just under the quick and autorefresh configs.
Hope that help with an awesome App.
10/01/2008 01:23 PM - John Goerzen
- % Done changed from 0 to 100
- Status changed from New to Closed
Applied in changeset 936fe1f43e9ded5ae66b59cb39e6c8d188e637a4.