1
1
mirror of https://github.com/docker-mailserver/docker-mailserver synced 2024-09-21 20:31:42 +02:00

Fix some bugs in the shell scripts.

This commit is contained in:
Adrian Pistol 2016-07-12 17:40:08 +02:00
parent e4d70d5147
commit 133d6eba32
No known key found for this signature in database
GPG Key ID: 0AB17C4FEC11E631
3 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,7 @@
DATABASE=/tmp/docker-mailserver/postfix-accounts.cf
function usage {
echo Usage: addmailuser <user@domain.tld> [password]
echo 'Usage: addmailuser <user@domain.tld> [password]'
exit 1
}
@ -14,7 +14,7 @@ if [ ! -z "$1" ]; then
exit 1
fi
if [ ! -z "$2" ]; then
PASS=$2
PASS="$2"
else
read -s -p "Enter Password: " PASS
if [ -z "$PASS" ]; then
@ -22,7 +22,7 @@ if [ ! -z "$1" ]; then
exit 1
fi
fi
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u $USER -p $PASS)")
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u "$USER" -p "$PASS")")
echo "$ENTRY" >> $DATABASE
else
usage

0
target/bin/generate-dkim-config Normal file → Executable file
View File

3
target/bin/generate-ssl-certificate Normal file → Executable file
View File

@ -1,6 +1,6 @@
#!/bin/sh
FQDN=$(hostname)
FQDN=$(hostname --fqdn)
cd /ssl
# Create CA certificate
@ -11,4 +11,3 @@ openssl req -new -nodes -keyout /ssl/$FQDN-key.pem -out /ssl/$FQDN-req.pem -days
openssl ca -out /ssl/$FQDN-cert.pem -infiles /ssl/$FQDN-req.pem
# Combine certificates for courier
cat /ssl/$FQDN-key.pem /ssl/$FQDN-cert.pem > /ssl/$FQDN-combined.pem