Sendmail to local domain ignoring MX records

Some people in #sendmail on freenode helped me figure out that the problem in this particular case was not with send mail, but my dns records. I had a CNAME for my domain name pointing to the application server that was sending the mail, using an A record instead fixed the problem.