Need help with sendmail email filtering on FreeBSD

Hi All,
Sorry, for the double posting. Don't know how to move to a different forum.

I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9.

I need to filter incoming emails based on the sender's email address or domain and forward them to another address on a different domain as well as to the original recipient. Can I achieve this with SendMail and ProcMail?

The server's domain is domain.com. I need to be able to forward emails coming from auser@domain.a or any emails coming from *@domain.b and forward them to auser@domain.c and as well as to the intended recipient @domain.com

Your help will be greatly appreciated.

Regards

Sendmail rewrite rules are a real tricky thing, one very thick Riley book. The right rewrite rule in sendmail.conf can redirect mail, but I am not sure it can create a hidden additional recipient. You could direct it to a local recipient and rework it in a script pointed to by ~/.forward (but turning that on is not considered very secure). Alternatively to .forward, a cron for that user could receive email and forward it to as many recipients as you want, using shell scripting.