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.
To setup the mailserver large snippets of shell code had to past in a
console. Instead of:
mkdir -p config
touch config/postfix-accounts.cf
docker run --rm \
-e MAIL_USER=user1@domain.tld \
-e MAIL_PASS=mypassword \
-ti tvial/docker-mailserver:latest \
/bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u
$MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf
you can specify:
./setup.sh email add user1@domain.tld mypassword
This wrapper script can be easily extended. It uses the scripts already
builtin.