I'm guessing that you are running
sendmail 8.12, which is designed not to run setuid-root (although it is set-gid), or your method of calling sendmail is expecting it not to be set-uid root.
In order to help you though, it would be useful to know what you're doing when you get this warning and what version of
sendmail (or sendmail-replacement) you're using. Otherwise, we'll be pretty hard pressed to help you out.