I had problems with mail delivery on one server where server self doesn’t have any email services. The case was following: server’s hostname was example.com and emails for example.com was handled by another server. By default sendmail will treat all emails sent to example.com meant for local users eg. user@example.com will be searched from local user table.
I wanted all emails to example.com to be delivered to domains email server which was defined on MX record. I’m not sendmail expert and for my own servers I prefer postfix, but this was client’s server so I had to figure out how to configure sendmail handle this case.
