docker-mailserver/target/bin/listmailuser

17 lines
354 B
Plaintext
Raw Normal View History

#! /bin/sh
DATABASE=/tmp/docker-mailserver/postfix-accounts.cf
if [ ! -f "$DATABASE" ]; then
echo "The configuration file 'postfix-accounts.cf' doesn't exist. Until now no email addresses have been added."
exit 1
fi
if [ ! -s "$DATABASE" ]; then
echo "No email addresses have been added."
exit 1
fi
cat "$DATABASE" | awk -F '|' '{print $1}'