mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
Implement ./setup.sh email list (#287)
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.
This commit is contained in:
parent
69ee54513e
commit
98e59a7abe
4 changed files with 27 additions and 4 deletions
16
target/bin/listmailuser
Executable file
16
target/bin/listmailuser
Executable file
|
@ -0,0 +1,16 @@
|
|||
#! /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}'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue