You want to operate a Sendmail server, and for various reasons you cannot or do not want to use Postfix, Exim or Qmail. However, your Sendmail should not deliver the mails itself, but only forward them to a smart host.
This all works, but: Your Sendmail cannot deliver mails without a working name resolution. This is especially annoying because this is actually superfluous when using a smarthost.
If you call up the undelivered mails with
mailq -Ac you will see entries with
The exact cause is not (exactly) known. Sendmail tries to resolve or check host or domain names at various points.
Create a file
/etc/mail/service.switch with the following content:
hosts files aliases files
Now add the following line to your code
Do not forget to rebuild the file
sendmail.cf by calling
make, and then restart or at least reload Sendmail.