mailwrapper checks to see how it was invoked and then looks up the appropriate command in mailer.conf. All of the entries in mailer.conf point to /usr/libexec/sendmail/sendmail, so how does that binary know what it's supposed to do. I'm just curious.