mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Do not create dir if it exists
This commit is contained in:
parent
a0b55531a9
commit
a6fbef9835
|
@ -25,7 +25,12 @@ if [ -f /tmp/postfix/accounts.cf ]; then
|
|||
echo "${pass}" | userdbpw -md5 | userdb ${login} set systempw
|
||||
echo "${pass}" | saslpasswd2 -p -c -u ${domain} ${login}
|
||||
mkdir -p /var/mail/${domain}
|
||||
maildirmake /var/mail/${domain}/${user}
|
||||
if [ -d "/var/mail/${domain}/${user}" ]; then
|
||||
# Directory already present
|
||||
echo "Directory present"
|
||||
else
|
||||
maildirmake "/var/mail/${domain}/${user}"
|
||||
fi
|
||||
echo ${domain} >> /tmp/vhost.tmp
|
||||
done < /tmp/postfix/accounts.cf
|
||||
makeuserdb
|
||||
|
|
Loading…
Reference in a new issue