1
1
mirror of https://github.com/docker-mailserver/docker-mailserver synced 2024-12-18 14:04:17 +01:00
docker-mailserver/target/bin/listdovecotmasteruser
2023-05-26 01:39:39 +02:00

24 lines
542 B
Bash
Executable File

#!/bin/bash
# shellcheck source=../scripts/helpers/index.sh
source /usr/local/bin/helpers/index.sh
function _main() {
local DATABASE_DOVECOT_MASTERS='/tmp/docker-mailserver/dovecot-masters.cf'
_list_entries "${DATABASE_DOVECOT_MASTERS}"
}
function _list_entries() {
local DATABASE=${1}
_db_should_exist_with_content "${DATABASE}"
local MASTER_ACCOUNT
while read -r LINE; do
MASTER_ACCOUNT=$(echo "${LINE}" | cut -d'|' -f1)
echo -e "* ${MASTER_ACCOUNT}\n"
done < <(_get_valid_lines_from_file "${DATABASE}")
}
_main