MAKEMAP(8)

πŸ“¦
version 8.18.2 Β· 2 versions
, in epel 10, fedora 43, fedora 44

πŸ’– MAKEMAP β€” bestie edition πŸ’–

okay so this is the makemap page from section 8 of the System Manager's Manual (yes, the system manager has a manual, and this is one of its pages, slay). it makes database maps for sendmail. buckle up πŸŽ€


✨ NAME ✨

makemap β€” create database maps for sendmail πŸ—ΊοΈβœ¨


🌸 SYNOPSIS 🌸

makemap [-C file] [-N] [-c cachesize] [-d] [-D commentchar] [-e] [-f]
[-i type] [-l] [-o] [-r] [-s] [-t delim] [-u] [-v] maptype mapnam

πŸ¦‹ DESCRIPTION πŸ¦‹

so makemap creates the database maps that the keyed map lookups in sendmail(8) use. it reads input from standard input and outputs them to the mapname you indicate. no cap. πŸ’…

depending on how it's compiled, makemap handles different database formats, and you pick which one with the maptype parameter. they may be:

  • btree β€” B-Tree format maps. this one requires the new Berkeley DB library.
  • hash β€” Hash format maps. this also requires the Berkeley DB library.
  • cdb β€” CDB (Constant DataBase) format maps. this requires the tinycdb library.
  • implicit β€” the first available format in this order: hash, dbm, and cdb. it's giving "whichever one shows up first gets the job".

in all cases, makemap reads lines from the standard input consisting of two words separated by white space. first word = the database key, second word = the value. the value may contain `%n` strings to indicate parameter substitution, and literal percents should be doubled (`%%`). blank lines and lines beginning with `#` are ignored. periodt. 🧚

⚠️ notice: do not use makemap to create the aliases data base, bestie β€” use newaliases instead, because it puts a special token into the data base that sendmail requires. the way that matters 😭

if the TrustedUser option is set in the sendmail configuration file and makemap is invoked as root, the generated files will be owned by the specified TrustedUser. πŸ‘‘


πŸŽ€ Flags πŸŽ€

  • -C β€” use the specified sendmail configuration file for looking up the TrustedUser option.
  • -N β€” include the null byte that terminates strings in the map. this must match the -N flag in the sendmail.cf `K` line. match it or suffer πŸ™ˆ
  • -c β€” use the specified hash and B-Tree cache size.
  • -D β€” use this to specify the character to use to indicate a comment (which is ignored) instead of the default of `'#'`.
  • -d β€” allow duplicate keys in the map. this is only allowed on B-Tree format maps. if two identical keys are read, they will both be inserted into the map. double trouble πŸ”₯
  • -e β€” allow empty value (right hand side).
  • -f β€” normally all upper case letters in the key are folded to lower case. this flag disables that behaviour. it's intended to mesh with the -f flag in the K line in sendmail.cf. the value is never case folded, just so you know. πŸ’…
  • -i β€” use the specified type as fallback if the given maptype is not available.
  • -l β€” list supported map types. a little show-and-tell, we love it ✨
  • -o β€” append to an old file. this allows you to augment an existing file. Note: this might not be supported by all database types, e.g., cdb. πŸ’€
  • -r β€” allow replacement of existing keys. normally makemap complains if you repeat a key, and does not do the insert.
  • -s β€” ignore safety checks on maps being created. this includes checking for hard or symbolic links in world writable directories. (yes that's as spicy as it sounds πŸ”₯)
  • -t β€” use the specified delim instead of white space (also for dumping a map).
  • -u β€” dump (unmap) the content of the database to standard output.
  • -v β€” verbosely print what it is doing. main character energy, narrating their own life 🎬

🌈 Example 🌈

makemap hash /etc/mail/access < /etc/mail/access

πŸ‘‘ SEE ALSO πŸ‘‘

sendmail(8), newaliases(1)


πŸ“ HISTORY πŸ“

the makemap command appeared in 4.4BSD. an icon, a legend, a moment in time ⭐


and that's the whole page bestie πŸ’– this one's from the System Manager's Manual, dated $Date: 2013-11-22 20:51:52 $ β€” yes it's been around since before you were born and it still ate. go forth and map πŸ¦‹βœ¨

πŸ“¦ where this page comes from
  • epel 10: sendmail 8.18.1-4.el10_0 Β· sendmail-8.23 AND MIT AND MIT-CMU AND BSD-3-Clause AND CDDL-1.0 AND BSD-4-Clause AND BSD-4-Clause-UC AND PostgreSQL AND ISC AND HPND-sell-variant AND mailprio
  • fedora 43: sendmail 8.18.1-13.fc43 Β· sendmail-8.23 AND MIT AND MIT-CMU AND BSD-3-Clause AND CDDL-1.0 AND BSD-4-Clause AND BSD-4-Clause-UC AND PostgreSQL AND ISC AND HPND-sell-variant AND mailprio
  • fedora 44: sendmail 8.18.2-2.fc44 Β· sendmail-8.23 AND MIT AND MIT-CMU AND BSD-3-Clause AND CDDL-1.0 AND BSD-4-Clause AND BSD-4-Clause-UC AND PostgreSQL AND ISC AND HPND-sell-variant AND mailprio
  • fedora 44: sendmail 8.18.2-4.fc44 Β· sendmail-8.23 AND MIT AND MIT-CMU AND BSD-3-Clause AND CDDL-1.0 AND BSD-4-Clause AND BSD-4-Clause-UC AND PostgreSQL AND ISC AND HPND-sell-variant AND mailprio
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms