grommunio-admin-dbconf(1)

πŸ“¦ version 1.18, in alpine 3.24

🌸 Name 🌸

okay bestie, welcome to the grommunio-admin-dbconf(1) page πŸ’– this is the manual for grommunio-admin dbconf β€” Database-stored configuration management. yes, it's giving central config energy.


✨ Synopsis ✨

grommunio-admin dbconf (commit | delete) SERVICE [FILE [KEY]]
grommunio-admin dbconf get SERVICE FILE [KEY]
grommunio-admin dbconf list [SERVICE [FILE [KEY]]]
grommunio-admin dbconf set [-b] [-i] [--] SERVICE FILE KEY VALUE

πŸ’– Description πŸ’–

so grommunio dbconf gives you the ability to store and manage configurations at a single location while making it available across distributed systems. the configs live in the central MySQL database and can be accessed via grommunio-dbconf(1) and grommunio-admin-dbconf(1). both tools essentially provide the same functionality, but grommunio-dbconf(1) provides far better performance and is intended to be used for quickly accessing the configuration. periodt.

configurations consist of key/value pairs organized in files, grouped by service. each service can have an arbitrary number of configuration files, which in turn can contain an arbitrary number of unique keys. literally the whole coziness of organized config πŸŽ€


πŸŽ€ Commands πŸŽ€

  • commit β€” trigger commit hook for service, file or key.
  • delete β€” delete service, file or key.
  • get β€” get file or single key.
  • list β€” list available services, files or keys.
  • set β€” set a configuration key.

πŸ’… Options πŸ’…

  • SERVICE β€” Name of the service to configure.
  • FILE β€” Name of the configuration file.
  • KEY β€” Name of the configuration key.
  • VALUE β€” Value to store in the key.
  • -- β€” Indicate that all options have been specified and only names follow.
  • -b, --batch β€” Do not auto-commit.
  • -i, --init β€” Only set if configuration key does not exist yet.

πŸ¦‹ grommunio-admin πŸ¦‹

the grommunio-admin API and CLI are also dbconf consumers. this allows system administrators to change certain configurations without filesystem access and the need to restart the API. slay for not having to touch the filesystem, honestly.

the following files and keys are meaningful when placed under the grommunio-admin service:

🌟 multi-server 🌟

  • policy β€” Server selection policy for newly created users and domains in multi-server environments. Possible values are balanced, first, last, random and round-robin. Default is round-robin.

πŸ”₯ Commit Hooks πŸ”₯

when modifying values, potential consumers can be notified of this change via commit hooks, for example by restarting the service using the configuration. for security reasons only a few white-listed commands are available (see the Available Commit Commands section below). no random chaos commands allowed, bestie πŸ’€

commit hooks can be defined on key, file or service level. set operations always trigger commits at key level, while the commit command can directly trigger key or service level hooks depending on whether a file or key is specified.

if no hook is defined for a specific trigger level, it automatically falls through to the next lower level, in the order key > file > service.

commit hooks for a service can be defined by setting commit_key, commit_file and commit_service keys under grommunio-dbconf/<service> to a valid command (see below).


⭐ Available Commit Commands ⭐

the following commands are available:

Key

postconf -e $ENTRY

File

postconf -e $FILE_S && systemctl reload postfix

Service

systemctl reload $SERVICE
systemctl restart $SERVICE

πŸ’œ Macros πŸ’œ

as the whitelisted commands might be hard to memorize and may be changed in the future, macros are provided that expand to whitelisted commands. cute little shortcuts, fr fr.

the following macros are defined:

Key

#POSTCONF -> postconf -e $ENTRY

File

#POSTCONF -> sudo postconf -e $FILE_S && systemctl reload postfix

Service

#RELOAD -> systemctl reload $SERVICE
#RESTART -> systemctl restart $SERVICE

🧚 Command Variable Expansion 🧚

commands can contain $-prefixed variables that are expanded before execution. the literal $$ can be used to generate a single $.

the following variables are valid:

  • ENTRY β€” Expands to $KEY=$VALUE (key level only).
  • FILE β€” Complete content of the modified file as newline separated key=value entries (file level only).
  • FILE_S β€” Complete content of the modified file as space separated key=value entries (file level only).
  • FILENAME β€” Name of the modified file (key and file level).
  • KEY β€” The modified key (key level only).
  • SERVICE β€” Name of the modified service.
  • VALUE β€” New value of the modified key (key level only).

🌈 See Also 🌈


that's the whole grommunio-admin-dbconf(1) page, bestie β€” signed off by the footer, mwah πŸ’‹

πŸ“¦ where this page comes from