SOCKETMAP_TABLE(5)

πŸ’– SOCKETMAP_TABLE(5) β€” the vibe guide ✨

okay so bestie, we're in the File Formats Manual section, and this is the tea on socketmap_table β€” the Postfix socketmap table lookup client 🫢. Sit down, hydrate, let's go.


🌸 NAME 🌸

socketmap_table β€” the Postfix socketmap table lookup client. that's it, that's the name, iconic behavior only πŸ’…


✨ SYNOPSIS ✨

time to look stuff up, bestie:

postmap -q "string" socketmap:inet:host:port:name
postmap -q "string" socketmap:unix:pathname:name

postmap -q - socketmap:inet:host:port:name <inputfile
postmap -q - socketmap:unix:pathname:name <inputfile

same energy, but you're feeding it a whole file instead of one lil string πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so the Postfix mail system uses optional tables for address rewriting or mail routing β€” you know, the glamorous backstage work. these tables usually show up in lmdb:, cdb:, hash:, or dbm: format. very demure, very mindful.

the Postfix socketmap client, though? it wants endpoint names that look a specific way:

  • TCP endpoints: inet:host:port:name
  • UNIX-domain endpoints: unix:pathname:name

and in both cases, name is the name field in a socketmap client request (jump to "REQUEST FORMAT" below, it's literally right there πŸ’œ).


🌈 PROTOCOL 🌈

socketmaps keep it simple, and honestly? we love that for them. the client sends one request, the server sends one reply. each request and each reply goes out as one netstring object. no chaos, no drama, just netstrings ✨


πŸ’Œ REQUEST FORMAT πŸ’Œ

the socketmap protocol supports only the lookup request. literally just the one move. here's the form:

name <space> key

name <space> key β€” search the named socketmap for the specified key. that's the whole request, bestie.

heads up 🫢 Postfix will not generate partial search keys. so no domain names missing one or more subdomains, no network addresses missing one or more least-significant octets, and no email addresses missing the localpart, address extension or domain portion. it's giving all or nothing. this same behavior also shows up with cidr:, pcre:, and regexp: tables β€” so it's a whole family trait, iykyk.

πŸŽ€ REPLY FORMAT πŸŽ€

replies have to look like this, no exceptions, the server must play along:

  • OK <space> data β€” the requested data was found. slay! πŸŽ‰
  • NOTFOUND <space> β€” the requested data was not found. it's giving ghosted πŸ’€
  • TEMP <space> reason β€” temp trouble
  • TIMEOUT <space> reason β€” ran out of time
  • PERM <space> reason β€” the request failed. the reason, if non-empty, is descriptive text. permanent L 😭

so TEMP, TIMEOUT and PERM all carry a reason, and OK carries data, and NOTFOUND carries... nothing but vibes and a space. periodt.


⏳ PROTOCOL LIMITS ⏳

okay this part matters, listen up:

the Postfix socketmap client requires that replies are no longer than 100000 bytes (not including the netstring encapsulation β€” the netstring wrapper doesn't count toward the limit, keep that in mind 🧚). this limit can be changed with the socketmap_max_reply_size configuration parameter (Postfix 3.10 and later).

and the time limits? they're strict, bestie:

  • 100s to connect to a socketmap server
  • 100s to send a request
  • 100s to receive a reply
  • closes an idle connection after 10s
  • closes an active connection after 100s

these limits are not (yet) configurable. so... yeah. we wait 🫠


πŸ”’ SECURITY πŸ”’

🚨 real talk: this map cannot be used for security-sensitive information, because neither the connection nor the server are authenticated. not the connection, not the server, nobody's checking IDs. do not put your secrets here, bestie, I am begging πŸ™ˆ

πŸ‘‘ CONFIGURATION PARAMETERS πŸ‘‘

  • socketmap_max_reply_size (default 100000) β€” the maximum allowed reply size from a socketmap server, not including the netstring encapsulation. that's the whole setting, but it's a powerful one πŸ’…

🌸 SEE ALSO 🌸

links and friends to check out:


πŸ“š README FILES πŸ“š

use "postconf readme_directory" or "postconf html_directory" to locate this information. so handy 🫢

  • DATABASE_README β€” Postfix lookup table overview

πŸ’€ BUGS πŸ’€

the protocol time limits are not yet configurable. that's it. that's the bug. we're all just living with those 100 seconds fr fr.


πŸ“œ LICENSE πŸ“œ

the Secure Mailer license must be distributed with this software. non-negotiable, bestie, it travels with the code ⭐


πŸ•°οΈ HISTORY πŸ•°οΈ

  • Socketmap support was introduced with Postfix version 2.10.
  • The socketmap protocol was published with Sendmail v8.13.

glow-up timeline, honestly πŸ’œ


🫢 AUTHOR(S) 🫢

  • Wietse Venema β€” IBM T.J. Watson Research, P.O. Box 704, Yorktown Heights, NY 10598, USA
  • Wietse Venema β€” Google, Inc., 111 8th Avenue, New York, NY 10011, USA
  • Wietse Venema β€” porcupine.org

not one, not two, but three Wietse Venemas on the credits πŸ’… main character energy, and honestly? deserved.


and that's the whole page, bestie πŸŽ€ this is SOCKETMAP_TABLE(5) from the File Formats Manual, so go forth and look up those keys β€” ily, drink water, and remember: no partial search keys, no security-sensitive info, no exceptions πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from