If your system is configured to use the Domain Name Service, then sendmail will use it by default.
Control of host address lookups can also be set using a ``service switch''. sendmail can be configured to use the service switch by setting the hosts service entry in the /etc/mail/service.switch file. sendmail uses only two entries, hosts and aliases, although system routines may use other services, notably the passwd service for user name lookups by getpwname.
However, if you do not have a name server configured at all, such as at a UUCP-only site, sendmail will get a ``connection refused'' message when it tries to connect to the name server (either indirectly by calling gethostbyname or directly by looking up MX records). If the I option is set, sendmail will interpret this to mean a temporary failure and will queue the mail for later processing; otherwise, it ignores the name server data. If your name server is running properly, the setting of this option is not relevant; however, it is important that it be set properly to make error handling work properly.
This option also allows you to modify name server options. The command line takes a series of flags as documented in resolver(SLIB) (with the leading ``RES_'' deleted). Each can be preceded by an optional ``+'' or ``''. For example, the following line turns on the AAONLY (accept authoritative answers only) and turns off the DNSRCH (search the domain path) options.
OITrue +AAONLY DNSRCHMost resolver libraries default to DNSRCH, DEFNAMES, and RECURSE flags on and all others off. Note the use of the initial ``True'' - this is for compatibility with previous versions of sendmail, but is not otherwise necessary.
Version level 1 configurations turn DNSRCH and DEFNAMES off when doing delivery lookups, but leave them on everywhere else. Version 8 of sendmail ignores them when doing canonification lookups (that is, when using $[ ... $]), and always does the search. If you do not want to do automatic name extension, do not call $[ ... $].
The search rules for $[ ... $] are somewhat different than usual. If the name (that is, the ``...'') has at least one dot, it always tries the unmodified name first. If that fails, it tries the reduced search path, and lastly tries the unmodified name (but only for names without a dot, because names with a dot have already been tried). This allows names such as ``utc.CS'' to match the site in Czechoslovakia rather than the site in your local computer science department. It also prefers A and CNAME records over MX records - that is, if it finds an MX record it makes note of it, but keeps looking. This way, if you have a wildcard MX record matching your domain, it will not assume that all names match.