mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Users parsing from env and not from static file anymore.
This commit is contained in:
parent
22a54827ff
commit
45b1d1e583
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue