I would really appreciate if someone could help me or direct to right sources, except for zimbra source code , in solving the following problem:

I need to take custom action on every mail sent/received via zimbra.
The best way as I found is to add LMTP notifier, if that is possible.

The other way is to pipe mail on postfix side, but then I miss aggregated accounts.

Please, share your ideas