Just to clarify what you want:
Mail comes in to
user@xyz.com (rcpt to: <user@xyz.com>)
user@abc.com replies (mail from: <user@abc.com>)
Now you want mail from: <user@abc.com> to be rewritten to mail from: <user@xyz.com>
However, when the original mail isn't forwarded from the xyz.com domain, no rewrite should take place. Correct?
In that case I guess it's pretty much impossible. The only somewhat feasable, yet complicated way, I can think of is to use the message-ID given by your smtp server to build a database of seen messages and then hope to catch as many replies as possible using the "In-Reply-To" header field. This, of course, relies on the fact that a) all email clients your users use actually write this field and b) your users do in fact hit reply rather than composing a new message.