midb_agent(4gx)

πŸ“¦
version 3.6 Β· 2 versions
, in alpine 3.24

πŸ’… midb_agent β€” bestie edition

okay so this is midb_agent(4gx), one of the Gromox admin reference pages, and it's literally the client for midb(8gx). that's the whole vibe. it's the little friend that talks to midb so the other kids (imap, pop3, etc.) don't have to. 🌸


✨ Name ✨

midb_agent β€” the client for midb(8gx). periodt. πŸ‘‘


πŸŽ€ Configuration directives πŸŽ€

the config file lives at the usual spot, which is:

/etc/gromox/midb_agent.cfg

that's the standard location, no cap. now let's meet the directives, they're all so important:

  • connection_num β€” how many connections we keep open towards every midb target. like, per target. bestie keeps her options open. Default: 5 🫢
  • context_average_mem β€” turns on a memory pool and sets its size (the value is an object count; the actual real bytes work out to 256 bytes * context_num * context_average_mem). heads up: imap(8gx) and pop3(8gx) require this to be non-zero for full functionality β€” so don't set it to zero and then act surprised, iykyk. Default: 1024 ✨
  • midb_agent_command_buffer_size β€” some midb commands can produce huge results (looking at you, P-SRHU with "ALL" 😭). to avoid unbounded memory allocation, the result set is size-limited. if midb responds with something bigger than this, the midb connection gets terminated and midb_agent returns an error to, like, IMAP/POP. the default of 256K is good for a result set of around 24000 to 32000 messages. slay. Default: 256K πŸ¦‹

🌈 Multiserver map 🌈

the SQL column users.homedir specifies a home directory location in an abstract namespace. this abstract namespace is shared between all Gromox programs, and it's genuinely iconic for dividing users into custom subsets and steering connections to different servers. main character energy for routing. πŸ’œ

midb_list.txt specifies how to map from this namespace to midb servers. each line in this file has 3 columns separated by whitespace:

  1. the initial prefix to match a user's exmdb home directory on. the pattern should almost always end in a / character β€” otherwise a prefix of "/home" is able to match a userdir of "/home2/username" as well, which may be undesired. learn from this. πŸ™ˆ
  2. the IPv6 address of the midb server to connect to for all requests involving this prefix. the address must conform to gromox(7) Β§ "Host addresses" β€” no making stuff up.
  3. the port number.

in the absence of midb_list.txt, an implicit default entry is used:

/ ::1 5555

so even if you forget the file, she's got a fallback. lowkey thoughtful. 🧚


πŸ“ Files πŸ“

  • config_file_path/instance.cfg β€” configuration file for the instance of midb_agent. (the instance is usually midb_agent, since there's not much point in loading midb_agent twice. like why would you.)
  • config_file_path/midb_list.txt β€” the midb multiserver map ⭐

config_file_path is determined by the configuration of the program that loaded the midb_agent component. so it's not her choice, it's whoever invited her to the party. πŸ’–


πŸ’€ Signals πŸ’€

upon receipt of SIGHUP, configuration files are re-read β€” but only a few select directives can actually be changed this way, because many parts do not implement reload. so don't come for her with your whole config rewrite expecting a full glow-up, okay? manage expectations. 😭

fr fr: SIGHUP is a partial reload, not a magic reset button.

πŸ”₯ See also πŸ”₯

  • gromox(7) β€” go read it, bestie 🫢

and that's the page!! this is midb_agent(4gx) from the Gromox admin reference β€” source: Gromox, and there's no date line on this one so we're just gonna say it's timeless. mwah πŸ’‹ πŸŽ€βœ¨

πŸ“¦ where this page comes from