This is not a sendmail issue. That said, there are recipes included in your systems documentation. See `man procmailex' for the details. Here is what a couple of the look like:
Example #1: :0 h c * !^FROM_DAEMON * !^X-Loop: your@own.mail.address | (formail -r -I"Precedence: junk" \ -A"X-Loop: your@own.mail.address" ; \ echo "Mail received.") | $SENDMAIL -t Example #2: :0 Whc: vacation.lock # Perform a quick check to see if the mail was addressed to us * $^To:.*\<$\LOGNAME\> # Don't reply to daemons and mailinglists * !^FROM_DAEMON # Mail loops are evil * !^X-Loop: your@own.mail.address | formail -rD 8192 vacation.cache :0 ehc # if the name was not in the cache | (formail -rI"Precedence: junk" \ -A"X-Loop: your@own.mail.address" ; \ echo "I received your mail,"; \ echo "but I won't be back until Monday."; \ echo "-- "; cat $HOME/.signature \ ) | $SENDMAIL -oi -t |