mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
98e59a7abe
This commit adds a script nammed 'listmailuser'. './setup.sh' uses this this script for its subcommand './setup.sh email list'. A test have been added too.
17 lines
354 B
Bash
Executable file
17 lines
354 B
Bash
Executable file
#! /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}'
|
|
|