Use libresolv.a

If, when you compiled sendmail, the linker reported _res_ routines as missing, you might need to specify the resolver library with -lresolv:

APPENDDEF(`confLIBS', `-lresolv')

This shows one way to include that library with m4 builds. Another way might look like this:

APPENDDEF(`confLIBS', `/usr/local/lib/libresolv.a')

To ensure that sendmail achieves its optimum use of lookups, make sure your resolver library is derived from the latest BIND release: BIND 8.3.3.[34] You might also need to include -l44bsd on the LIBS= line if you are running BIND 4.9.

The tricky part is finding out which resolver library your system supports. With SunOS systems, for example, resolver support in the standard C library uses nis for name resolution. Although this setup might be good for most applications, it is inappropriate for sendmail. SunOS supplies a libresolv.a, but it is based on BIND 4.3 and so should probably be replaced with a newer version.

If your resolver library is not the correct one, you need to compile and install the newest version. You should do this even if it is used only by sendmail.

[34] * 8.3.3 and 9.2.1 are available from http://www.isc.org/products/bind/.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.