bugfixing

This commit is contained in:
Steven Mondji-Lerider 2012-09-26 12:22:10 +00:00
parent 9fb6c3a1c1
commit 5cf807eddb
1 changed files with 6 additions and 1 deletions

View File

@ -16,12 +16,17 @@ if [ `id -u` -ne 0 ]; then
exit 1 exit 1
fi fi
. "$CONFIG_FILE"
fix_mail() { fix_mail() {
read LOGIN GID || true read LOGIN GID || true
while [ "$LOGIN" ]; do while [ "$LOGIN" ]; do
INITIALE=`echo $LOGIN |cut -c1` INITIALE=`echo $LOGIN |cut -c1`
REP="$ALTERNC_LOC/mail/$INITIALE/$LOGIN/" MAIL=$(echo $LOGIN |sed -e 's/\@/_/')
REP="$ALTERNC_LOC/mail/$INITIALE/$MAIL/"
chown --recursive $GID:vmail "$REP" chown --recursive $GID:vmail "$REP"
read LOGIN GID || true
done
} }
query="select user,userdb_gid from dovecot_view" query="select user,userdb_gid from dovecot_view"