btree

The db(3) form of database V8.1 and later

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.[343] A good description of this form of database can be found in The Art of Computer Programming, Vol. 3: Sorting and Searching, by D.E. Knuth. The btree type is available only if sendmail was compiled with NEWDB defined and the Berkeley or Sleepycat db library linked (The Sleepycat DB Library on page 104). In most cases, the hash type (hash on page 908) will perform slightly better.

Quite a few database switches are available with this database-map type. They are listed in Table 23-7.

Table 23-7. The btree database-map type K command switches

Switch

§

Description

-A

-A on page 886

Append values for duplicate keys.

-a

-a on page 887

Append tag on successful match.

-D

-D on page 887

Don’t use this database map if DeliveryMode=defer.

-f

-f on page 887

Don’t fold keys to lowercase.

-m

-m on page 888

Suppress replacement on match.

-N

-N on page 889

Append a null byte to all keys.

-O

-O on page 889

Never add a null byte.

-o

-o on page 889

The database map is optional.

-q

-q on page 889

Don’t strip quotes from key.

-S

-S on page 890

Space replacement character.

-T

-T on page 890

Suffix to append on temporary failure.

-t

-t on page 891

Ignore temporary errors.

One use for this btree type might be to look up users for whom permission to ...

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.