Hi, is there an easy way to implement account events listeners in Zimbra?

What I want to do is to call some function (do some stuff in one external linux machine) when a account is added, modified or removed.

What is the best way to achieve this?