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 withcidr:,pcre:, andregexp: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 troubleTIMEOUT <space> reasonβ ran out of timePERM <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(default100000) β 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:
https://cr.yp.to/proto/netstrings.txtβ netstring definitionpostconf(1)β Postfix supported lookup tablespostmap(1)β Postfix lookup table managerregexp_table(5)β format of regular expression tablespcre_table(5)β format of PCRE tablescidr_table(5)β format of CIDR tables
π 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
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms