From c121d48f743190c921ab937b6cf8884dd9ba37ca Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Wed, 10 Nov 2021 13:35:01 -0800 Subject: [PATCH] leave {SHA512-CRYPT} in place --- bin/vmail-mboxes-add.sh | 2 +- bin/vmail-mboxes-mod.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/vmail-mboxes-add.sh b/bin/vmail-mboxes-add.sh index 0f35c16..3750629 100755 --- a/bin/vmail-mboxes-add.sh +++ b/bin/vmail-mboxes-add.sh @@ -48,7 +48,7 @@ rowcount=`mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -s -r -N -e "S if [ "$rowcount" -eq '0' ] ; then # mbox does not exist, build SQL # first encrypt password - passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$password"|sed 's|^{SHA512-CRYPT}||'` + passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$password"` dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'INSERT INTO vm_mboxes SET domain_id=\"$domain_id\", mbox=\"$mbox\", passwd=\"$passwd\"" if [[ -n $status ]] ; then dbcmd="$dbcmd, status=\"$status\"" diff --git a/bin/vmail-mboxes-mod.sh b/bin/vmail-mboxes-mod.sh index 4f68561..5e8025b 100755 --- a/bin/vmail-mboxes-mod.sh +++ b/bin/vmail-mboxes-mod.sh @@ -56,7 +56,7 @@ fi # check for password update if [ ! -z "$password" ]; then - passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$passwd"|sed 's|^{SHA512-CRYPT}||'` + passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$passwd"` if [ ! -z "$dbset" ]; then dbset="$dbset," fi