Name
btree
Synopsis
The term
btree stands for “balanced
tree.” It is a grow-only form of database. Lookups
and insertions are fast, but deletions do not shrink the size of the
database file.[9] A good description of this
form of database can be found in The Art of Computer
Programming, Vol. 3: Sorting and Searching, D.E. Knuth,
1968, pp. 471-480. The btree
type is available
only if sendmail was compiled with
NEWDB
defined and the Berkeley or Sleepycat
db library linked (Section 3.1.2). In most cases, the hash
type (hash) will perform slightly better.
Quite a few database switches are available with this database-map type. They are listed in Table 23-7.
Switch |
§ |
Description |
|
Append values for duplicate keys | |
|
Append tag on successful match | |
|
Don’t use this database map if DeliveryMode=defer | |
|
Don’t fold keys to lowercase | |
|
Suppress replacement on match | |
|
Append a null byte to all keys | |
|
Never add a null byte | |
|
The database map is optional | |
|
Don’t strip quotes from key | |
|
Space replacement character | |
|
Suffix to append on temporary failure | |
|
Ignore temporary errors |
One use for this btree
type might be to look up
users for whom permission is denied to send offsite email. The data
source file might look like the following, and might live in the file
/etc/mail/badusers.db (after
makemap was run to create it):
bob bob ted ted alice alice
A simple ...
Get Sendmail, 3rd 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.