If you have postfix, look at
on setting transport rules for specific users/domains.
Standard sendmail has similar options, but is probably more difficult to configure. Haven't tried that myself.
There are other solutions then changing the mail transport rules, like mail filtering (if you want to write a filtering script), etc.