This sendmail FAQ will tell you how to add an "X-Envelope" header to your emails so that you can sort on that with procmail.
http://www.sendmail.org/faq/section3.html#3.29
But, what do you do if your server has multiple domains? The FAQ only tells you to set it to a fixed domain:
DOMAIN=domain.com
What do you do if you have multiple domains.
thanks