procmail is a good ol' regular Unix-type filter. It expects to see one piece of mail per invocation. You can experiment by sending individual pieces of mail through it. Omit the
Code:
| /usr/sbin/sendmail -oi spam@mydomain.com
part of the rule, and the result will come to standard output, complete with an "X-Loop: spam" line, if the rule was invoked.
Experiment and have fun!
Hope this helps.