Users parsing from env and not from static file anymore.

This commit is contained in:
Thomas VIAL 2015-03-28 19:30:09 +01:00
parent 22a54827ff
commit 45b1d1e583
2 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@ echo "Regenerating 'vmailbox' for given users"
echo "docker_mail_users => $docker_mail_users" echo "docker_mail_users => $docker_mail_users"
echo "# WARNING: this file is auto-generated. Do not modify locally" > /etc/postfix/vmailbox echo "# WARNING: this file is auto-generated. Do not modify locally" > /etc/postfix/vmailbox
echo $docker_mail_users | sed -r 's/\[|\]|\x27| //g' | sed -r 's/,/\n/g' > /tmp/docker_mail_users
while IFS=$'|' read -r login pass while IFS=$'|' read -r login pass
do do
# Setting variables for better readability # Setting variables for better readability
@ -20,7 +21,8 @@ do
mkdir -p /var/mail/ifusio.com mkdir -p /var/mail/ifusio.com
maildirmake /var/mail/${domain}/${user} maildirmake /var/mail/${domain}/${user}
done < /etc/postfix/docker-mail-users done < /tmp/docker_mail_users
rm /tmp/docker_mail_users
makeuserdb makeuserdb
echo "Postmap configurations" echo "Postmap configurations"