The standard procedure is to write and check an X-Loop header in such
situations. You should also ensure not to delete somebody *else's* headers.
Unfortunately not everybody adheres to this.
My venerable procmail guide (along with many others out there) shows this:
I have a spam filter (right out of Stopping Spam - O'reilly) that bounces
mail back to the sender if they aren't recognized and/or authorized via a
key phrase. My problem is, what to do if both sender and receiver have
this filter? I'm thinking that I can add a string to the subject line on
the outgoing bounce or scan the entire message body for my original bounce
message. The latter seems safer but more CPU intensive.
procmail mailing list