For most users, the default sendmail
that is
produced by running Build
is perfectly suitable.
For others, however, support for certain desirable
features—such as hesiod, LDAP, or NIS—will have to be
added. The open source distribution of sendmail
has many such support items that you can include or exclude from your
compiled binary using compile-time macros.
V8.13 has introduced six new compile-time macros:
The new SOCKETMAP
compile-time macro enables use
of the new socket
database-map type (Section 3.1.1
[V8.13]).
The new SM_CONF_LDAP_INITIALIZE
compile-time macro
(Section 3.1.2
[V8.13]) if
set, declares that the ldap_initialize
(3)
routine exists in your LDAP library.
The new NEEDINTERRNO
compile-time macro, if set,
says that errno
is not declared in your
system’s errno.h
file.
The new SM_CONF_POLL
compile-time macro causes
poll
(2) to be used instead of
select
(2) in the Milter library.
The new HASCLOSEFROM
compile-time macro may be
defined if your system has the closefrom
(3)
C-library function.
The new HASFDWALK
compile-time macro may be
defined if your system has the fdwalk
(3)
C-library function.
The SOCKETMAP
compile-time macro
enables
use of the new socket
database-map type (Section 23.1.5
[V8.13]). Define
SOCKETMAP
inside your Build
m4
file with a line like this:
APPENDDEF(`confMAPDEF´, `-DSOCKETMAP´)
If you use a vendor supplied sendmail
program,
you may check to see whether it includes SOCKETMAP
support by running a command like the following:
% /usr/sbin/sendmail -bt -d0.4 < /dev/null | grep SOCKETMAP
If a line of text is printed containing SOCKETMAP
,
you indeed have support for it. If not, you will either need to
contact your vendor or download and build open source
sendmail
.
When sendmail is built
with
LDAPMAP
defined
(3.4.19[3ed]), LDAP database-maps are
available for use. If the LDAP library contains an
ldap_initialize
( ) routine, and if this
SM_CONF_LDAP_INITIALIZE
macro is defined,
ldap_initialize
( ) is called if your LDAP server
supports direct use of URIs.
Note that LDAP URIs can still be used even if
SM_CONF_LDAP_INITIALIZE
is not set, but the
scheme://
in
(scheme://host:port/..
.) is ignored. Therefore, if
SM_CONF_LDAP_INITIALIZE
is not available, the
scheme ldap://
is always used, but the schemes
ldaps://
and ldapi://
, if used,
may result in an error.
For most LDAP libraries, SM_CONF_LDAP_INITIALIZE
will be set properly for you.[2] But in
the event it is improperly set, you may define it with the following
and then rebuild sendmail
:
APPENDDEF(`conf_libsm_ENVDEF´, `-DSM_CONF_LDAP_INITIALIZE´)
[2] It is automatically
defined if LDAP_OPT_URI is defined by the LDAP
include files, which is how OpenLDAP implements
ldap_initialize
( ).
3.19.31.73