This function is performed by the LDA not sendmail. The most common LDA is procmail. If you are not using it I recommend installing it. Once you have it installed you need to create a recipie in a .procmailrc file. Place the .procmailrc file in /home/mailusername.
A simple recipie like this will work
:0:
* ^Subject: all.*mail
/dev/null
This says: Anything that begins with "Subject: all" and contains the string "mail" (followed by anything, or nothing) somewhere after that is to be saved in the folder /dev/null
TIP: Use VI as your editor when creating recipies. pico -w will work too but as your recipies get more complicated vi makes more sense
There is no God, only 10001010