Check the options for sendmail. One of them lets you tell sendmail how to handle messages that have no To: header. Something like NoRecipients... It is documented in the O'Reilly book.