I need to forward e-mails to different mail accounts by different conditions. The aim is to create mail notification scheme for my company. I'd like to setup server on dedicated mail domain for it. Is there any software that helps to get my aim (Linux)?

Examples:

1) forward all e-mail sent to a@my-specail-domain.com to x@x, y@y, z@z (no conditions)

2) forward e-mail sent to b@my-specail-domain.com where subject contains '[finance]' to a@b and b@b

3) forward e-mail sent to b@my-specail-domain.com where subject contains '[fault]' to s@s and s2@s.

Receivers' domains are different.

P.S. Now we use Gmail filters to get this functionality, but it's unstable and hard to maintain.