Skip to content
Snippets Groups Projects
Commit 0702d244 authored by Bob Mottram's avatar Bob Mottram
Browse files

Ask for user password to create maildir account

parent 2e8a7969
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,6 @@ function bdsmail_configure_users {
mkdir -p /home/$USERNAME/Maildir/i2p/cur
mkdir -p /home/$USERNAME/Maildir/i2p/new
chown -R $USERNAME:$USERNAME /home/$USERNAME/Maildir/i2p
$BDSMAIL_DIR/bin/newmail $MY_USERNAME /home/$MY_USERNAME/MailDir/i2p
fi
fi
done
......@@ -97,6 +95,7 @@ function add_user_bdsmail {
fi
sed -i "s|username|$new_username|g" /home/$new_username/.mutt/bdsmail
bdsmail_configure_users
$BDSMAIL_DIR/bin/newmail $new_username /home/$new_username/MailDir/i2p "$new_user_password"
chown -R $new_username:$new_username /home/$new_username/.mutt
echo '0'
}
......@@ -368,6 +367,24 @@ function install_bdsmail {
bdsmail_configure_users
# ask to the ssh login password for the admin user
# This is then used to create the maildir account
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Password" \
--clear \
--passwordbox $"Enter your ssh login password" 8 60 2> $data
ret=$?
case $ret in
0)
$BDSMAIL_DIR/bin/newmail $MY_USERNAME /home/$MY_USERNAME/MailDir/i2p $(cat $data)
;;
1)
exit 643856384;;
255)
exit 638762424;;
esac
APP_INSTALLED=1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment