grommunio-admin-dbconf
Name
grommunio-admin dbconf — Database-stored configuration management.
Synopsis
Description
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.
Commands
commitTrigger commit hook for service, file or key
deleteDelete service, file or key
getGet file or single key
listList available services, files or keys
setSet a configuration key
Options
SERVICEName of the service to configure
FILEName of the configuration file
KEYName of the configuration key
VALUEValue to store in the key
--Indicate that all options have been specified and only names follow
-b,--batchDo not auto-commit
-i,--initOnly set if configuration key does not exist yet
grommunio-admin
The grommunio-admin API and CLI are also dbconf consumers. This allows system adiministrators to change certain configurations without filesystem access and the need to restart the API.
The following files and keys are meaningful when placed under the grommunio-admin service:
multi-server
policyServer 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 section AVAILABLE COMMIT COMMANDS).
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 $SERVICEsystemctl restart $SERVICEMacros
As the whitelisted commands might be hard to memorize and may be changed in the future, macros are provided that expand to whitelisted commands.
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 $SERVICECommand 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:
ENTRYExpands to
$KEY=$VALUE(key level only)FILEComplete content of the modified file as newline separated key=value entries (file level only)
FILE_SComplete content of the modified file as space separated key=value entries (file level only)
FILENAMEName of the modified file (key and file level)
KEYThe modified key (key level only)
SERVICEName of the modified service
VALUENew value of the modified key (key level only)
See Also
grommunio-admin, grommunio-admin-config, grommunio-admin-mconf. grommunio-dbconf