13 lines
417 B
Bash
Executable File
13 lines
417 B
Bash
Executable File
#! /bin/bash
|
|
|
|
# shellcheck source=../scripts/helper-functions.sh
|
|
. /usr/local/bin/helper-functions.sh
|
|
|
|
DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf}
|
|
|
|
[[ -f ${DATABASE} ]] || errex "Error: No postfix-virtual.cf file"
|
|
[[ -s ${DATABASE} ]] || errex "Error: Empty postfix-virtual.cf - no aliases have been added"
|
|
|
|
{ grep -v "^\s*$\|^\s*\#" "${DATABASE}" || true ; } | awk -F '|' '{ print $1; }'
|
|
exit 0
|